• barbie (unregistered)

    Re "what the $#@~! are they?"

    but... it's all in the comments! Why, it's "x,y locations of pumps and valves"

  • Sylver (unregistered)

    //Create comment

    Ok, this doesn't look optimal.

  • DonaldK (unregistered)

    //Here,are,all,the,comments //in,no,particular,order

  • An Old Hacker (unregistered)

    Yep. I can see where this is going: // Create all variables int prbx1, prbx2, prbx3, prbx4, prbx5, prbx6, prby1, prby2, prby3, prby4, prby5, prby6, prbx7, prby7; ...

    if (prbx1 > prby6)

    What's the problem? It compiles fine. I created the variables, didn't I?

  • Sock Puppet #5 (unregistered)

    I remember doing a directed study, which basically evolved into a translation of a program written by a guy who--although he was in the CS department--probably would have rather been in Mathematics. Why did he need it translated? Because he could no longer find a distribution of the ancient FORTRAN compiler he was using. I hit the school library for reference materials, and when I cracked the book I found a used punch-card functioning as a bookmark. This was the first sign that something was wrong.

    Long story short, I ended up tweaking a converter tool for a younger version of FORTRAN, and there was lots of generated code like this.

  • Unappreciative Bastard (unregistered)

    Alex Pompadilililimous - Last week (or the week before) I complained about the timeliness of your postings. I retract that comment; thank you for your promptness this week.

  • pel (unregistered)

    I've seen stuff like that so many times it is not even funny. Now where did I put that hard liquor?

  • (cs)

    Nice touch that they even spelled "gauge" wrong as a variable name!

  • (cs)

    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

  • definitely who you think I am (unregistered)

    "A few months later, the same ____ called to see if I'd be interested in an interview. One thing led to another, and I ended up taking ___________"

    Whatever you fill in the blank with is a product of your imagination, not mine.

  • (cs)

    Let me postulate on the antipatterns/code smells this may contain:

    • Primitive Obsession.
    • Accumulate and Fire.
    • Java.*

    * When the developer clearly meant to use C.

  • Warren (unregistered)

    This code is self-documenting.

    What it documents is the coder's lack of "real world" experience.

  • QJo (unregistered) in reply to brazzy
    brazzy:
    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

    The really, really frightening thing here is that the variable names are just meaningful enough to convey the information that this appears to be an application for controlling a nuclear reactor.

  • douchie (unregistered)

    TRWTF is that he repeats int all the time. What a waste of space!

  • Sam (unregistered)
    [image] (Sorry.)
  • (cs) in reply to QJo
    QJo:
    brazzy:
    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

    The really, really frightening thing here is that the variable names are just meaningful enough to convey the information that this appears to be an application for controlling a nuclear reactor.

    OMG, I think your right.

  • (cs)

    Now that's organization! I have all my variables in one file, all my constants in an other, and all my functions in a third one. Can't get lost.

    Reminds my of that friend who had brought back his first computer to Wal-mart one month after buying it, because it wouldn't start. I told him he could have come to me first, and asked him about the issue he had had. He told me he didn't understand what happened, he was "sorting his files" when it just stopped working.

    He had grouped all the files he could find in his hard drive by file extension, in separated folders located in the root of C:. It probably stopped working when he was moving all these .dll files that were everywhere... His way of solving Windows Millenium dll hell, I guess!

  • Matthew (unregistered)

    I can actually top this. The previous developer on a legacy application I support used nonsense like this for his global variables, and single letters for his local variables. It was just his "style." Oh, and it's VB6.

    Although, given his working conditions I can almost understand. He majorly underestimated the cost of a project and ended up falling several months behind. My company hired more contractors whose only job was sitting there and watching him code. Can't imagine anybody's code would be very beautiful in that situation...

  • some guy (unregistered)
    TFA:
    Now, what the $#@~! are they?!

    ints.

  • (cs) in reply to barbie
    barbie:
    Re "what the $#@~! are they?"

    but... it's all in the comments! Why, it's "x,y locations of pumps and valves"

    Further proof that developers don't read code comments.

    With a name like "barbie", I'm betting your not a developer (I joke).

  • Sock Puppet #5 (unregistered) in reply to QJo
    QJo:
    brazzy:
    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

    The really, really frightening thing here is that the variable names are just meaningful enough to convey the information that this appears to be an application for controlling a nuclear reactor.

    Why would they have a nuclear reactor at a University? Did you read the article?

  • Chernobyl Charlie (unregistered) in reply to frits
    frits:
    QJo:
    brazzy:
    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

    The really, really frightening thing here is that the variable names are just meaningful enough to convey the information that this appears to be an application for controlling a nuclear reactor.

    OMG, I think your right.

    Oh .. oh my. I wonder what university this is? Hopefully one with a very small reactor.

  • Sam (unregistered) in reply to Sock Puppet #5
    Sock Puppet #5:
    Why would they have a nuclear reactor at a University? Did you read the article?
    Research reactors exist.
  • QJo (unregistered) in reply to frits
    frits:
    barbie:
    Re "what the $#@~! are they?"

    but... it's all in the comments! Why, it's "x,y locations of pumps and valves"

    Further proof that developers don't read code comments.

    With a name like "barbie", I'm betting your not a developer (I joke).

    Coding is hard! Let's write documentation!

  • boog (unregistered) in reply to frits
    frits:
    QJo:
    brazzy:
    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

    The really, really frightening thing here is that the variable names are just meaningful enough to convey the information that this appears to be an application for controlling a nuclear reactor.

    OMG, I think you're right.
    That's highly unlikely.

  • boog (unregistered) in reply to Sam
    frits' sock puppet:
    Sock Puppet #5:
    Why would they have a nuclear reactor at a University? Did you read the article?
    Research reactors exist.
    That's highly unlikely.
  • Chernobyl Charlie (unregistered) in reply to Sock Puppet #5
    Sock Puppet #5:
    QJo:
    brazzy:
    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

    The really, really frightening thing here is that the variable names are just meaningful enough to convey the information that this appears to be an application for controlling a nuclear reactor.

    Why would they have a nuclear reactor at a University? Did you read the article?

    Did you go to college or maybe do a little research??

    http://en.wikipedia.org/wiki/List_of_nuclear_reactors#Civilian_Research_and_Test_Reactors_Licensed_To_Operate

  • [noun] [verb] [location] (unregistered) in reply to definitely who you think I am
    definitely who you think I am:
    "A few months later, the same ____ called to see if I'd be interested in _________. One thing led to another, and I ended up taking ___________"

    Whatever you fill in the blank with is a product of your imagination, not mine.

    FTFY

  • someone (unregistered)

    http://en.wikipedia.org/wiki/List_of_nuclear_reactors

    Lots of nuclear reactors are in universities.

    I`m just waiting for the news of a small nuke somewhere...

  • steveC (unregistered) in reply to Sock Puppet #5
    Sock Puppet #5:
    QJo:
    brazzy:
    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

    The really, really frightening thing here is that the variable names are just meaningful enough to convey the information that this appears to be an application for controlling a nuclear reactor.

    Why would they have a nuclear reactor at a University? Did you read the article?

    There are quite a few model reactors at various universities. (ex. http://www.murr.missouri.edu/)

  • (cs) in reply to Sock Puppet #5
    Sock Puppet #5:
    Why would they have a nuclear reactor at a University? Did you read the article?

    4/10. It would have been 9/10 if you used a less ridiculous handle.

  • (cs) in reply to Sock Puppet #5
    Sock Puppet #5:
    Why would they have a nuclear reactor at a University? Did you read the article?
    In case you are not joking: the first nuclear reactor ever build was constructed in an abandoned racquets court at the University of Chicago, and it's not all that unusual for universities with large phsyics departments to have small research reactors.
  • (cs)

    sorry for playing dumb... but besides the horrible naming and the lack of commenting, does anything speak against declaring your variables in one place, at the top? what makes that bad style per se?

  • fu2uf (unregistered) in reply to some guy
    some guy:
    TFA:
    Now, what the $#@~! are they?!

    ints.

    ints that represent [x,y] coordinates, they are coordinints.

  • (cs) in reply to frits
    frits:
    QJo:
    brazzy:
    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

    The really, really frightening thing here is that the variable names are just meaningful enough to convey the information that this appears to be an application for controlling a nuclear reactor.

    OMG, I think your right.

    Let's hope it's a simulation.

  • Someone who can't be bothered to login from work (unregistered) in reply to Chernobyl Charlie
    Chernobyl Charlie:
    Sock Puppet #5:
    QJo:
    brazzy:
    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

    The really, really frightening thing here is that the variable names are just meaningful enough to convey the information that this appears to be an application for controlling a nuclear reactor.

    Why would they have a nuclear reactor at a University? Did you read the article?

    Did you go to college or maybe do a little research??

    http://en.wikipedia.org/wiki/List_of_nuclear_reactors#Civilian_Research_and_Test_Reactors_Licensed_To_Operate

    ...do I even want to know why the U.S. Veterans Administration has a nuclear reactor?

  • QJo (unregistered) in reply to beginend
    beginend:
    sorry for playing dumb... but besides the horrible naming and the lack of commenting, does anything speak against declaring your variables in one place, at the top? what makes that bad style per se?

    Off the top of my head: encapsulation suffers. A big long method with lots and lots of variables smells bad to start with. But when the variables are declared near where they're used it makes it easier to control their scope. If you then declare those variables inside their control structures, it makes it less possible to make the mistake of overwriting a needed value of a variable with another one.

  • siax turbyl rodiny (unregistered)

    Hey, I think I can read my name in there!

  • ReadyFred (unregistered)

    I think I worked out what's wrong.

    The first two lines, the comment style is different.

    The first line, there's a // at the end of the line, in the second there's not.

    That's the real WTF, innit?

  • (cs) in reply to QJo
    QJo:
    beginend:
    sorry for playing dumb... but besides the horrible naming and the lack of commenting, does anything speak against declaring your variables in one place, at the top? what makes that bad style per se?

    Off the top of my head: encapsulation suffers. A big long method with lots and lots of variables smells bad to start with. But when the variables are declared near where they're used it makes it easier to control their scope. If you then declare those variables inside their control structures, it makes it less possible to make the mistake of overwriting a needed value of a variable with another one.

    Ok, a method with that many local variables smells so bad it'll probably make you puke. But the rest is really a matter of taste and discipline, I guess. Having to declare all variables in one place (as in Pascal) forces you to think very thoroughly about what kind of data you really need to have locally, and it can thus (if it's done well) lead to much clearer code. It also reduces the risk of unnecessary and redundant declarations and subseqeuntly allocations, esp. in long methods.

  • QJo (unregistered) in reply to siax turbyl rodiny
    siax turbyl rodiny:
    Hey, I think I can read my name in there!

    That is so cool. Siax Turbyl Rodiny. New meme! New meme!

  • Tim Reynolds (unregistered)

    When I was a freshman in high school I wrote a space invaders clone without functions or arrays in qbasic. It had:

    MON1X, MON1Y ... MON32X, MON32Y defined.

    I became an expert at <backspace> <number> <down> <repeat>. I was pretty proud.

  • (cs) in reply to An Old Hacker
    An Old Hacker:
    Yep. I can see where this is going: // Create all variables int prbx1, prbx2, prbx3, prbx4, prbx5, prbx6, prby1, prby2, prby3, prby4, prby5, prby6, prbx7, prby7; ...

    if (prbx1 > prby6)

    What's the problem? It compiles fine. I created the variables, didn't I?

    My compiler of choice would actually warn me about declared but uninitialized variables. Do you not get that with Java?

  • QJo (unregistered) in reply to beginend
    beginend:
    An Old Hacker:
    Yep. I can see where this is going: // Create all variables int prbx1, prbx2, prbx3, prbx4, prbx5, prbx6, prby1, prby2, prby3, prby4, prby5, prby6, prbx7, prby7; ...

    if (prbx1 > prby6)

    What's the problem? It compiles fine. I created the variables, didn't I?

    My compiler of choice would actually warn me about declared but uninitialized variables. Do you not get that with Java?

    I'm wondering what possible business logic would require that you compare the X position of right-hand pump number 1 with the Y position of right-hand pump number 6. Oh I see, if someone's picked it up and moved it east rather further than the northernmost pump is northwards, it means we've got a felon in the compound. Seal the exits.

  • Sock Puppet #5 (unregistered) in reply to frits
    frits:
    Sock Puppet #5:
    Why would they have a nuclear reactor at a University? Did you read the article?

    4/10. It would have been 9/10 if you used a less ridiculous handle.

    I was serious...I suppose I stand corrected (although the one guy who posted the dubious Wikipedia link didn't use the url tag, so I'm too lazy to check it out).

    I was using common sense: is nuclear technology something I want ungraduated physics students playing around with? In my school, several of the physics classes I took had the correct answers circulated, even on public websites. I alerted the professors each time I discovered this, and they never seemed to mind. Perhaps the purpose was to help the athletic program...at any rate, are those the kids you want working on reactors nestled in a large concentration of people?

    Second, do I want Iranian exchange students getting-to-know the inner workings of our nuclear reactors?

    Third, have you seen what many of the professors are capable of? I know you've been visiting this site long enough.

    Fourth, what's wrong with my pseudonym? I was thinking of registering under this name.

  • Sock Puppet #5 (unregistered) in reply to beginend
    beginend:
    An Old Hacker:
    Yep. I can see where this is going: // Create all variables int prbx1, prbx2, prbx3, prbx4, prbx5, prbx6, prby1, prby2, prby3, prby4, prby5, prby6, prbx7, prby7; ...

    if (prbx1 > prby6)

    What's the problem? It compiles fine. I created the variables, didn't I?

    My compiler of choice would actually warn me about declared but uninitialized variables. Do you not get that with Java?

    Java™ goes a step further and gives you a compiler error.

  • swim (unregistered) in reply to QJo
    QJo:
    brazzy:
    Ah yes, the "every character is precious" school of variable naming. I once saw a program by someone who combined this with hungarian notation, eliminating all domain meaning from the variable names. The best part was that he was quite proud how much useful information this scheme conveyed...

    The really, really frightening thing here is that the variable names are just meaningful enough to convey the information that this appears to be an application for controlling a nuclear reactor.

    You're not allowed to use Java for a nuclear reactor. It's in the license.

    "not designed or intended for use in the design, construction, operation or maintenance of any nuclear facility."

    Seriously, I'm not making that up.

  • (cs) in reply to Sam
    Sam:
    (Sorry.)

    I like that alot.

  • (cs)

    I thought rodDowny was Robert Downy Jr.'s brother.

  • Too much free time (unregistered)

    Aaron continues, "good job, you've created all the variables. Now, what the $#@~! are they?!"

    XY co-ordinates of various items, which sound like...

    Pump Right B 1 to 5 Pump Left B 1 to 5

    Valve HB 1 to 4 Valve VB 1 to 4

    4 L&R pumps have 4H&V valves, and 1 set (left and right) has no valves? Not sure what the H and V would be. If V was a typo (repeated through copy&pasting), it could be C for hot and cold.

    TC 1 to 4 SI A and B VIL 1 to 4

    No idea on these. Turbine control? Steam Inlet?

    Rod Up, Down, Auto, 10, 5, 1 Perhaps for adjusting control rod(s) by 1/5/10 units at a time, up or down, or automaticaly.

    W A&B 1 to 4 and Warn (presumably they're all warnings of some type, 1 set of A and B for each set of H/V valves?).

    (Steam) Turbine, Trap (??), Gauge L and S, RodIn (Single control rod? Maybe it only has one), Reactor, Joint (??).

    SG 1 to 4. Steam gauges?

    So yeah, it sounds like it could be a (small) nuclear reactor. Though given the co-ords, it's more likely just a diagram of it, and the program lets the user rotate it and zoom and or whatever.

    I hope this post doesn't come out as garbage. Never tried this before.

Leave a comment on “The Alumni Variables”

Log In or post as a guest

Replying to comment #:

« Return to Article