Skip to main content

Command Palette

Search for a command to run...

Clean Code Tip 5: Write code for other people and your future self

Published
1 min read
Clean Code Tip 5: Write code for other people and your future self

Code should be written with the understanding that it will be read and maintained by others, not solely by its original author. It is insufficient for only the author to comprehend the code at the time of writing; future readability, even years later, is essential. Code must also be accessible to all team members, regardless of their experience level or familiarity with the programming language. To evaluate code clarity, consider whether someone less proficient in the language can understand it. Soliciting feedback through code reviews is an effective strategy for assessing code clarity. One informal metric for code cleanliness is the number of WTFs (What the f*cks) per minute expressed by reviewers. A high frequency of such reactions indicates that the code may lack clarity.


If you are interested in reading more about clean code, grab yourself a copy of my 140 Tips For Clean Code booklet.

More from this blog

C

Code Clarity Club

11 posts

This blog is about Clean Code and Code Clarity. Learn how Clean Code is not just an aesthetic choice but a professional advantage.