Book notes: The Pragmatic Programmer, 20th Anniversary Edition
Tags: books, programming
Published: 2020-10-20 07:24:40

---
published: true
tags: books,programming
description: Book notes on "The Pragmatic Programmer, 20th anniversary edition"
cover_image: https://danlebrero.com/images/blog/pragmatic-programmer.jpg
series: Book notes

title: Book notes: The Pragmatic Programmer, 20th Anniversary Edition
canonical_url: https://danlebrero.com/2020/07/08/the-pragmatic-programmer-20th-anniversary-edition-book-summary/
---

These are my notes on [David Thomas](https://twitter.com/pragdave) and [Andrew Hunt](https://twitter.com/PragmaticAndy)'s [The Pragmatic Programmer, 20th anniversary edition](https://pragprog.com/titles/tpp20/). 

The original version was in my "must read" list for any software developer, and this update version one is no different.

Key insight: After reading the new edition, I have come to realize of how huge an impact the first edition made on my career. I can see that most of [my advice](https://danlebrero.com/2018/07/04/habits-of-efficient-developers-wearedevelopers-2018-video/) is rooted in this book.

It is also nice to see how the authors have come to the same conclusions regarding functional programming (Clojure style) and OO that I have. From the "transforming programming" section:

* All programs transform data, converting input into an output.
* When we think of programs as something that transforms input into output, many of the details we previously worry about just evaporate. The structure becomes clearer, the error handling consistent and coupling drops way down.

See [Dave Thoma's YOW! keynote](https://www.youtube.com/watch?v=iLMiPhYVG8w) for a longer explanation.

You can find all the tips [here](https://pragprog.com/tips/).

# Key Insights

* You own your life.
* Good enough software.
* Most important strategic asset: learn to learn.
* A team that doesn't continuously experiment with their process is not an agile team.
* Tip 76: Programmers help people understand what they want.
> Perfection is achieved not when there is nothing left to add but when there is nothing left to take away. 
<cite>Antoine de Saint-Exupéry, Wind, Sand and Stars 1939.</cite>
* Try it.
* How will you know that we've all been successful after this project is done?
* Moral compass:
    1. Have I protected the user?
    2. Would I use this myself?
               
# TOC

* [Preface](#ch-0)
* [1 - Pragmatic Philosophy](#ch-1)
* [2 - A Pragmatic Approach](#ch-2)
* [3 - The Basic Tools](#ch-3)
* [4 - Pragmatic Paranoia](#ch-4)
* [5 - Bend, or Break](#ch-5)
* [6 - Concurrency](#ch-6)
* [7 - While You Are Coding](#ch-7)
* [8 - Before the Project](#ch-8)
* [9 - Pragmatic Projects](#ch-9)
* [Postface](#ch-10)

# <a name="ch-0"></a>Preface

* There is no best solution.
* Tip 1: Care about your craft.
* Tip 2: Think about your work.
* Software is engineering with individual craftsmanship.
* Kaizen: continuous improvement, every day.

# <a name="ch-1"></a>Chapter 1 - Pragmatic Philosophy

* You own your life.
* Team trust is essential.
* Provide options, not excuses.
* Tip 5: No broken windows.
* People find it easy to join an ongoing success.
* Good enough software.
* Most important strategic asset: learn to learn.
* Your knowledge is the most important asset.
 
## <a name="ch-2"></a>Chapter 2 - A Pragmatic Approach

* Tip 14: Good design is easier to change.
* Programmers are constantly in maintenance mode.
* Tip 18: There are no final decisions.
* Tip 20: Tracer Bullets (aka. walking skeleton).
* Tip 21: Prototype to learn.
* Learn what you see risk in.
* Keep a log of your estimates, find out why went wrong for those with > 50% of error.
        
## <a name="ch-3"></a>Chapter 3 - The Basic Tools

* Tip 25: Keep knowledge in plain text.
* Keep an engineering daybook.
       
## <a name="ch-4"></a>Chapter 4 - Pragmatic Paranoia

* [Crash, dont trash](https://wiki.c2.com/?LetItCrash).
* Leave assertions on in production.
* Tip 42: Take small steps - Always.

## <a name="ch-5"></a>Chapter 5 - Bend, or Break

* Tip 45: Tell, dont ask
* Events:
    * Finite state machines.
    * PubSub
    * Reactive programming.
* All programs transform data, converting input into an output.
* When we think of programs as something that transforms input into output, many of the details we previously worry about just evaporate. The structure becomes clearer, the error handling consistent and coupling drops way down.
* Big reason that OO systems are hard to change: encapsulation.
    
## <a name="ch-6"></a>Chapter 6 - Concurrency

* Agents.
* Blackboards.
    
## <a name="ch-7"></a>Chapter 7 - While You Are Coding

* When stuck, give yourself a break.
* Tip 34: Dont assume, prove it.
* Dont let existing code dictate future code.
* Tip 65: Refactor early, refactor often.
* TDD FTW.
* Property-based testing FTW.

## <a name="ch-8"></a>Chapter 8 - Before the Project

* Perfection is achieved not when there is nothing left to add but when there is nothing left to take away. Antonie de St. Exupery, Wind, Sand and Stars 1939.
* Tip 75: No one know what exactly what they want.
* Tip 76: Programmers help people understand what they want.
* Tip 78: Work with a user to think like a user.
* The only requirements document is working code.
* Tip 80: Use a project glossary.
* A team that doesn't continuously experiment with their process is not an agile team.
    
## <a name="ch-9"></a>Chapter 9 - Pragmatic Projects

* Tip 84: Maintain small, stable teams.
* Tip 85: Schedule it to make it happen.
* Team speaks with one voice to the rest of the org.
* Generate a team brand.
* Good communication: instant and frictionless.
* Try it.
* How will you know that we've all been successful after this project is done?
* Tip 97: Sign your work.

## <a name="ch-10"></a>Postface

* Moral compass:
    1. Have I protected the user?
    2. Would I use this myself?
* Tip 99: Dont enable scumbags.