|
|
On Wed, 24 Oct 2007 12:48:01 -0400, Jim Henderson wrote:
> The problem doesn't
> start in the software development houses, it starts at school when
> students are learning how to code and are taught bad habits from the
> start.
As an example, I remember a core component of a popular server OS that
would, under certain circumstances, display negative disk space free.
This looks quite stupid when it happens - since clearly that's not a
possible situation. The bug was deemed to be a "cosmetic" error and was
never fixed. Customers looked at it and said "if that sort of error
exists, what am I *not* seeing?"
To someone with a little background in C (the language used for the tool
in question), it's clear that the problem was either (a) sloppy
declaration of the variable type, letting the default signed value be
used rather than specifying an unsigned data type or (b) poor use of the
formatting specification when the data was output, using a signed output
type when an unsigned data type was used.
Either way is not good. It's an easy mistake to make, but if they've
internalized the need to be specific, then this sort of thing wouldn't
happen.
Jim
Post a reply to this message
|
|