The Most Bizarre Variable Names Ever Seen – A Humorous Showcase
This article collects a series of absurd and creative variable names from various sources, explains the misunderstandings behind them, and shows code snippets that illustrate why good naming matters while providing entertaining examples for developers.
Preface
A good variable name makes reading code pleasant, while a bizarre one can drive a programmer crazy. This piece presents a "Weird Variable Name Contest".
Body
Note: all material is collected from the internet.
First contestant: a corporate data‑center door sign
Image of a door plate with a confusing label.
I guess the manager might be from Hubei.
Second contestant: from a major domestic tech company (Alibaba)
The error message contains the word UnionPay, which caused the UnionPay customer service line to be flooded.
In reality the developer meant an error occurring during a combined order payment.
"Combined payment" in English is "combined payment"; the issue arose because the engineer didn’t recognize the word "combined".
Variable names that act as built‑in obfuscation
Image showing a garbled string that looks like nonsense.
Correct answer:
public String calculateTomAndJerryHappyTogetherTotalTimeAndReturnToThePreviousLevel(){}Many think this is redundant code.
xxxxxx = "网络操作维护中心(主任室)" # 消息详细信息I’d rather use Chinese variable names
C language example:
int deit; // deit -> date
int riqi; // riqi -> 日期Another snippet:
lv = 0x33FF33A Python contestant’s variable red = 0xFF0033 revealed that lv actually meant green.
Stop using pinyin naming!
Examples of pinyin variable names:
let JianCeNianDu = ...;
let NongTianChanLiang = ...;
let DiKuaiBinaMa = ...;
let FeiLiaoHanShuiLv = ...;Shortened versions:
let jianCeiNianDu = ...;
let nongTianChanLiang = ...;
let diKuaiBianMa = ...;
let feiLiaoHanShuiLv = ...;Further abbreviated forms:
let jcnd = ...;
let ntcl = ...;
let dkbm = ...;
let flhsl = ...;Chinese characters as variable names are actually great
A former sales‑turned‑developer used pinyin naming for a class Dingdan (order) with fields like yuanliaomingcheng, chanpinshuliang, etc.
After being told to stop, the code was rewritten using Chinese characters directly:
class 订单 {
private String 原料名称;
private int 产品数量;
private double 产品价格;
private long 产品销量;
private int 是否售出;
}Pinyin naming without tones
Adding tone numbers (1‑4) to pinyin variables:
Most programming languages now support Unicode identifiers, so using Chinese characters is better than pinyin or its abbreviations.
Naming method from the “Dou Shuai Gong” (Eight Trigrams)
the_eight_divinatory_sybmol_000
the_eight_divinatory_sybmol_001
... (up to 111)These correspond to the eight trigrams:
the_eight_divinatory_sybmol_000 = "坤"
the_eight_divinatory_sybmol_001 = "震"
the_eight_divinatory_sybmol_010 = "坎"
the_eight_divinatory_sybmol_011 = "兑"
the_eight_divinatory_sybmol_100 = "艮"
the_eight_divinatory_sybmol_101 = "离"
the_eight_divinatory_sybmol_110 = "巽"
the_eight_divinatory_sybmol_111 = "乾"These are the eight symbols of the Bagua diagram.
In a game‑development codebase the same trigrams can be written as trigram_sun (乾), trigram_moon (坤), trigram_water (坎), trigram_fire (离), trigram_wind (巽), trigram_mountain (艮), trigram_thunder (震), trigram_marsh (兑).
Conclusion
Through this article you should now see how variable naming can be both creative and problematic, and why clear, meaningful names are essential for maintainable code.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
