Back to articles
Software EngineeringBest PracticesClean Code

Six Pragmatic Tips on Writing Software Better

June 9, 2026

Six Pragmatic Tips on Writing Software Better

The Pragmatic Programmer by David Thomas and Andrew Hunt is filled with 100 practical tips for becoming a more fulfilled and better programmer. First published in 1999, it remains a classic for software engineers who want to improve their code. With topics covering planning, work-life balance, testing, coding, and project management, it offers a shallow overview rather than a deep dive — exactly what I needed at this point in my engineering path.

Here are six pragmatic tips that helped me the most, focused on writing actual lines of executable code.

Don't Repeat Yourself (DRY)

DRY points out the need to remove redundancy in code. Any time you find yourself writing similar code in multiple places, it's time to refactor. If the same chunk of code appears in several functions, extract it into a single function that gets called from multiple places. That way, you don't have to make changes in many places if something needs updating. DRY not only saves time but also reduces the possibility of errors, since there is less code to maintain and test.

Orthogonality

In software design, orthogonality means that changes in one part of the system have no side effects on other parts. It's about modularity and independence. If you design systems with orthogonal parts, you can modify or replace one without worrying about unintended side effects elsewhere. Separating business logic from user interface code, for example, improves flexibility and maintainability. Orthogonal design keeps code clean and understandable, makes it easier to scale projects, and prevents technical debt.

Broken Window Theory

The Broken Window Theory talks about the importance of code quality maintenance. If a broken window is not repaired, it signals negligence, and soon more serious damage follows. In programming, small problems in your code must be addressed as soon as possible to avoid degradation of code quality. The habit of regular cleanups and dealing with problems immediately after they appear allows you to maintain higher code quality over time.

Testing

Testing is essential to good code writing. TPP covers this under the headlights metaphor: just as headlights help you see down the road and stay out of trouble, testing lets you catch mistakes early. The book covers unit tests, integration tests, and acceptance tests and their place in development. Testing is a safety net that enables refactoring and changes with confidence — if you make a mistake, the tests will pick it up. A robust testing strategy makes your code reliable and maintainable, and encourages you to change code without the constant fear of breaking the whole application.

Pragmatic Starter Kit

The Pragmatic Starter Kit is a set of tools and practices for writing better code: version control, debugging tools, and automation frameworks. The key is to find the right tools so you can focus on the actual work and achieve higher productivity. Test automation, for instance, takes away lots of boring repetitive work.

You Are in Charge

Take responsibility for your coding practices and your career. Be curious about new trends and ready to adapt to new technology. Take care of your craft and aspire to do it right. Stay in control of your work environment and change it if needed. If your work is soul-sucking boring, dare to change it. Say if you can't do something and be honest with your customer. If you chose the path of software, why not do it properly?

Conclusion

I finished reading with mixed feelings. On one hand, I'm excited to try out all the new knowledge on real projects like Kulturdepot. On the other hand, I am overwhelmed with all the topics that need to be considered to become a good programmer.

Software engineering is far more than just learning new programming languages and libraries. It is the ability to break down reality and grasp the logic behind it. It is the ability to critically question one's own assumptions and ways of working. It is the ability to grasp human needs and satisfy them with the help of powerful technology.

Used correctly, it can make a valuable contribution to humanity.