I love this book. As a programmer pounding keys since the 20th century, this book codifies my experiences. It’s like reading daily affirmations that hammer my instinctual best practices home. As I read the book, I find myself consistently nodding and agreeing.

Summary

The Pragmatic Programmer: 20th Anniversary Edition, 2nd Edition: Your Journey to Mastery is about computer programming and software engineering, written by Andrew Hunt and David Thomas and published in October 1999. It’s a textbook in related university courses.

The Pragmatic Programmer presents a systematic theory to improve the development process. The author refers to pragmatic programmers as adaptable, persistent, curious, realists, early adopters, critical thinkers, and jacks of all trades.

Publish Date: September 13, 2019

The Good

Several chapters stood out to me as golden signals.

Delight Your Users

Delighting your users is the most critical aspect of programming.

My favorite aspect of programming is seeing the happiness bought on by one of my creations. Happy people will inevitably lead to prosperity for all, so focusing on them will make you a great software developer. If I see dismay, I am unsatisfied with my work and begin again.

Delight Your Users

Delight starts with gathering precise requirements and knowing the people you serve while solving their problems. A company looks to you to solve its problems, so gathering information about its users’ problems will ground you in your work.

Tracer Bullets

The Tracer bullets chapter teaches us to start with the end in mind. In contrast to a proof of concept/prototype, creating a tracer bullet to aid in completing your project ends with usable code. The idea is to create a skeleton that includes all the layers of your application yet provides a single piece of functionality.

Tracer Bullets

As you fire your tracer bullet, each layer is built with the bare minimum functionality required to reach your destination. Your destination might be displaying a user interface, exposing an API, or consuming a machine learning algorithm’s output. The sky’s the limit on the goal, and a tracer bullet will help you get there quickly and delight your users.

Tracer Bullets

Don’t Outrun Your Headlights

Don’t outrun your headlights walks us through the perils of predictive programming and limiting feedback loops.

Early on, I would get ahead of myself. I would dive into the unknown unprepared and without a map. While this was an excellent approach for earning experience, I needed to deliver projects. A balance between charging ahead, and building a napkin map was elusive.

Don't Outrun Your Headlights

With more experience comes the feeling you know the outcome. Many programmers feel they are a prophet from the future. It’s a trap; you’ll realize this when rewriting software to escape.

The Pragmatic Programmer reminds us we cannot predict the future. We can see an hour or a few days ahead, but the future blinds us.

Instead of clinging to the future, we can make our software adjustable. We prepare for inevitable change using software design patterns; instead of reading tea leaves, we adapt.

Shared State Is Incorrect State

Share State Is Incorrect State walks us through the challenges of managing state conditions.

Managing software state is challenging, much like working with two cooks in a kitchen.

I was a cook in a past life. In a kitchen, each cook has a line.

Shared State Is Incorrect State

It has the ingredients and tools required to cook the restaurant’s recipes. When two cooks are on the same line, they prevent breaking flow. If the kitchen’s state is different than expected, flow is broken, and problems arise.

The software world mimics the real world. We create separate, independently managed states in our designs. The Actor Model is an excellent example of loosely coupled systems working together cohesively.

graph TB Cook1["Cook1 (Actor)"] -- "Cooks Left" -->Grill Cook2["Cook2 (Actor)"] -- "Cooks Right" -->Grill["Grill (State)"] style Grill fill:#000,color:red,stroke: #fff ,stroke-width:3px Cook1 -- "Assembles" -->Dish Cook2 -- "Serves" -->Dish Dish --> Waiter --> Customer

This software design pattern example illustrates independent actors (cooks) that communicate with each other but never change each other’s state. Imagine Cook1 cooking on the right side of the grill. The state of the left side of the grill is independent of the right.

Some outcomes of unmanaged or improperly implemented states are as follows.

  • Unintentionally burnt food 🥩 🔥
  • Orphaned records in a database
  • Software crashes
  • Incorrectly charged customers

Managing state is a core software developer responsibility.

Frameworks like Terraform manage the complex state of resources. Luckily many other frameworks manage state for you. You’ll more often leverage existing patterns and frameworks to manage state.

The Bad

While not necessarily bad, this book will not tell you how to do things. You’ll find examples to illustrate a point, but don’t look for prescriptive architecture patterns.

The Pragmatic Programmer describes the what and the why of programming. If you’re still developing your software development philosophy, this book will provide plenty of fodder for that endeavor.

The Ugly

I don’t have anything ugly to say about this book. It’s telling that the only one-star review on Amazon complains about the smell of the book.

Amazon Review

Conclusion

The Pragmatic Programmer is a cornerstone book that I reread to reset my perspective when facing complex problems. As I reread, my mind clears. Most of the chapters are small, so it’s a low-effort pause between problems. The Pragmatic Programmer is a warm fire for those cold nights. I hope you enjoy it as much as I do! :fire: