Theoretically Speaking — Clean Code & Clean Architecture

Clean Code, Clean Architecture
Image Credits:


  1. Minimise chaos and maximise stability & agility of the application.
  2. Ensure a steady speed of development for each sprint, counted by the number of features added. Each new feature addition should require a similar amount of effort.
  3. Need for refactoring or redoing an application in future should be eliminated.


Clean Code
At this point, the code in each component will be in a state where understanding and modifying the behaviour of the code should be straightforward. Documentation should not be required to explain the structure or logic of the code. Coding conventions and formatting should be standardised for all programming languages used. Any new additions made to the code should not change the state from “clean code” to “almost clean code”.


Cost of feature development and cost per release keeps on increasing if the code and architecture are not clean. Maintainability also becomes a challenge. Adding a new developer doesn’t necessarily mean an increase in the speed of development. As the amount of features increase, the amount of “oh no”s with each new feature request also increases.


To understand a single use case within a component, if the programmer has to read and understand the entirety of the code, then it needs to be refactored.

  • Just read the title and get a rough idea about the topic
  • Continue to read the summary and get some more details
  • Continue to read the full article to know each & every detail
  • Click on reference links to further dig deeper into the topic


If at any point, the current state of the architecture becomes a hurdle in adding a new feature into the application, it’s time to re-architect. The goal of this process is not to optimise the state of the architecture for the current feature additions, but instead to evaluate what went wrong at the core of it and resolving it in a holistic manner in order to ensure such incidents in future are minimised.


Following the Agile process of development, an application might go through a number of iterations of re-factoring and re-architecting. If the ideologies mentioned above are followed in each iteration, the architecture and code would always remain clean. After a number of iterations, the entire process would become repeatable and hence, scalable & sustainable.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
LiftOff LLC

LiftOff LLC

We are business accelerator working with startups / entrepreneurs in building the product & launching the companies.