Code Readability

When I’m on a brand new team, my coding and debugging skills always come in handy. As a software engineer, my ability to code has been the most helpful. When I don’t write a lot of code, I still find it easy and satisfying to read and understand code. This allows me to learn from the ground up, which gives me a boost.

The skills you need to code well are:

  1. You’re able to read and understand your teammates’ code.
  2. Write easy-to-understand code.
  3. Make sure your code is bug-free.
  4. Make it fast so you can experiment.

What’s the most effective way to write? Effective writing is all about clarity. You have to be clear about what you’re trying to do and why. Sometimes you know what you want, but not how it will be implemented or even how it will look. A brand new project’s structure will often need restructuring as you work out details you didn’t think about up front. Once I have more clarity about the details, I always rewrite code for better structure and readability.

When you code, make sure it matches the style of your team and the people who’re going to read it. It’s really difficult for readers to follow you if you stray too far. Introduce new concepts gently and with enough introduction to get people to understand them. For example, I used to work on a team where everyone was new to Python. The team had a hard time understanding Python features like list comprehension and functional programming. After a few training sessions, I was able to get them on board with the concept and I was surprised by the rapid adoption.

Readability is also influenced by vocabulary. You can explain your thought process better on a brand-new project by doing code walk-throughs with your team. Code is much easier to understand and read once the basic structure and vocabulary are in place.