My all-time (least) favourite is an example from Rob Pike's Notes on Programming in C:
I laughed at the time, but I've seen it in real life (second-year programming assignments; TAing can be fun).Don't laugh now, wait until you see it in real life./********************************** * * * Add one to i * * * **********************************/ i=i+1;
--
Yours in pedantry,
F
o
x
t
r
o
t
U
n
i
f
o
r
m
"Lines of code don't matter as long as I'm not writing them." -- merlyn
In reply to Re: The joys of bad code
by FoxtrotUniform
in thread The joys of bad code
by BUU
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |