Every person has a unique, individual style of writing their code. Think of it like writing a novel — every author has a different voice. Because of this, it can be jarring to read someone else’s code. We all think that our code makes perfect logical sense, but someone else might not.
Programmers comment their code to make up for this gap, and we expect our students to develop strong commenting practices. This will help you understand your own code as much as at helps us. You should be able to explain to another developer what every function, statement, or expression is doing. As you get into the habit of commenting, you’ll notice ways to reduce complexity and create more clean code. It will make you a better programmer.
How to Comment Your Code
Confused about how you should comment your code? Here’s an example:
…