Global variables

08/29/05

Permalink 04:06:39 pm, by NewCore Email , 29 words, 68 views   English (US)
Categories: CORE, Bitching, Work

Global variables

Whoever names variables loop1, loop2, loop3 and TheList, TmpList, Tmp, TmpDictionary, etc should be taken out and shot. Fucking retards. It takes effort real effort to be so useless

Comments, Pingbacks:

Comment from: Roulette [Member] Email
Could be worse. I've seen actual programs with variables like JimBeam, Absolut, Miller, Amstel, CaptainMorgan, etc. At least tmplist and loop give you hints.
PermalinkPermalink 08/29/05 @ 17:14
Comment from: u235 [Member] Email
I've never seen anything written with beverage names as variables that wasn't a school project, but yeah I'd agree in general. With the exception of meaningless things like loop counters (which are pretty clear when you use and declare them what they are) crap variable names just indicate that what you're looking at is a hack and you shouldn't have paid money for it.

On the other side I have seen the extreme where variable names are like fucking 64 chars long and make it freeking impossible to understand what the code is doing at all: "Thisismyarrayincrementvariable" is no where near as useful as "cntr".

In the end it never usually takes long to figure out someone's IQ from their code. Either you can read it right off, or you can't.
PermalinkPermalink 08/30/05 @ 10:36
Comment from: ominous [Member]

I think my favorite was some dude that used only 1 and 2 letter names for his variables. He'd start with a, b, c, d....once he got thru that then it would be aa, ab, ac....

That was some quality code to read.
PermalinkPermalink 08/30/05 @ 10:55
Comment from: NewCore [Member] Email
LoopX wouldn't be so bad if they weren't 12 of them, and if they weren't all global variables without declarations, spread over 10 files gives and the program was saved as a straight text file so I could just grep it.

The real problem is that the language makes you name everything, so instead of having something like

a^2 + b*c + c^2 you'd have
asquared = a * a;
bc = b * c;
csquared = c * c;
result1 = asquared + bc;
result2 = result2 + csquared;

(actually you can do arithmetic without intermediates, but nothing with loops, functions, dictionaries or lists). Vitech sucks.
PermalinkPermalink 08/30/05 @ 12:27

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

newc0re

October 2008
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Search

Categories

Misc

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 35

powered by b2evolution free blog software