How do we use the principles of clean code

25/03/2021 · 5 min read

There is a well-known proverb in programming theory which states that writing a program is as complicated as the problem itself that we are writing it about. At the ASH Software House, we usually create software solutions for extremely complex problems. There is also the clean code which is very useful and everyone uses it. It helps a lot to make a better quality software product in less time. However, incorporating its elements into everyday work and grinding it smoothly is a lengthy process. It also includes the “trial luck factor”! You need to try and analyze which element can best be lifted, and what modifications need to be made to make it work optimally. By now we achieved that this is the foundation of all our development. So how do we use the principles of clean code to best fit into our workflows?

The clean code can be thought of as a bouquet of recommendations. A huge big bouquet that called the programming experience accumulated over the decades to be kneaded into a unified and digestible form. It has a lot of elements, I would highlight a few of them.

These are perhaps the recommendations we definitely incorporate into our daily work. But how do we organize the workflow itself?

The most important aspect is reusability. One of the main priorities at all our projects is to make the most of the elements and structures we have dreamed be ready for following works. This is how the time invested pays off. To do this, we need to build our data structures with this in mind from the start. As a rule, an object should only implement one function, but that one function should produce the same result in different environments. So we need to analyze all the big work that has already been done and is expected in the future and look for common atomic parts in it. Only units that can be assigned a function that produces idempotent results in any environment that occurs in the course of our work are eligible. This is the hardest part. This is followed by thorough testing and then arranging these building blocks into a unit. Then the integration tests.

What helps to find the aformentioned atomic particles? Of course, we have methods for this that I cannot reveal here in their entirety, just a few details.

Of course, we use a lot more. I don’t want to list them all here, because everyone blows them from the outside :)! For those who haven’t, here are some useful things to read:

  1. Erich Gamma: Design patterns.
  2. Joshua Bloch: Effective java
  3. Robert C. Martin: The Clean Coder: A Code of Conduct for Professional Programmers
  4. Robert C. Martin: Clean Code: A Handbook of Agile Software Craftsmanship
  5. Robert C. Martin: Agile Software Development: Principles, Patterns and Practices

Do you have a question?

1117 Budapest Budafoki út 97.
+36 1 353 9790
The entrance is on Prielle Kornélia street, have a look at the map please.