Unpopular Opinion: If Your Code Needs Comments, You Wrote It Wrong.

Leader ●1 ●7 ●23
calendar_today β€’ schedule1 min read

Senior devs love saying: "Good code is self-documenting."

My PR with clean, readable code: rejected for lack of comments.
My PR with comments everywhere: "Too many comments, code should speak for itself."

Bro, pick a lane. 😭

The 4 Types of Comments I Keep Seeing:

Type 1: The Obvious
// Increment counter by 1
counter++
Thanks, Captain Clarity. I was lost without you.

Type 2: The Ancient Scroll
// TODO: Fix this later - Jan 2019
Adam from 2019 left the company. So did his TODO.

Type 3: The Confession
// Don't ask why this works. I spent 6 hours. Just trust me.
Honestly? I respect this one.

Type 4: The Liar
// Validates user input
Function literally does 17 things including calling an external API. The comment hasn't been true since 2021.

Here's my spicy take: Comments should explain WHY, not WHAT. The WHAT is in the code. The WHY is the business logic, the edge case, the hack you had to ship at 2 AM.

Change my mind. Or agree with me. Either way, I want to hear YOUR take.

πŸ‘‡ Drop your thoughts:

  • Are comments a sign of good documentation or bad code?
  • What's the worst comment you've ever found in a codebase?
  • Do you write comments first, last, or never?

Let the comment wars begin. βš”οΈ

4 Comments

3 votes
2 votes
0
2 votes
πŸ”₯ Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

Your Tech Stack Isn’t Your Ceiling. Your Story Is

Karol Modelskiverified - Apr 9

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelskiverified - Apr 23

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelskiverified - Mar 19

Your AI Doesn't Just Write Tests. It Runs Them Too.

Kevin Martinez - May 12

Your Backup Data Knows More Than You Think. HYCU aiR Is Finally Asking It the Right Questions.

Tom Smithverified - May 14
chevron_left
1.4k Points β€’ 31 Badges
Zahir Pir, Pakistan β€’ github.com/byllzz
8Posts
16Comments
3Connections
Building performant web experiences with React, TypeScript, Tailwind, and open source.

Related Jobs

View all jobs β†’

Commenters (This Week)

3 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!