[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sad code [Was: Re: PG: Hackers and Painters]
Matt Curtin wrote:
> [1] As an aside, I saw some truly sad code when looking at what
> students were actually doing with the library. Things like:
>
> while (1) {
> do_some_stuff();
> }
>
> printf("Got here!\n");
>
> I am not making this up.
This is a bit off-topic, but hey...
When I was in my college operating systems class, I too made some
sad code. While working on a shell program (and learning about
Unix forks for the first time), I wrote a piece of code that
was essentially:
while (1) {
fork ();
}
I, um, ended up having to reinstall the operating system on that
machine. :-)
-- Trevis