Self-Explanatory Variable Names Taken to Absurd Extremes
Why is this CodeQuality meme funny?
Level 1: Mixed-Up Labels
Think about having a bunch of jars in your kitchen that you want to label so you know what’s inside. Your friend advises, “Make sure the labels are easy to read and self-explanatory.” Now imagine you label one jar as “sugar,” the next one “Sugar,” and another in a wEiRd MiXeD case “SuGaR.” Technically, all those labels spell “sugar,” but it looks super messy and anyone else would be totally confused – they might even wonder if you meant three different things!
That’s exactly the joke here: in a piece of code, someone was told to use clear, self-explanatory names. Instead, they wrote the words “self explanatory” with different random capital letters each time. It’s like a kid trying to follow instructions but doing it in a silly way. The humor comes from seeing how a simple rule (make names clear) can go terribly wrong if you don’t follow a consistent style. In normal life, it’s as if you’re labeling the same thing in ten different goofy ways – funny to look at, but definitely not helpful for anyone trying to understand what’s what!
Level 2: CamelCase Chaos
Let’s break down what’s going on for those newer to the chaos of coding conventions. In programming, naming conventions are agreed rules for how to name your functions and variables so that code is consistent and easier to read. For example, you might have heard of CamelCase or PascalCase: these are ways to capitalize the letters in compound words. In camelCase, you start with a lowercase letter and capitalize the first letter of each subsequent word (e.g. selfExplanatory or thisIsAnExample). In PascalCase, you capitalize the first letter of every word, including the first one (e.g. SelfExplanatory or ThisIsAnExample). There’s also the screaming ALL_CAPS style (often with underscores, like SELF_EXPLANATORY) usually reserved for constants or macros. Each programming language or project usually picks one style for consistency.
Now, what did the meme show? Four lines of code where the function name and its parameter (selfExplanatory in various forms) are written with different combinations of upper and lower case letters:
selfExplanatory(selfexplanatory);– function name in camelCase, parameter name all lowercase.seLfExplanatory(selFExplanatory);– random mix of upper/lower in both (this is basically inconsistent_casing on purpose).selfexplanatory(SELFEXPLANATORY);– function name all lowercase, parameter in ALL CAPS.sElfExplanatory(selfExPLANatory);– more chaotic mixing (almost looks like someone’s banging on the Shift key at random).
After these, the user asks: “Am I doing it right?” 😂 They’re joking, of course. The code is a self_explanatory_naming_fail – it demonstrates exactly how not to follow the advice "names should be self explanatory." Instead of giving variables meaningful names like userCount or calculateTotal(), they literally used the words "self explanatory" and just toggled letter cases. Without context, none of those weirdly cased names actually tells you what the function or variable does. It’s mocking a scenario where a developer follows the letter of the advice (“use self explanatory names”) but not the spirit (actually describe the purpose).
For a junior developer or someone new to style guides, the key takeaway is: be consistent with naming. If your project or language says use camelCase for variables and functions, stick with selfExplanatory everywhere, not sometimes SelfExplanatory or SELFEXPLANATORY. In languages like C, C++, Java, JavaScript, and many others, identifiers are case-sensitive. This means myVar, MyVar, and MYVAR are three completely separate names to the compiler/interpreter. If you declare int studentCount = 5; and later try to use StudentCount, you’ll get an error – the language thinks it’s a different variable (or in JavaScript, you might unintentionally create a global variable or get undefined). In our meme’s code, if this were actual C code, each function call would be calling a different function entirely (since selfExplanatory vs sElfExplanatory are distinct). That’s a recipe for confusion and likely bugs.
This is why teams have CodeStyleGuides and use tools like linters. A linter is a tool that automatically checks your code for style issues and potential errors. If we ran a linter on the meme’s code, it would light up with messages like a Christmas tree. Common rules a linter or code review might enforce include:
- “Function and variable names should use a consistent style (e.g., all camelCase).”
- “Avoid names that differ only by case. e.g., having
dataProcessorandDataProcessorin the same codebase is confusing.” - “Use descriptive names: the name should indicate what the code does (e.g.,
calculateSalary()instead ofdoThing()).”
In the Reddit thread (this is from r/ProgrammerHumor), developers are bonding over this joke because they’ve experienced the readability_over_convention dilemma. Ideally, readability comes from convention: if everyone names things consistently, code is easier to read. But here convention is thrown out the window, so even though selfExPLANatory contains recognizable words, it’s jarring to read. It’s like each line violates the Principle of Least Astonishment – nothing is where your brain expects it. The humor has an element of snarky code_review feedback: it’s as if the reply is saying, “You wanted self-explanatory names? Fine, I’ll literally use ‘selfExplanatory’ everywhere!” – a bit of code_review_snark.
For a newer dev, it’s important to realize this is a tongue-in-cheek example. In real code, if you wrote names like this, your teammates (and continuous integration bots) would likely respond with confused looks and many comments. You’d probably be asked to rename everything consistently before merging your code. If not, six months down the line, someone (maybe future you) will be scratching their head trying to remember if SELFEXPLANATORY was meant to signal a constant or if it was just an oddly capitalized variable. This kind of inconsistency is how small confusion today snowballs into TechnicalDebt tomorrow – little cleanliness issues that accumulate and make code harder to maintain.
So remember: “self-explanatory” naming means the name should explain the code’s purpose, not literally contain the words ‘self explanatory’! 😅 Use clear words related to the functionality, and stick to one consistent casing style throughout your project (whether that’s camelCase, PascalCase, snake_case, etc., as agreed). Your future self and fellow developers will thank you — and you’ll avoid unintentionally becoming the star of the next CodingHumor meme about wacky VariableNaming!
Level 3: Case of Mistaken Identity
In this meme, a simple code review mantra – “Your function and variable names should be self explanatory” – gets hilariously twisted. The reply shows code with wildly inconsistent casing:
selfExplanatory(selfexplanatory);
seLfExplanatory(selFExplanatory);
selfexplanatory(SELFEXPLANATORY);
sElfExplanatory(selfExPLANatory);
// "Am I doing it right?"
Here the developer literally uses the phrase "selfExplanatory" as identifier names, but with every possible mishmash of upper/lower casing. It’s a tongue-in-cheek way of saying, “Look, I made them self explanatory... by naming everything 'selfExplanatory'!” Senior engineers see the sarcasm: this is naming conventions gone off the rails.
From a senior perspective, the humor cuts deep. It satirizes that infamous truth: “Naming things is one of the two hard problems in Computer Science” (right up there with cache invalidation and off-by-one errors). We’ve all seen well-meaning guidelines backfire without proper context. In a serious code review, telling someone to use self-explanatory names is about choosing clear, descriptive identifiers. But taken too literally (or mischievously), you get a CamelCase hydra of selfExplanatory variants attacking code clarity. This snippet is a caricature of what happens when there's no agreed CodeStyleGuide: each developer might invent their own convention for the same word. The result? CodeReadability hell.
Why is this so painfully relatable? Because veterans have battled similar beasts in real codebases. Imagine a large poly-repo architecture where each team or microservice used a slightly different naming style. One module calls a helper function getData, another has GetData, and somewhere else someone defined GETDATA as a constant – all referring to similar concepts. Without a unified convention, reading across code feels like changing languages mid-sentence. Maintainers start second-guessing: Is ProcessID the same as processId? Or are they different variables? In a case-sensitive language (like C, C++, Java, or JavaScript), case differences create entirely separate identifiers. That means selfExplanatory and SelfExplanatory could be two distinct functions or variables. If a tired dev accidentally calls the wrong-case version, the compiler won’t complain – it’ll assume you meant a different thing. 🙃 This opens doors to bugs that are frustratingly hard to spot (ever debug for an hour to realize you capitalized one letter wrong?).
For seasoned engineers, this meme also conjures the horrifying image of linter warnings everywhere. Any decent linter or static analysis tool would be apoplectic at this code:
- “Warning: Inconsistent naming convention. Pick camelCase or PascalCase and stick to it!”
- “Error: Identifier
seLfExplanatorydoes not match naming style (did you meanselfExplanatory?).” - “Warning: Identifiers differ only by case – this is a CodeMaintainability nightmare.”
In fact, many teams outright ban names that differ only by capitalization to avoid exactly this confusion. It's not just pedantry: it’s preventing future bugs. Consider cross-platform issues too: on Windows (case-insensitive file system) vs Linux (case-sensitive), having two files or identifiers whose names differ only in case can be a deployment fiasco. Seasoned architects know these little inconsistencies are technical debt seedlings – plant one today, and you’ll be painfully weeding it out from your code forest for months or years.
The meme’s title nails it: ten camelCase catastrophes for architects. It’s exaggerating, but we get the point – if you allow naming chaos, you end up with a zoo of slightly-different identifiers that only the original author finds “self explanatory.” The rest of the team? They’re lost in a maze of fleeting capital letters, chasing down whether SELFEXPLANATORY was a constant or just someone screaming. 😅 Senior devs have been in those WTF code reviews where you stumble on something like:
UserDAO userDAO;
UserDaO UserDao;
(yes, that actually compiles – and no, it’s not fun.)
Ultimately, this level of humor lands because it’s so true: a platitude like “use self-explanatory names” sounds great in theory, but without concrete conventions and enforcement, it can devolve into pure nonsense. The veteran chuckles, then quietly schedules a meeting to update the team’s naming conventions document. After all, avoiding a “Case of Mistaken Identity” in code is key to CodeQuality and keeping the codebase sane.
Description
A screenshot from ProgrammerHumor.io showing a Reddit-style thread. The original post by ecky--ptang-zooboing (682 upvotes, 29 comments) states: 'Your function and variable names should be self explanatory.' A reply by Seradwen (58 upvotes) takes this literally by writing function calls using every possible capitalization variant of 'selfExplanatory': 'selfExplanatory(selfexplanatory);', 'seLfExplanatory(selFExplanatory);', 'selfexplanatory(SELFEXPLANATORY);', 'sElfExplanatory(selfExPLANatory);' followed by 'Am I doing it right?' A third user JustAnotherPanda replies with just '(' expressing despair. The joke plays on case-sensitivity in programming and the gap between naming advice and naming practice
Comments
11Comment deleted
There are only two hard problems in computer science: cache invalidation, naming things, and consistent capitalization of selfExplanatory
This isn't camelCase or PascalCase; it's ransomNoteCase, and the only demand it makes is for the linter to be disabled and the PR to be approved out of sheer exhaustion
Pro tip: if your identifier shows up in four different case-sensitive permutations, congrats - you’ve implemented Schrödinger’s function: simultaneously readable and unbuildable until the CI collapses the waveform
This is what happens when you tell a senior engineer their code needs to be 'self-documenting' one too many times - they create functions that literally document nothing but their own existence, achieving perfect semantic accuracy while violating every principle of useful abstraction
When your tech lead insists on 'self-documenting code' so aggressively that you end up with `selfExplanatory(selfexplanatory)` - because nothing says 'maintainable codebase' quite like a function that takes itself as a parameter with varying capitalization. It's the programming equivalent of 'this sentence is false,' except your linter is now having an existential crisis and your code reviewer just filed for early retirement
“Self-explanatory” works great - right up until the case‑sensitive runtime, a case‑insensitive DB collation, and your grep pattern all disagree about which SELF you meant
selfExplanatory(selfExplanatory): the polymorphic variable that outlives any style guide or linter
Encoding meaning in capitalization is human-only obfuscation - the cheapest refactor is a good noun, not a new camel
so far so good Comment deleted
Self(explanatory); Comment deleted
self::explanatory(); Comment deleted