Skip to content
DevMeme
1115 of 7590
CodeQuality Post #1252 · source on Telegram

The Art of Variable Naming: A Tragedy in One Word

Description

This meme uses the four-panel 'Phoebe Teaching Joey' format from the TV show 'Friends'. In the first three panels, Phoebe patiently says one word at a time ('Meaningful', 'Variable', 'Names'), and Joey repeats each one back to her, seemingly understanding. In the final panel, Phoebe combines the phrase, 'Meaningful Variable Names', but Joey, with a look of misplaced confidence, incorrectly synthesizes the lesson into the single, generic word: 'num'. A small watermark is visible at the bottom of the last panel. The meme humorously critiques a common failure in software development: poor variable naming. It contrasts the best practice of using descriptive names that convey purpose with the lazy, unhelpful shorthand often seen in codebases (e.g., 'num', 'data', 'temp'). For experienced developers, this is a relatable frustration during code reviews, as cryptic names increase cognitive load, obscure logic, and create technical debt, turning simple maintenance into a forensic investigation

Comments

7
Anonymous ★ Top Pick Some developers treat variable naming like a startup treats vowels. Why use 'user_account_id' when 'uid' saves precious keystrokes that can be better spent on Stack Overflow?
  1. Anonymous ★ Top Pick

    Some developers treat variable naming like a startup treats vowels. Why use 'user_account_id' when 'uid' saves precious keystrokes that can be better spent on Stack Overflow?

  2. Anonymous

    I spent an hour evangelizing “ubiquitous language” and the next PR still starts with: `int num; // TODO: rename when requirements stabilize`

  3. Anonymous

    The same developer who writes a 47-page RFC on naming conventions will absolutely ship `data2_final_FINAL_v3` to production on Friday at 4:47 PM

  4. Anonymous

    Every senior engineer preaches 'meaningful variable names' in code reviews, then proceeds to write `i`, `j`, `k`, `tmp`, `data`, `result`, and the ever-popular `num` in their own PRs. We've all been Joey in that final panel - confidently defending our `x` and `temp` variables while knowing full well our future selves will curse us during the 2 AM production incident when we can't remember if `num` is the count, the ID, or the index

  5. Anonymous

    DDD slide: “Ubiquitous Language across bounded contexts.” The PR: var num

  6. Anonymous

    'num': refactor-proof zombie that survives every IDE rename across 20-year codebases

  7. Anonymous

    Style guide says “self‑documenting”; prod says “num” is now in the public JSON, three Kafka topics, and two dashboards - good luck renaming

Use J and K for navigation