Listening notes: 'The Pragmatic Programmer'
The audiobook for The Pragmatic Programmer is everything that an audiobook, and especially everything that a technical audiobook, should be. I love to listen to stuff about software, but a lot of it doesnāt suit the medium well. A lot of thought went into this: the narrator is excellent, some passages are read by the authors, and the code snippets are adapted to the audio format with good judgment.
Satisfyingly, this is not just an authorial but a programming success; the book itself is used as a case study in how to use text as a single source of truth, how to parallelize parallel problems, and how to do the reasonable thing even if it annoys your publisher.
Itās easily the single best technical audiobook experience of my life.
The content is also excellent: this is a true revision of the original. It mixes āwisdom of the ancientsā and ācurrent expertiseā far better than I expected it to. (Not all rereleased classics of programming literature hold up.)
I endorse most, by far, of whatās in the book. Two quick points of disagreement:
Some of their recommended ādescriptive namesā (e.g., ābuyerā for āuserā) seem dangerous to me. Iād rather maintain a focus on what the thing is rather than what itās doing right now in your code. My stock example here: if Iām writing a program to order pizza, and I currently order pizza on all and only Thursdays, I should still name the thing in my code
pizza, notthing_ordered_on_thursdayorthursday_pizza. In the buyer/user case, I fear that the code might change so that a buyer is also a shipping recipient, a notification recipient, or something else. Many problems are caused by names that are not descriptive enough, but many are also caused by things named according to accidents of their original context, not their real essences.1The authors repeat fairly standard advice about using the power of Unix pipes and generally about the power of viewing programs as extended transformations. I agree about the power of the paradigm, but Iām more skeptical about its limitations. Chaining together a ton of shell programs with pipes is almost impossible to test, and I think tests are valuable even in very small projects. Also, and relatedly, this usually requires intermediate values to be coerced into textual formats. Thatās often fine (or even desirableāsee the chapter on āThe Power of Plain Textā), but very often Iād rather have a program pass structured (and tested!) objects around. Finally, and at the risk of offending functional-programming acolytes, the paradigm of viewing all programs as transformations can be a Procrustean bed. But thatās a longer argument.
Thereās a counterargument here that roughly goes: if a thing takes on other roles, it will be in a different bounded context, so the other name will be for a legitimately different object in a different context, and the original (more specificāe.g., ābuyerā) name will after all have been apt. Perhaps such an argument is correct, but thatās not the argument the authors give.↩