View Review Details
| Book: | Practical C Programming | |
| Subject: | Riddled with bad programming examples | |
| Date: | 2006-09-20 01:53:48 | |
| From: | Mike | |
|
Rating:
For a book supposedly aimed at novice C programmers, this book sets a very bad example. I've only flicked through the pages in a library, however every single piece of example code I looked at had at least some element of poor programming style, and in some cases were actually wrong.
whileconstruct is almost always used in this book as an infinite loop with a break</break> clause buried in the middle. In almost all of the cases, a simple re-write would have made the code both shorter and easier to read, and would have placed the condition obviously inside thewhilewhere professional programmers would expect to find it. Another example is in a piece of code called "good.c" which is supposed to show the correct way to write code. This includes a number of un-initialised variables, a common source of bugs in real-world programs. There are even some code examples even contain obvious typographical errors and would cause any decent compiler to emit at least warnings if not errors. |
||
