Before, I loved being in a bookstore. Now, I turn to the WWW to buy books. I, always, prefer choice and cheap over instant gratification. Recently, I had to actually pickup a book for my wife–she likes instant, tell me about it. As I hurry to checkout, out of the corner of an eye, I spot a book that looks like TMMM (the 1995 edition). So I hit the flaps, bank hard left, dive down and swoop up a bluish 400 page book entitled The Design of Design by Frederick P. Brooks, jr. Distrustful, I wonder: “Real or lookalike?,” “Piggybacking on earlier success?” So I browse a few random pages. Wow, brilliant stuff. I have got to have this book, like now! I hurry through checkout, to the car and start reading. Here is what I think. First, re-read TMMM. Go ahead, I’ll wait… Ok, re-read at least chapters 2 and 16. Second, read TDOD, but skip the non computer essays. I say this because the first part of TDOD is brilliant but dense. Refreshing the context will make it more digestible. Also, I highly disagree with the much iterated notion that TDOD is applicable outside the CS realm. Building analogy considered harmful.
Archive for June, 2010
“Alan was complimented for completing his project on schedule. His supervisor looked over the program. With a few minutes of thumbing through he saw that the company standards about structured programming were being observed. He quickly gave up attempting to read the program however; it seemed quite incomprehensible. He realized by now that the project was really much more complex than he had originally assumed, and he congratulated Alan again on his achievement.“ (N.W. Rickert) [The Parable of the two Programmers]
If you can spot the logic error you are at the forefront of evolution, count yourself lucky. If your boss can spot the logic error count your self luckier and if they can’t, quit.
Newer languages like Java lack a preprocessor like C has. The
#ifdef AAP is replaced by
cpp has more to offer than conditional code. A preprocessor is a domain specific language for symbol manipulation that can also offer meta programming and language alterations. The
__LINE__ directive is an example of the former. Below an example of the latter:
To fully use a preprocessor, a coder needs to be uber-flexible. Only a few are. Hence the frustration with languages like M4 or the expansion delay effect of
&& in the SAS macro language. Some preprocessors were added out of necessity. Just imagine writing 10 KLOC of assembler without using a preprocessor. To quote Al Bundy, I’d rather bait a crocodile with my manhood.