Book Review: How Not to Program in C++
ISBN: 9781886411951
How Not to Program in C++: 111 Broken Programs and 3 Working Ones, or Why Does 2+2=5986
Do you enjoy puzzles? Do you enjoy debugging other people’s code? If so, you’ll enjoy this book.
If reference materials or traditional educational coding books were like newspapers, then this book would be the crossword puzzle page. Just like any crossword puzzle, some sections are harder than others, and the puzzles in this book are no exception. If you can’t quite figure out the subtle differences between pointers, addresses, double pointers, etc, then this listing of the plethora of ways that you can get yourself into trouble while programming in C++ will likely prove too difficult to solve at parts. Without a doubt though, anyone who fully knows C++ (and C, which is also covered in this book) and all its intricacies will not find most of the puzzles exceptionally difficult.
That being said, the book still proves a good read for anyone of higher programming skill; any reader will be scratching his or her head to find the truly subtle ways that the all-too-simple-looking sample programs have been broken. Luckily, there are helpful, very optional hints and answers in the back of the book one can read in order to get thinking on the right track without spoiling too much of the fun. Additionally, throughout the book’s puzzles, there are amusing programmer-related debugging horror stories and funny programming quips that provide a brief smile, even when one is wracking one’s brains out to find the misplaced comma, subtly misspelled keyword, missing semicolon, or devious memory misallocation that is keeping the answer of the problem elusive.