Date: Sat, 24 Feb 2001 01:21:28 +0100 From: Brad Knowles <brad.knowles@skynet.be> To: "Michael C . Wu" <keichii@peorth.iteration.net>, j mckitrick <jcm@FreeBSD-uk.eu.org> Cc: freebsd-chat@FreeBSD.ORG Subject: Re: bad programming practice? Message-ID: <v0422080db6bcadff09c5@[10.0.1.2]> In-Reply-To: <20010223143019.E32113@peorth.iteration.net> References: <20010223180321.A33329@dogma.freebsd-uk.eu.org> <20010223143019.E32113@peorth.iteration.net>
next in thread | previous in thread | raw e-mail | index | archive | help
At 2:30 PM -0600 2/23/01, Michael C . Wu wrote: > When you have a very lengthy boolean expression, it causes > headaches to read the code. However, I do teach new students > of C or C++ to use the if (CONST == var) formatting just so that > they do not mess up. Then I explain to them why it is a bad idea > when they advance into a better programmer. This may be an Urban Legend, but I understand that even Einstein divided by zero, by mistake. IMO, anything like this that can help me catch stupid mistakes (regardless of how many warnings may or may not be turned on), is a good thing -- even if I do learn to outgrow the technique at a later time. It would certainly help me if more people were paranoid as possible and did things like this -- I can't tell you how many times I've tried to compile something where there was an elementary error of this sort which would have been caught by better programming techniques. The truly sad thing is that many times it is much harder to find things like this because many programmers are so sloppy, or compilers are so different on so many machines, that most programs I end up building from source either generate a lot of warnings and the attitude is that this is okay, or the build scripts explicitly turn off all warnings because the programmers don't want to hear about it. -- ====================================================================== Brad Knowles, <brad.knowles@skynet.be> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v0422080db6bcadff09c5>