I try to read a lot of books. Over the years, my ‘taste’ for books has been refined and some of my criteria are listed below.
Book Impact Scale
- Length: The 200 – 300 page range is just about right for a technical book. Longer books contain a lot of fluff and repetition. Sometimes I get the feeling that the author had to meet some minimum page count.
- Thought-provoking: I love technical books that challenge the way I think, enable me to see things in alternative light and exercise my ‘thinking’ muscles. Isn’t that the goal for reading after all? To broaden horizons and learn alternative viewpoints.
- Inclusion of challenges: I like books that provide practice exercises. This cements the new ideas – it is easy to ‘think’ you already know something when you don’t. Solving a problem is the litmus test for understanding.
- Enduring: Every field has its ‘classics’ and they exist for a good reason too. If a 30-year old book is still in print, has lots of good reviews and teaches fundamentals; then chances are high it is a GOOD book. Add bonus points for language-agnostic themes.
- Simple: Most books fall short in knowledge delivery by employing obscure terms. This might be due to a misassumption of expected readers’ skill levels. Clear straightforward explanations make for easy reading.
Now, here come the books (listed in no particular order).
1. The Pragmatic Programmer
Excellent read. Medium sized at 352 pages but bursting at the seams with sagely advice. The authors used lots of interesting stories to drive home the points. Some of the lessons that have stuck with me include are:
- Coincidental programming – you don’t why or how the code ‘works’. If adding that statement makes it ‘work’, then it might also cause bugs you can’t explain.
- The broken windows theory – quickly leads to software rot
- Programming close to the problem domain (SICP book did this too)
- Being proud of your work – craftsmen are supposed to be proud of their work.
- Bringing about the change you want
- Test your software else your users will
Definitely influenced me in a big way and probably due for a reread now.
2. Structure and Interpretation of Computer Programmers (SICP)
A master classic – one for anyone who wants to be a master programmer and has the patience to complete all the exercises. Reading the book without solving the questions would make it difficult to fully absorb the goodness.
The authors painstakingly organized the book – the pages flow so smoothly that the increase in complexity is almost imperceptible. You get exposed to a huge slew of programming paradigms (logic, functional, OOP), build cool stuff (8 queens solver, calculus solve, an interpreter and a compiler) and also learn some CS stuff (streaming, Ackermann functions, Huffman etc).
Give a master carpenter the minimum tools he needs and he can create something beautiful. Give me a fully stocked wood workshop and while I can craft a table it probably would not come close to what the master did with his limited tools. My table might work but I probably won’t get any appreciation for it. Think this same way about programming.
For example, here is how they explained list reversal:
To reverse a list, just append the first element to the end of the reversed sublist
3. Code Complete 2
I had always wanted to read this book but I couldn’t bring myself to do that because it was over 1000 pages long. Finally, I gratefully found a strategy that worked – committing to a 30 min read window daily; mostly on the bus commute home.
The points from the book:
- Avoid complexity at all costs; software is already difficult so make it as dumb as possible. Again, make it plain simple.
- Always care about quality regardless of your state in software development
- Create programming models in your language i.e. try to create domain abstractions in the language; this makes it easier to maintain and express ideas
- Programs are meant to be read by humans first and then for computers next
- Being open to other ideas and influences – no need getting stuck to some particular tools
- Testing styles to ensure code coverage
It is a great book – a bit verbose at times but one that you should read too. Read an in-depth review here.
4. Programming Pearls and more Programming Pearls
A bit old but still readable – it made it obvious how programming had advanced and developers could avoid knowing intricate computer details.
The two books are small and contain a lot of ‘pearls’ that make you think deeply; most revolve around events that happened during the authors’ time at the Bell labs. The coding examples might be outdated but the solid principles in the book aren’t.
For example, a book teaching the basics of motion from the 60s would probably still be applicable today; motion fundamentals haven’t changed much. Same way the author’s approach of problem definition, isolation and iterative improvements can’t be faulted.
- Back of the envelope calculations – made me realize how these axioms could influence the way you program. Now you know why these questions are popular at interviews.
- Over-engineering a solution might help it cope with unforeseen load
- Iterative improvement – first solve the problem, then improve the algorithm if needed.
- Confirm algorithmic correction – it’s very easy to assume your algorithms work when they infact contain bugs.
- Programming for resource-constrained environments – how do you sort 4 million nodes on a limited memory computer?
5. The Little Schemer + The Reasoned Schemer
The style was nothing like any of the others and I surprisingly found it enjoyable. It flows as a series of questions and answers although readers are encouraged to try before taking a peek at the answers.
The first few chapters were easy to breeze through (coming from a SICP background probably helped too) however things get more interesting from about chapter 9 or thereabout.
- Provides a ‘formula’ for nailing recursion: fix the base case and then handle the recursive case
Learning recursion is easy, master the first part and then you can learn the remaining parts (pun intended).
- Good explanation of the Y-combinator – slow build up but still challenging explanation of a hard-to-grasp concept.
- Covers CS concepts like generators, memoizations, closures, Church encoding, currying, continuation passing and more.
1. The Algorithm Design Manual (TADM)
Normally algorithms books are all full of mathematical proofs (really important to understand). However, I like the TADM because it focuses more on applying those algorithms in practical context. The various stories by the author and his humorous quips make it all the more fun too.
The book that exposed me to functional programming and started the long JS adventure. I always recommend it since it is an excellent beginner book, free (despite its high quality) and is just awesome.
Looking back, it is interesting to see the subliminal influence these books have had on me. I only realized some of these while writing this review.
What are your favorite books and how have they influenced the way you write programs? Share in the comments.