Writing code that is easy to read is a critical step for producing high quality software. Code that is hard to read is difficult to reason about (both for yourself and your code reviewers), which makes it more likely that bugs will escape detection and affect users. Code that is hard to read is also difficult to change (since it is hard to understand), which makes it more difficult to add new features that users want or even to fix bugs in the code without introducing more bugs.

Overview

The readability review you will receive in this course focuses on two main aspects of writing readable code.

Reviews

Below, we describe in more detail the particular elements that we will check for.

Naming

Formatting

Indenting

Commenting