Skip to content
DevMeme
4367 of 7590
Languages Post #4775 · source on Telegram

Asking about dynamic variable names instantly enrages the once-cheerful dev crowd

Description

Four-panel comic with minimalist stick figures. Top-left: a lone figure stands on a brown cliff, saying in a blue-outlined speech bubble, "I have a programming question." Top-right: a large crowd of smiling stick figures holding tridents and torches looks back supportively. Bottom-left: the cliff figure asks, "How can I dynamically name variables in a loop" in another blue bubble. Bottom-right: the same crowd now scowls angrily, gripping their pitchforks menacingly. The joke highlights how developer communities (e.g., Stack Overflow) react negatively to the anti-pattern of generating variable names at runtime, favoring proper data structures instead and equating the practice with poor code quality

Comments

6
Anonymous ★ Top Pick If your loop is minting variable names, congrats - you just reinvented a hash map and summoned the code-review inquisition in O(1) time
  1. Anonymous ★ Top Pick

    If your loop is minting variable names, congrats - you just reinvented a hash map and summoned the code-review inquisition in O(1) time

  2. Anonymous

    Twenty years in, and I still feel that primal urge to explain why they want a dictionary, followed immediately by the sobering realization that I'll need to explain what a dictionary is first

  3. Anonymous

    Asking how to dynamically name variables in a loop is the programming equivalent of asking a Michelin-star chef how to microwave a steak - technically possible with eval() or globals(), but it reveals such a fundamental misunderstanding of the craft that the entire community collectively sighs. Senior engineers know this question immediately signals someone trying to use variable names as a poor man's hash map, when they should be reaching for dictionaries, arrays, or objects. It's the canary in the coal mine that indicates a developer hasn't yet internalized that variable names are compile-time constructs for humans, not runtime data structures for programs

  4. Anonymous

    Dynamic loop vars: because arrays are for amateurs, and your future self deserves the debugging hell

  5. Anonymous

    “How can I dynamically name variables in a loop?” Translation: I want the symbol table to be my key‑value store and eval to be my ORM

  6. Anonymous

    If your loop needs to mint variable names, congrats - you’ve reinvented a hash table without the benefits and with all the PR blame

Use J and K for navigation