You Absolutely (Do Not) Need to Comment Your Code

Of course you don’t need comments in your code. But your future self appreciates explanations: What is this nested loop good for? What is its purpose? Comments provide context, and shortcuts for understanding: “you don’t need to read this, just think of it as …” Once you explain what the purpose is, suddenly you may also find a way to express the intent clearly in code.

Continue reading …