"The pragmatic programmer" book notes

Last updated 2.6.2022

Think about your work while you are doing it. Every day on every project. Have a feeling of continuous improvement.

No one writes perfect code, including you. However:

Erlang: Defensive programming is a waste of time. Let it crash. "This can never happen" - don't practise that kind of self deception when programming.

Leave assertions in the code even in production. Only leave out the assertions causing the performance issues.

Take small steps, always. Get feedback too for each of the steps the code does. Avoid fortune telling. If you have to involve it, then the step is too large.

Decouple the code (e.g. OOP or functional programming). Prefer interfaces for types and mixins for class extension over class inheritance.

Don't think outside the box. Find the box. The box is larger than you think. Think about the hard problem at hand. Do you have to do it a certain way or do you have to do it at all?

Do what works and not what's fashionable. E.g. does SCRUM make sense? The goal is to deliver deliverables and not to "become" agile.

Continuous learning

Add new tools to your repertoire every day and keep the momentum up. Learning new things is your most important aspect. Invest regularly in your knowledge portfolio. The process of learning extends your thinking it does not matter if you will never use it.

Think critically about everything you learn. Use paper for your notes. There is something special about it.

Stay connected

It's your life, you own it. Bruce Lee once said: "I am not on the world to life after your expectations, neither are you to life after mine."

It's your life. Share it, celebrate it, be proud and have fun.

The story of stone soup

How to motivate others to contribute something (e.g. ideas to a startup):

A kindly, old stranger was walking through the land when he came upon a village. As he entered, the villagers moved towards their homes locking doors and windows. The stranger smiled and asked, why are you all so frightened. I am a simple traveler, looking for a soft place to stay for the night and a warm place for a meal. "There's not a bite to eat in the whole province," he was told. "We are weak and our children are starving. Better keep moving on." "Oh, I have everything I need," he said. "In fact, I was thinking of making some stone soup to share with all of you." He pulled an iron cauldron from his cloak, filled it with water, and began to build a fire under it. Then, with great ceremony, he drew an ordinary-looking stone from a silken bag and dropped it into the water. By now, hearing the rumor of food, most of the villagers had come out of their homes or watched from their windows. As the stranger sniffed the "broth" and licked his lips in anticipation, hunger began to overcome their fear. "Ahh," the stranger said to himself rather loudly, "I do like a tasty stone soup. Of course, stone soup with cabbage -- that's hard to beat." Soon a villager approached hesitantly, holding a small cabbage he'd retrieved from its hiding place, and added it to the pot. "Wonderful!!" cried the stranger. "You know, I once had stone soup with cabbage and a bit of salt beef as well, and it was fit for a king." The village butcher managed to find some salt beef . . . And so it went, through potatoes, onions, carrots, mushrooms, and so on, until there was indeed a delicious meal for everyone in the village to share. The village elder offered the stranger a great deal of money for the magic stone, but he refused to sell it and traveled on the next day. As he left, the stranger came upon a group of village children standing near the road. He gave the silken bag containing the stone to the youngest child, whispering to a group, "It was not the stone, but the villagers that had performed the magic."

By working together, with everyone contributing what they can, a greater good is achieved.

More notes