DEV Community

Discussion on: Clean code, dirty code, human code

Collapse
 
reubentonna profile image
Reuben-Tonna • Edited

The key is to be pragmatic about writing clean code.

Generally I ask myself 'if I, or someone with the domain knowledge, comes back to this code in 3 months time will we understand it?' If the answer is yes than probably the code is clean (clear) in the true sense.

Sometimes we have to accept some duplication in favour of readability, but then I tend to equate clean code to readable code reflecting the language of the business it is built for so maybe I'm biased :-)