Notes about The Pragmatic Programmer
Chapter 1 - Pragmatic Philosophy
There is a repeated pattern at the start of the book (tip 2), which its authors, Hunt and Thomas, use regularly. They think about their work while they are doing it and try to improve it. It is about e.g. repetitive stuff, which could be automated.
Tip 3 is about the attitude to business requirements. As a developers, we should be actively searching for ways to make business requirements possible, instead of giving lame excuses, why it is not possible. What would we think about a bank officer who makes lame excuses why he cannot do what we ask?
Tip 4 is about a theory, that technical debt is like broken windows in cities. Those are small problems, which, left unfixed, can raise to become huge problems. We should be fixing even small technical debt as soon as it is found. We should also think about, what is the root cause, that this technical debt happened at all.
Tip 7 elaborates whether software quality should be part of the requirements. The most of the users prefer a working software with bugs today than a perfect software tomorrow.
Tip 8 describes investing as a metaphor to learning. Almost every investment pattern can be translated to studying. We should invest in our education regularly, diversify our portfolio, etc. We should absorb the studied material always with the jaded eye (Tip 9). It is a good idea to talk about technology with someone outside our usual technical circle.
Tip 10 is about communication, mostly in a written way. It is not just what we have to say, but also how we say it. Even a format is important.
Chapter 2 - Pragmatic Way
Tip 11 is a classic DRY - don't repeat yourself. I had some difficulties with this tip in the practice, because when I use is too dogmatically, I create a hard-to-use code. That's why I like Tip 12 more - try to make components, which are designed to be reused, very, very easy to reuse.
Tip 13 is about orthogonality. It is called cohesion in other publications, or SRP - single responsibility principle. It is about making our components self-contained, so they take care of their own stuff. It could be said that the components should be "shy".
Tip 14 says we should keep doors to changes in architectural decisions as open as possible.
Tip 15 are slightly different PoCs, which we use to build the foundation of future software. It is not a code to be thrown away, quite otherwise, it will show us whether the whole system could work. On the other hand, we use the actual PoCs, or prototypes (Tip 16), to learn something.
Chapter 4 - Pragmatic Paranoia
The chapter begins with Tip 30 - we cannot ever achieve the perfect software. If we are about to fail in the code, we should fail fast (Tip 32), so program defensively. If some situation cannot possibly happen, we add assertions that it does not happen (Tip 33).
Tip 36 is partially about the Law of Demeter. If we would like some service from an object, we are not interested in receiving some other object instead, which has some other service, which we should call. We want it to just perform the service we want. We should minimize our dependency on the rest of the code modules.
Chapter 7 - Before a Project
Tip 51 says that system requirements should not be just gathered. They have to be very actively extracted. They are hidden under layers of assumptions, ambiguity and politics. We should ideally work with the user to think like the user (Tip 52). As the project starts to grow, it becomes useful to start a glossary (Tip 54).
Sometimes a diagram is worth more than 1000 words. But we should not be slaves to design tools (Tip 58).