DEV Community

Tonny Kayage for ClickPesa

Posted on • Updated on

Clean Code: Introduction to clean code

At ClickPesa we strive to write scalable, performant and maintainable code. We try to maintain great standards inorder to enhance the quality of our products.

I have recently picked up the "clean family” books written by Robert C Martin. The books are Clean Code, Clean Architecture and Clean Coder. I will share my thoughts and insights i gain from these books as i go through them while also trying to incorporate the lessons i deem workable. I have added links to where you can also get them in the conclusion section of this article depending on your favorite mode of consumption (Audiobook or Kindle).

What is Clean Code

These are principles, patterns, and practices of writing readable and maintainable code. Clean code can be easily picked up by any team member to further add features. This helps create uniformity in the team in terms of Coding style and patterns.

Importance of Clean Code

  1. Uniformity of code among the team contributing to the same codebase. As mentioned earlier stick to patterns already existing in the codebase. Unlike building components that are dissimilar. This aids in onboarding new team members into the team.

  2. Swappable technologies can be easily integrated/removed from the codebase without affecting the business logic. Let's say we have a system that utilizes a certain Queuing technology in our application but a recommendation from a consultant wants the team to utilize emerging exciting technology. This new exciting technology can be easily introduced without touching any logic that utilizes it if clean code was used.

  3. Software development is a continuous process and requirements are ever-changing. It is a measurable task with an associated cost to each feature developed. The cost for each modification of the codebase should always be constant over time. Poorly written/organised codebases are characterized by more escalating costs of change with relation to time. The graph below explains such phenomena:
    Cost vs Time

As the graph explains developers that maintain clean code throughout their development cycles usually maintain speed and efficiency in software delivery.


As a professional developer, your job is to maintain high code quality and structure. Business teams usually pressure developers into delivering services but you should always maintain your stance of maintaining great standards. At the end of the day, the same business personnel pressuring you to produce more deliverables without standards will come and ask you to modify the same codebase with them expecting it to be a trivial task simply because you have already implemented some parts of the feature. To them, you are simply adding to what exists.

In the next chapter we will dive deep into more concepts explained the book and how we have tried to use them in our projects at ClickPesa.

Additional resources that i also found useful including the books from amazon.

For the next chapter of this series or similar articles like this please checkout our Engineering Blog available on:

Top comments (0)