Tech Lead Journal cover image

#122 - Essential Things Every Software Engineer Should Know - Kevlin Henney

Tech Lead Journal

CHAPTER

Is There a Need for a Comment?

There's a communication gap between what I'm looking at on the screen and what I want to communicate. That doesn't mean you need a comment, it just means there's a shortfall in communications. Comment only what the code cannot say; not what the code does not say, but what can't it say? In other words, if I've got a variable A and I put a comment, A is for altitude, then I'm apologizing for the code. Why don't I call it altitude? There you go. You've said everything you possibly could. Whatever is left is the thing that cannot be easily communicated that you couldn't say in the language. Now you have your comments back

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner