A significant portion of work within the IT domain consists of handling code. It might be teaching, writing, or reviewing the code.

It is pretty clear how coding is taught; we learn algorithms, theoretical optimizations, and understanding its complexity when it comes to teaching coding—potentially combined with writing code to deepen further understanding. Indeed, this is classical way to introduce new programmers and interview software or prototype engineers for jobs.

Yet, there is a lack of emphasis on developing proper skills in reading (or reviewing) a code. Reading a code is a skill that is an excellent asset for software engineers and others dealing with any form of software code. Being able to read a code comes in handy in many of the typical day-to-day tasks of engineers:

  • Code Review is perhaps the most straightforward task that requires reading and understanding a job.
  • Writing Code becomes an easier job if one is good at reading code. When it comes to an understanding of how to integrate APIs or take over a code written and/or maintained by other engineers, reading a code makes it easier.
  • Security analysis, while not part of the everyday engineer, does require an excellent ability to read and understand code.
  • Debugging is the main task of a sound software engineer as it is all about identifying the expectations of the working code and how it worked. Being good at reading code makes a dramatic reduction in the time it takes to identify an issue.

When one lists the importance of reading code well, it is surprising how little such skill is valued or evaluated in the world. For instance, it is rare that in an interview, a potential candidate is asked to explain a code; or find issues within a code (although this is asked for a security engineer position). Since recent months, I have been able to identify key points that improve code reading abilities, which I have used rather heavily. These points are:

  • Code over documentation. As a general rule of thumb, one always goes for documentation sources for any third-party library or new programming language. A better approach is to read the source code; instead, it provides good practice to understand code quickly.
  • Reading before coding. When picking up a new programming language, it is best to start by reading a decent number of code written in the programming language; before writing code. This promotes a more analytical behavior that puts the mind in the programming languages’ paradigm instead of playing with the language compiler in trial and error mode. It found that going the former dramatically improves the code reading skill.

In conclusion, reading and understanding code is an essential part of an engineer’s job, but we tend to focus too much on improving the way to write code or just in writing code.