# The Pragmatic Programmer

*The journey to mastery*

2016-10-01 | `software-design` `clean-code` `refactoring` `career`

> Key takeaways from Hunt and Thomas's classic on pragmatic software development, including DRY principles, the right mindset, and how to choose and master your tools.

---



### Takeaways

- Don't Repeat Yourself.
- Mindset is as important as knowledge.
- Good code is easier to change than bad design.
- Choose great tools and become fluent with them.

---

#### Don't Repeat Yourself (DRY)

- Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
- DRY is about the duplication of knowledge, of intent. It's about expressing the same thing in two different places,
  possibly in two totally different ways.

#### Mindset is as important as knowledge

Some important aspects of this mindset include:

- Taking responsibility for your work by not making excuses or passing blame when things go wrong.
- Writing software that's good enough. This means not wasting time on things that are better than they need to be to
  make the product successful.
- Not ignoring technical debt. The authors use the analogy of broken windows:

> Don't leave "broken windows" (bad designs, wrong decisions, or poor code) unrepaired.
> Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up.
> Perhaps you can comment out the offending code, or display a "Not Implemented" message, or substitute dummy data instead.
