Essential principles to be a great programmer

I read a book about how to be a pragmatic programmer. I was amazed by it, because it talks about the essential concepts to be a professional programmer and to get better and better each day.

I will talk about some important topics that I found in this book.

Critical thinking

It’s the most important characteristic of the pragmatic programmer. He always thinks critically in any given situation. It’s about questioning and analyzing to find possible problems in order to change the situation until it makes sense.

Provide options, don’t make lame excuses

The greatest of all weaknesses is the fear of appearing weak. — J.B. Bossuet

It isn’t a problem if you don’t know something. Don’t try to seem intelligent or skillful, it will be difficult to maintain your status and it won’t help you to learn new skills.

It’s better to say that you know nothing and then learn the things that you need to solve the problem, than to say that you know everything, learn nothing and then fail to solve the problem.

Don’t live with broken windows

There is a study mentioned in this book that says that if an abandoned building doesn’t have broken windows, people don’t throw trash on it, neither they broke the remaining windows. But if there is a single window broken, people will throw trash on it, break the remaining windows and abandon cars and stuff there.

I worked on companies that had developed software with bugs and everybody knew about them, but they didn’t fix the bugs. It isn’t just about the bugs, but also bad architecture, bad code design and so on.

The situation is the same, if someone leaves a broken window in your software, it will be an excuse for someone else to leave another one in the future.

DRY — Don’t Repeat Yourself

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system. — The Pragmatic Programmer

The DRY principle is about avoiding copy and paste. When you copy and paste code, you are creating a bunch of problems not just for you but for your team:

  • Increase debugging difficulty,
  • Change the same code twice,
  • Increase redundancy,
  • More time to develop a new feature,
  • Refactor to fix your code to follow the DRY principle,
  • And so on.

You could write DRY in a post-it and place it near your monitor to act as daily reminder for when you’re coding.

Catalyst for change

If something doesn’t make sense, change it. Show people what you got and how it could change something for good, and people will join you. Don’t wait for someone else, get up and do it yourself.

Knowledge portfolio

An investment in knowledge always pays the best interest — Benjamin Franklin

A pragmatic programmer is always learning something, the book compares the knowledge portfolio with a financial portfolio following these principles:

  • invest regularly — it is about always learning something.
  • diversify — don’t learning everything about a technology and nothing about others, you must find some balance.
  • manage risk — watch out when using new technologies, it can be not as good as you think. Be critical about them.
  • buy low, sell high — learn technologies in an early developing state and help the community create the future. Have you ever heard about Elixir?
  • review and rebalance — Review your knowledge.


A large part of our day is spent communicating, so we need to do it well — The Pragmatic Programmer

The book also presented some ideas to better communication:

  • know/plan what you want to say,
  • write an outline,
  • ask yourself: Does this get across whatever I’m trying to say? Refine it until it does,
  • know your audience, understand the needs, interests and capabilities of your audience.

Know more than one language

The limits of languages influence how you think about a problem. — The Pragmatic Programmer

Every programming language has it’s particularities. Knowing more languages will open your mind to different ways to solve problems.

Use one editor well

Choose an editor, know it well, and use it for all editing tasks.

Using a single editor with a set of key bindings for all code editing activities, makes you able to not stop and think about how to accomplish the text manipulation: the necessary key strokes will be a reflex. Let your editor be part of your hands.

Good editors have these following features:

  • configurable,
  • extensible,
  • programmable.

A language to learn this year? Learn the language your editor uses.

I encourage you to buy and read The Pragmatic Programmer by Andrew Hunt and Dave Thomas , there are much more awesome topics that you can learn about, also you can get deeper in the topics presented in this post.

It’s one of my favorite books. It’s essential to anyone who wants to be a great programmer.