Bug Free C
I liked reading
Bug Free C by Jerry Jongerius.
The most important thing is his attitude toward bug-free software:
it can be done and when you know how, it is not too difficult.
This is something I try to tell my students for years (but, unfortunately,
only a few of them get the message).
There are three important lessons that can be learnt:
There are a few caveats that I see in this book. This is natural:
I do not expect to agree 100% with anyone, nor do I expect that they
agree 100% with me. Here is a list of a few of them:
- Designing and implementing an ADT ( a class in his terminology)
is very similar in its basics to the way we teach ADTs in our MaTaM
Of course, in the course we do not dwell into fine details
of implementation issues. Interestingly, his book was published
in January 1995, just a few months after we started
using our new slides, teaching ADTs this way (in the above link, click
on "Course Material" and then "Lectures" and choose the ADT chapter).
We started teaching this material on Winter94-95 semester (Oct. '94)
while in the process of developing the new set of slides.
- It teaches the reader advanced techniques of using the C Preprocessor.
Some simplified versions of similar techniques can be found
in the chapter about "Testing" in the course slides above.
- It points out some weaknesses of the standard C-library and Windows OS
that are important to understand in the course of developing
bug-free software. It is not the details that are important
- it is the attitude (and aptitude) for mercilessly fighting bugs.
The bottom line: make a worthwhile reading of
- It is MS-Windows centric.
Especially, that it is about the outdated Windows 3.1.
However, there is also a blessing in it: you do not have to learn
by heart all the examples, it is enough that you get the message
"if you know your environment, your software is much better".
- It supports the Hungarian naming convention.
There are many that support it (probably by working a lot in
an MS environment - but I hear that MS has stopped using it),
as well as many that don't (including myself).
It did not prevent me from learning a few other things, that are good.
- It has some errors/misconceptions/questionable practices w.r.t. C.
For example, using identifiers that begin with an underscore (_)
is a burden. I even found a medium-level error (and I did not read
it thoroughly), but if you don't see it,
it will, probably, not harm you. You can still learn a lot.
A free download
(added: Oct. 17, 2006)
Yechiel Kimchi October 22, 2005.