Sunday, 20 March 2011

This Computer is Stupid

Code Complete (Steve McConnell)
- Highlight Loc. 7804-7  | Added on Saturday, February 19, 2011, 01:18 PM

If you often find yourself suspecting that the compiler or the hardware made an error, you're still in the realm of superstition. A study conducted many years ago found that only about five percent of all errors are hardware, compiler, or operating-system errors (Ostrand and Weyuker 1984). Today, that percentage would probably be even lower. Programmers who have moved into the realm of understanding always suspect their own work first because they know that they cause 95 percent of errors.

I've certainly been in this position in the past. In my early programming career I would often cry tears of frustration, convinced that the computer was stupid and wasn't doing what I'd told it to do. Because of course, I always write perfect code.

Now I know that if I find myself railing against the stupidity of the computer, then I've probably made a stupid mistake somewhere in my code.

No comments:

Post a Comment