I worked with a developer who insisted on using the shortest names possible. God I hated debugging his code.
I’m talking variable names like AAxynj. Everything looking like matrix math.
123 0 ReplyNah, I name all my variables after my homies.
int dave = 0;
75 1 Replyinstalling operating system: 15 minutes, give or take.
give a name to the computer: 45 minutes
55 0 ReplyYou should really be naming all your variables by generating 64 character (minimum) random strings.
51 0 ReplyFullSentenceExplainingExactlyWhatItDoes(GiveThisVariable, SoItCanWork)
41 0 ReplyOlder C compilers would truncate a variable name if it was too long, so
VeryLongGlobalConstantInsideALibraryInSeconds
might accidentally collide withVeryLongGlobalConstantInsideALibraryInMinutes
.Legend says that they used to do it after a single letter with Dennis declaring "26 variables ought to be enough for anyone".
38 0 ReplyGotten even easier after X became a registered trademark. Now the only choice we have left is i. Or ii if you need more variables
30 0 ReplyThen you realize your code is undebuggable because half the functions and variables have single-letter names or called
foo
,bar
,baz
, etc.29 2 ReplyAn important professor constantly and frustratingly said
we can call this variable whatever we want, so we’ll call it
Fred
Made me panic and irate and focus on the wrong part of the problem. Every. Single. Time.
27 0 ReplySingle character variable names are my pet peeve. I even name iterator variables a real word instead of “i” now.. (although writing the OG low level for loops is kinda rare for me now)
Naming things “x”.. shudder. Well, the entire world is getting to see how that idea transpires hahah
28 1 ReplyThere are only two hard things in computer science: cache invalidation and naming things.
24 1 ReplyWhy is no one giving credit to my friend
n
?!21 0 Replyname your function as
malloc()
and see to world burn and generate bugs at factorial rate.20 0 Replyfor whatever in stuff:
17 0 ReplyHow to write spaghetti code:
17 1 Replymathematician here, where is the joke?
15 0 ReplySince a lot of the english words i know i learned from minecraft, in a farming simulator i named tilled soil"hoed"
I had multiple variables like int isHoed
15 0 ReplyJust be careful naming your function "stdout()" or things could get weird...
9 0 ReplyNow I want to become a programmer so I can give variables people names.
9 0 ReplyNo, that's math.
8 0 ReplyAm I being gaslit?
8 0 ReplyWas just talking about gaming genre names being kinda lame (roguelike? Souls-like? Where's the originality?!) and this just furthers my point as programming and video games are intrinsically linked.
6 1 ReplyI present to you quality variable names. (and a Mount Rustmore)
(Reconfigure(f), 'c') => { let mut p: Vec<&str> = vec![]; loop { match args.next() { Some(k) => { if k == "=" { match args.next() { None => q("need value for Rc"), Some(v) => u( f, |f| Box::new( |c| { f(c); c.set(p.iter().copied(), v); for e in p { unsafe { Box::<str>::from_raw( std::mem::transmute(e) ); } } } ) ) }; break } else { p.push(Box::leak(k.into())); } } None => error("need path element or = for Rc"), } } },
3 0 Reply^- triggered
4 1 ReplyIt took me too long to figure out the I in an if statement was just integer
3 0 ReplyOk, but what variable is 🐈?
3 0 ReplyHow dare you.... <Eye squint>
1 0 ReplyPermanently Deleted
1 0 Reply