Lately, we often compare the time spent reading code versus the time spent in writing code. And, we somehow lump together the actual reading of the code with reasoning about the code. But, if we look closely, these are very different activities.
We discuss too much about reading code but too little on what it means to reason about code. This article tries to explore a few aspects of what it means to reason about code. I’ll try to propose a new metric for code complexity that can be formalized (to some degree) and another metric that seems more appropriate to our cognitive behaviours.
This was one of the articles that I had a lot of fun writing. Although the idea of the article had a long gestation period, the results of the article were not clear to me when I started writing it. The writing of the article leads to clarify most of the ideas and find out new things. A truly enriching experience.