Pragmatic Programmer summary
Title: Pragmatic Programmer
Authors: David Thomas, Andrew Hunt
Introduction
Who is a pragmatic programmer? A person who takes responsibility for themselves and their actions.
- Drawn inspiration to read this book from Dr. Ngure and Dr. Biko Olianga
Chapter 1: A Pragmatic Philosophy
Pragmatic programming stems from a philosophy of pragmatic thinking. This chapter sets the basis for that philosophy.
Topic 1: It’s your life
“I’m not in this world to live up to your expectations and you’re not in this world to live up to mine." - Bruce Lee
- It’s your life. You own it. You run it. You create it.
Topic 2: The Cat Ate My source code
“The greatest of all weakness if the fear of appearing weak."
- One of the cornerstones of the pragmatic philosophy is the idea of taking responsiblity for yourself and your actions in terms of your career advancement, your learning and education, your project and your day-to-day work.
Topic 3: Software Entropy
Entropy is a term from physics that refers to the amount of “disorder” in a system.
-
When disorders increases in software, we call it software rot or technical debt
-
Many factors contribute to software rot. The most important one seems to be the psychology or culture at work on a project.
-
One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense abandonment - a sense that the powers that be don’t care about the building. So another window gets broken. People start littering. Graffiti appears. Serious structural damage begins. In relatively short span of time, the building becomes damaged beyond the owner’s desire to fix it, and the sense of abandonment becomes reality.
-
Don’t live with broken windows(Bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered.
Topic 4: Stone Soup and Boiled frogs
Stone Soup story
There are a couple of morals in the stone soup story. The villagers are tricked by the soldiers, who use the villagers' curiosity to get food from them. But more importantly, the soldier act as a catalyst, bringing the villagers together so they can jointly produce something that they couldn’t have done by themselves - a synergistic result. Eventually everyone wins.
Boiled frogs story
This story teaches us to have situational awareness. Don’t be like fabled frog. Keep an eye on the big picture. Consistently review what’s happening around you, not just what you personally are doing.
Topic 5: Good-Enough Software
“Striving to better, oft we mar what’s well." Build software that actually solves the user’s problem.
Topic 6: Your Knowledge Portfolio
Topic 7: Communicate!
Chapter 2: A Pragmatic Approach
This chapter discusses about tips and tricks that apply at all levels of software development, processes that are virtually universal, and ideas that are almost axiomatic
Topic 8: The Essence of Good Design
Topic 9: DRY and The Evils of Duplication
Topic 10: Orthogonality
Topic 11: Reversibility
Topic 12: Tracer Bullets
Topic 13: Prototypes and Post-it Notes
Topic 14: Domain Languages
Topic 15: Estimating
Chapter 3: The Basic Tools
- Tools amplify your talent. The better your tools, and the better you know how to use them, the more productive you can be.
- Always be on the lookout for better ways of doing things.
Topic 16: The Power of Plain Text
- As Pragmatic Programmers, we believe that the best format for storing knowledge persistently is plain text. With plain text, we give ourselves the ability to manipulate knowledge, both manually and programmatically, using virtually every tool at our disposal.
- With plain text, you can achieve a self-describing data stream that is independent of the application that created it.
- HTML, JSON, YAML are examples of plain text.
- When multiple systems interchange data among themselves you need to ensure that a common standard is used for communication. Plain text is that standard.
Topic 17: Shell Games
The shell is a powerful command line interface that can be used by programmers to interact with the Kernel. From the shell, you can launch applications, debuggers, browsers, editors, and utilities.
- Gain familiarity with the shell, and you’ll find your productivity soaring.
Topic 18: Power Editing
- When using your editor, learn the commands that make your life easier, this will save you time and increase your productivity as a programmer.
Topic 19: Version Control
- Version Control System keep track of every change you make in your source code and documentation. With properly configured VCS you can always go back to a previous version of your software.
- VCS promotes collaboration among a team of developers.
Topic 20: Debugging
“It is a painful thing to look at your own trouble and know that you yourself and no one else has made it.” - Sophocles, Ajax
-
We as programmers spend lots of hours debugging code. This is something I realized in the early stages of my career in software development. Debugging can be mentally draining and time-consuming but it can be a bit easier by utilizing debugging tools at your disposal such as breakpoints.
-
No one writes perfect software therefore it’s certain that your code or someone else’s code may have a bug. When you encounter a bug, you should concentrate of fixing the problem rather than pointing fingers.
Don’t Panic
Topic 21: Text Manupulation
As Software Engineers, we should familiarize ourselves with text manipulation tools such as awk
and sed
which are shell commands. For a more structured tool you can use Python and Ruby.
Topic 22: Engineering Daybooks
Engineering Daybook is a journal used by engineers to record what they’ve done, what they’ve learned, skethes of ideas and reading from meters.
-
As Software Engineers we use daybooks to jot down what we’re working on, to note variable values when debugging, to leave reminders where we put things, to record wild ideas, etc
-
We use daybooks to jot down what we’re working on