Bad taste in programming
Posted Mar 1, 2007 17:14 UTC (Thu) by pr1268
In reply to: Some idle comments about Linus' e-mail response and Linux
Parent article: Re: [GIT PATCH] HID and USB HID update for 2.6.21-rc2
Thanks to the above posters for your responses.... But I was thinking more low-level bad taste in kernel programming. ;-) As in:
- /* New kernel idle loop */
- if(something->uid = 0)
/* Hopefully no one will notice missing '=' */
- if(x != x)
/* How come this code never gets executed? */
/* Someone tell me this while condition is easy to read */
But I suppose bad taste can exist at all levels of programming.
Disclaimer: I am easily entertained by browsing code at the IOCCC Web site, but I whole-heartedly agree that it's absolutely no fun having to maintain sloppy code whose author exhibited bad taste.
As for coding style (indentation, proper use of curly braces, etc.), Robert Love's book has some style guidelines for kernel code in one of the appendices. Not that I'm trying to plug his book or anything (but it is a decent read).
to post comments)