Good code is its own best documentation. As you’re about to add a comment, ask yourself, “How can I improve the code so that this comment isn’t needed?”

Steve McConnell

Chapter 3Use Comments Wisely

One of us (Jörg) recently bought a new TV—a smart TV with all kinds of apps, streaming services, and different ways to program a time-based video recording. Turns out, this smart TV is only as smart as the person using it, and learning how to get all the new features to work isn’t all that straightforward. You’d have better luck teaching yourself a few new swear words than finding the folder where the TV stores a new recording. And why doesn’t it warn you that it’s going to stop recording if you hit the Power button?

That’s when most people pick ...

Get Java By Comparison now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.