Member-only story
The Software Engineer’s Complete Guide to Code Quality
Know the importance of code standards, reviews, documentation, and more

You might not realize it, but you probably know when you see bad quality code. It might be written in a way that doesn’t make sense or be full of errors, excessively verbose, or highly inconsistent in its use of terminology and naming conventions. Fortunately, there are lots of ways you can improve your code quality, make it easier to review and test, and reduce the pain later of having to fix all of the errors. Let’s take a look.
What Is Code Quality?
Code quality refers to the attributes and characteristics of your code. These may differ according to your organization’s specific business focus and the particular needs of your team. While there’s no definitive checklist, there are, broadly, several things that separate good quality code from poor quality code.
Markers of good code
- Clean
- Consistent
- Functional or useful — the code should do what it says it will do
- Easy to understand for users, not just its author
- Efficient — good code is succinct
- Testable — good code should be tested to be free of bugs or defects
- Easy to maintain
- Easy to build upon, reuse or replicate in the future
- Well documented — well written and adheres to agreed-upon standards or a style guide

Notably, all of these markers may mean different things to different people or teams. One person may find code clearly written and easy to understand, while another finds it unclear and thus hard to maintain. But it is helpful to have some parameters to work with.
Documentation, Code Standards, and Style Guides
As Damien Conway describes it, “documentation is a love letter that you write to your future self.” Comments or notes in code are a way to…