#26: Readability
Welcome back to The Coder Cafe! The theme of the week is code health. Today, we will delve into the precious concept of readability.
I don’t know about you, but I find it quite common to hear and read the term readability. For example, in pull requests:
While this message could probably be improved1, the main message is here: “your code is not readable“.
Why is readability important? Code is read far more often than it is written. Hence, writing readable code is crucial as it makes maintenance easier and cheaper. A quote I like from the Clean Code book sums it up well:
Making your code readable is as important as making it executable.
Now, let’s discuss what it means for a code to be readable. My favorite definition of code readability is how easy it is for a human reader to understand the intent (what), rationale (why), and logic (how) behind a piece of code:
Keep reading with a 7-day free trial
Subscribe to The Coder Cafe to keep reading this post and get 7 days of free access to the full post archives.