Surprising similarities between ‘CLEAN Code’ principles and Sanskrit Grammar ‘Sutras’

Aditya Joshi
Butterfly Effect | MetaMorphoSys
2 min readApr 15, 2023

Every hard-core software developer knows about ‘CLEAN Code’ principles.

The term “CLEAN code” was introduced by Robert C. Martin in his book titled “Clean Code: A Handbook of Agile Software Craftsmanship”.

The principles of CLEAN code emphasize on writing code that is easy to read, understand, and maintain. The acronym “CLEAN” stands for the following:

  • C onsistent: Code should be consistent in style, naming conventions, and formatting throughout the project.
  • L ess complex: Code should be simple and easy to understand.
  • E ffective: Code should be written with the intention of solving the problem at hand.
  • A void redundancy: Code should not have any redundant or unnecessary code.
  • N aming conventions: Code should be named in a way that is easy to understand and descriptive.

By adhering to the principles of CLEAN code, developers can produce code that is easier to read, maintain, and debug.

Now, here is the interesting part —

Ancient Indian concept — Sutras (Principles) hold the same similar principles as mentioned in Harinamamrita Vyakaranam

‘स्वल्पाक्षरं असन्दिग्धं सारवद्विश्वतोमुखं अस्तोभमनवद्यञ्च सूत्रं सूत्रविदो विदुरिति माध्वभाष्योक्तम् ।

Isn’t it interesting?!

Reference: Clean Code: A Handbook of Agile Software Craftsmanship, Project Shivoham (Project Shivoham)

--

--