Skip to content
DevMeme
4888 of 7590
CodeQuality Post #5350 · source on Telegram

Code Comments: For Clarity vs. For Absolution

Description

This meme utilizes the popular 'We Are Not the Same' format, which features a stern, well-dressed Giancarlo Esposito as the character Gus Fring from the 'Breaking Bad' series. The image is split into three parts with large, white, impactful text. The top text reads, 'YOU WRITE COMMENTS TO EXPLAIN COMPLEX CODE'. The middle text contrasts this with, 'I WRITE COMMENTS TO JUSTIFY THE USE OF ANTI-PATTERNS'. The punchline at the bottom declares, 'WE ARE NOT THE SAME'. The humor is rooted in the stark difference between two developer mindsets. The first is the idealistic, by-the-book developer who uses comments to aid understanding, adhering to clean code principles. The second represents the battle-hardened, pragmatic senior developer who has been forced by deadlines, legacy systems, or other constraints to implement a solution they know is flawed (an anti-pattern) and uses comments as a form of self-defense or a warning to future developers. It's a cynical but highly relatable take on the realities of software development

Comments

14
Anonymous ★ Top Pick Some comments are for future developers. My comments are for my future self during the post-mortem, serving as a formal apology to the SRE team and a justification for my continued employment
  1. Anonymous ★ Top Pick

    Some comments are for future developers. My comments are for my future self during the post-mortem, serving as a formal apology to the SRE team and a justification for my continued employment

  2. Anonymous

    My favorite design pattern is the comment that begins, “Due to business constraints…”, instantly upgrading any God Object into a strategic monolith

  3. Anonymous

    The best code comments are the ones that start with "Yes, I know this violates SOLID principles, but the deadline was yesterday and the PM promised the client we'd have real-time updates without mentioning we're still on a shared hosting plan from 2009."

  4. Anonymous

    The difference between a senior engineer and a principal engineer: one writes comments explaining *why* the code is complex, the other writes comments explaining why the anti-pattern was the *least worst* option given the constraints of a legacy monolith, tight deadlines, and that one critical dependency that hasn't been updated since 2014. Both know the code smells - only one has accepted that sometimes you're just documenting the crime scene for the next archaeologist

  5. Anonymous

    My comments aren’t documentation; they’re plea bargains with future me for why we shipped a global Service Locator wrapped in a Singleton

  6. Anonymous

    Comments: because deleting spaghetti code would be admitting defeat

  7. Anonymous

    When your ADR is just // eslint-disable-next-line legacy_global_required_for_deadline, you didn't document intent - you minted a permanent waiver and called it architecture

  8. @kotdath 3y

    I write comments to commit same code

    1. Timur Fatkulin 3y

      You can --allow-empty though

  9. @Obzzzerver 3y

    i write comments to good memes

  10. @callofvoid0 3y

    I write comments to remember wtf I've written the other day

  11. valentyn 3y

    i write comments so my coworkers wont die from depression

  12. @LionElJonson 3y

    complex code kinda is antipattern

    1. @RiedleroD 3y

      idk, sometimes the code has to be complex

Use J and K for navigation