Skip to content
DevMeme
102 of 7435
Variable Naming Enters HR Territory
CodeQuality Post #132, on Feb 15, 2019 in TG

Variable Naming Enters HR Territory

Why is this CodeQuality meme funny?

Level 1: Bad Labels

Imagine labeling a box of toys "kids nobody touched" when you only mean "toys nobody has played with yet." The label might make sense to you, but everyone else will stop and stare. The meme is funny because the programmers are trying to choose a clear name, but every option accidentally sounds worse when read like normal language.

Level 2: The Naming Trap

A variable name is the label programmers use for a value. In many programs, especially ones involving trees or nested data, a parent object can have child nodes. For example, a folder can contain files, an HTML element can contain child elements, and a search algorithm can move from one node to its children.

The first developer is worried about using unexploredChildren because it sounds strange outside the data-structure context. The second developer suggests untouchedChildren, which might sound like a cleaner synonym at first, but it is even more awkward as normal English. That mismatch between technical language and everyday language creates the joke.

For junior developers, this is a useful code-quality lesson: names should be clear to future readers, not just correct in your head. If a name makes people pause for the wrong reason, it will distract from the logic. Code review is not only about whether the program runs; it is also about whether the next person can understand it without wincing.

Level 3: Names Survive Humans

The chat screenshot is funny because both messages are technically plausible and socially disastrous:

i'm contemplating whether or not unexploredChildren is something i want in my codebase

untouchedChildren sounds better

In code, children is a normal term. Trees, DOM nodes, abstract syntax trees, menu hierarchies, file systems, and graph traversals all use parent-child language. A variable like unexploredChildren could easily mean child nodes that have not been visited during a search. The problem is that identifiers are read by humans, copied into logs, discussed in code review, and eventually searched by someone at 2 AM who has not had enough coffee. Context that feels obvious inside the algorithm can look cursed in isolation.

The reply, untouchedChildren, makes the situation worse while pretending to improve it. That is the whole mechanism of the joke: a naming problem is "solved" with a synonym that preserves the technical meaning while making the human reading even more uncomfortable. The compiler will accept it. The linter may accept it. The pull request reviewer, however, now has to type a sentence like "please rename untouchedChildren" and live with that memory.

This is why variable naming is not a cosmetic issue. Good names encode domain intent without dragging accidental meaning into the codebase. Experienced developers tend to prefer names like unvisitedNodes, pendingChildren, childNodesToVisit, or remainingDescendants, depending on the structure. Those names still tell the truth, but they avoid making the code review feel like HR should be subscribed to the repository.

Description

The image is a cropped dark-mode chat screenshot with two blurred usernames, avatars, and timestamps reading "Today at 22:00" and "Today at 22:01". The first message says, "i'm contemplating whether or not unexploredChildren is something i want in my codebase". The reply says, "untouchedChildren sounds better". The joke is about variable naming for child nodes or collections producing phrases that are technically descriptive but socially awkward, reminding engineers that domain terms still need to survive human review.

Comments

1
Anonymous ★ Top Pick The hardest naming problem is when the type system accepts it but Legal should probably get a quick diff.
  1. Anonymous ★ Top Pick

    The hardest naming problem is when the type system accepts it but Legal should probably get a quick diff.

Use J and K for navigation