• (cs) in reply to My Name Is Missing
    My Name Is Missing:
    What would come of coupling between Andy and the Brillant Paula Bean?

    Perhaps a new horror movie series for programmers?

    Andy Pandy?

  • Mark (unregistered)

    Genius! I'm going to put a little

    string andy = "R";

    into all my programs from now on.

  • (cs) in reply to QJo
    QJo:
    My Name Is Missing:
    What would come of coupling between Andy and the Brillant Paula Bean?

    Perhaps a new horror movie series for programmers?

    Andy Pandy?

    Andras Pandy? (Or Andy Pandy for short)

  • AnnoyingCowherd (unregistered) in reply to The poop of DOOM
    The poop of DOOM:
    Franky:
    I like how every sample contains an additional little wtf in the from of an unused variable, etc. etc.
    Reread it again and just noticed that little pearl
    private void button34_click(object sender, EventArgs e) { if (serialPort1.IsOpen) { string andy = "R"; serialPort1.Write("R"); } }
    Yup, not used at all :D

    That line activates the R

  • Zapp Brannigan (unregistered) in reply to AnnoyingCowherd
    AnnoyingCowherd:
    The poop of DOOM:
    Franky:
    I like how every sample contains an additional little wtf in the from of an unused variable, etc. etc.
    Reread it again and just noticed that little pearl
    private void button34_click(object sender, EventArgs e) { if (serialPort1.IsOpen) { string andy = "R"; serialPort1.Write("R"); } }
    Yup, not used at all :D

    That line activates the R

    I don't know anything about the Arduino C compiler, but it's possible that the serialPort1.Write() function can only handle a char and Andy needs the "R" in a string for some other purpose. I used a low cost (free) compiler for a PIC and it had limitations like this.

  • team ANDY (unregistered) in reply to Zapp Brannigan

    If serialPort1.Write() only takes chars, then serialPort1.Write("R"); would fail either way, wouldn't it? And the string andy isn't visible outside of the scope of that if-clause, assuming that's a language that handles visibility like java.... But maybe it's just my sarcasm-sensor that needs readjusting

  • (cs) in reply to Zapp Brannigan
    Zapp Brannigan:
    Writing to an LCD? Is this code for an embedded system?

    The file name is RFIDAndyJulRequest3.pde so I would think it might be running on an Arduino or some other Processing derivative, code certainly looks like it could be also.

    The only other place I have seen the pde suffix is on IBM AFP page defs, and that code is not a a page def.

  • (cs) in reply to Silfax
    Silfax:
    Zapp Brannigan:
    Writing to an LCD? Is this code for an embedded system?

    The file name is RFIDAndyJulRequest3.pde so I would think it might be running on an Arduino or some other Processing derivative, code certainly looks like it could be also.

    The only other place I have seen the pde suffix is on IBM AFP page defs, and that code is not a a page def.

    Since that looks like C#, I'm willing to bet this code runs on a netduino.
  • linepro (unregistered) in reply to Andy
    Andy:
    No I'm not this Andy!

    Hey, Andy are you goofing on Elvis?

  • eric76 (unregistered)

    No Andy namespace?

  • (cs)
    ...everyone on Julius's team knows Andy. Actually, it's hard not to know him.
    find codebase/ -type f | xargs -d'\n' sed -i 's/andy/broken/gi'
    Great way for everyone to finally forget Andy, and improve the code's self-documentation at the same time.
  • Andy Foobar (unregistered)

    Was Andy's last name Foobar? I see that name in a lot of code too.

  • Jeff (unregistered) in reply to nag_geoff
    nag_geoff:
    Steve The Cynic:
    Andy would be the reason why a baseball bat is an essential tool for code reviews.
    Resorting to violence or threats thereof, will halt the meteoric rise of human civilization.
    That's a feature, not a bug.
  • Justin (unregistered) in reply to AnnoyingCowherd
    AnnoyingCowherd:
    private void button34_click(object sender, EventArgs e) { if (serialPort1.IsOpen) { string andy = "R"; serialPort1.Write("R"); } }
    That line activates the R
    Almost. It preloads it into the string register so it can be pushed out the serial port at wire speed without unnecessary delays. Timing is important in data communications.
  • Simply Zunesis (unregistered) in reply to YF
    YF:
    Steve The Cynic:
    Andy would be the reason why a baseball bat is an essential tool for code reviews.
    I regularly think about a baseball bat when facing some of the ex-coders of my current project... should I worry?
    My thoughts are more like:
    1. Pants Down.
    2. No Lube.
    3. &^&@%^%^#@^@^%!~
    4. Sweet Release!
  • Ralph (unregistered)
    1. When maintaining code you didn't write, you run the risk of choosing a variable name that has already been used for something else. Prefixing it with your name ensures uniqueness, and also flags for future developers which areas you enhanced, in case they don't have the experience to appreciate your elegant optimizations and need them explained.

    2. I wish everyone would take pride in their code and sign it. Names should appear not just in the source but even in the final product, along with email address and phone number. I don't know how many times I've wanted to contact some Microsoft developer and give them some helpful feedback regarding their fine work.

  • (cs) in reply to Andy

    I once inherited code to maintain that was filled with the word "shit".

    A few seconds using global replace took care of that.

    You can get rid of most of Andy that way.

  • Carl (unregistered) in reply to SilentRunner
    SilentRunner:
    I once inherited code to maintain that was filled with the word "shit".

    A few seconds using global replace took care of that.

    You can get rid of most of Andy that way.

    Just change Andy to Sandy and people will think the code was written by a hot chick, and let her slide.

  • n_slash_a (unregistered)

    Ok, any code that has functions named "button34_click" is bound to end up here some day

  • Jack (unregistered) in reply to n_slash_a
    n_slash_a:
    Ok, any code that has functions named "button34_click" is bound to end up here some day
    That's right. I don't have a mouse, you insensitive clod, so I can't click.

    It should say "button 34 selected".

  • Svensson (unregistered) in reply to SilentRunner
    SilentRunner:
    I once inherited code to maintain that was filled with the word "shit".

    A few seconds using global replace took care of that.

    You used a global replace and suddenly the code was no longer full of shit? I doubt it.

  • (cs) in reply to Mark
    Mark:
    Genius! I'm going to put a little
    string andy = "R";

    into all my programs from now on.

    I periodically randomly put in something like:

    // The purple cow says "Quack"

    and then wait to see how long it takes for someone to question what I was doing. I've been doing it for six jobs at which the projects comprised a combined 2MM LOC and have yet to hear from anyone.

  • Socio (unregistered)

    So in other words, the developers are faced with this?

    http://www.youtube.com/watch?v=bwBPpjeWcws

    Akismet, please I'm not trying to spam the forum; just trying to crack a joke. Please let me post?

  • Sole Purpose of Visit (unregistered) in reply to frits
    frits:
    Nagesh:
    I thinking that andy like to see his name in coed all time.
    Who doesn't like to see their "andy" (or whatever you call yours) in a coed?

    TBH, I'd be slightly alarmed if I could still see it...

  • ionis (unregistered)

    WTF is with the Andycolorbit??????

    Indecently, are all of these game related?

  • (cs) in reply to Ralph
    Ralph:
    1. When maintaining code you didn't write, you run the risk of choosing a variable name that has already been used for something else. Prefixing it with your name ensures uniqueness, and also flags for future developers which areas you enhanced, in case they don't have the experience to appreciate your elegant optimizations and need them explained.
    1. I wish everyone would take pride in their code and sign it. Names should appear not just in the source but even in the final product, along with email address and phone number. I don't know how many times I've wanted to contact some Microsoft developer and give them some helpful feedback regarding their fine work.

    • is blown out of the water by the woman we talked about the other day from Texas who called all her six sons Adam. As for No. 2, as an idea I can't fault it.

  • (cs) in reply to Svensson
    Svensson:
    SilentRunner:
    I once inherited code to maintain that was filled with the word "shit".

    A few seconds using global replace took care of that.

    You used a global replace and suddenly the code was no longer full of shit? I doubt it.

    I replaced all instances of "shit" with "fuckingcuntbollockstwatfannycobol" once. Note the refusal to use camelcase.

  • _ (unregistered) in reply to Matt Westwood
    Matt Westwood:
    Svensson:
    SilentRunner:
    I once inherited code to maintain that was filled with the word "shit".

    A few seconds using global replace took care of that.

    You used a global replace and suddenly the code was no longer full of shit? I doubt it.

    I replaced all instances of "shit" with "fuckingcuntbollockstwatfannycobol" once. Note the refusal to use camelcase.

    What's a stwat?

  • (cs) in reply to _
    _:
    Matt Westwood:
    Svensson:
    SilentRunner:
    I once inherited code to maintain that was filled with the word "shit".

    A few seconds using global replace took care of that.

    You used a global replace and suddenly the code was no longer full of shit? I doubt it.

    I replaced all instances of "shit" with "fuckingcuntbollockstwatfannycobol" once. Note the refusal to use camelcase.

    What's a stwat?

    Like a scunt but doesn't smell quite as bad.

  • e john (unregistered) in reply to SilentRunner
    SilentRunner:
    I once inherited code to maintain that was filled with the word "shit".

    A few seconds using global replace took care of that.

    What was the problem ?

    Captcha:haero - lose that haero and get yourself half a machine language program

  • e john (unregistered) in reply to Carl
    Carl:
    SilentRunner:
    I once inherited code to maintain that was filled with the word "shit".

    A few seconds using global replace took care of that.

    You can get rid of most of Andy that way.

    Just change Andy to Sandy and people will think the code was written by a hot chick, and let her slide.

    Sliding hot chicks on an Andy afternoon

  • (cs) in reply to _
    _:
    Matt Westwood:
    I replaced all instances of "shit" with "fuckingcuntbollockstwatfannycobol" once. Note the refusal to use camelcase.
    What's a stwat?
    It's a sexual object for people who don't know bollocks about British slang.
  • (cs)

    One of the most common variable names in the source of a system we use is "r2d2", appearing over 29000 times. It was an all-encompassing "return data" object passed around to almost every major function, containing objects to update in a transaction, errors, warnings, etc.

    At one point, when hitting a support wall (basically every incident would end with me fixing their bugs, mailing them patches, and seeing them go unused, and the bugs go unfixed on their end), I started tracking down the actual developers in hopes of bypassing their support people. One of them who was no longer with the company had the forum username R2D2. Though I don't think they were fired, so much as layed off with the other developers right after the company was bought out by a competitor, shortly after we purchased the system.

  • Junky (unregistered) in reply to YF
    YF:
    Steve The Cynic:
    Andy would be the reason why a baseball bat is an essential tool for code reviews.
    I regularly think about a baseball bat when facing some of the ex-coders of my current project... should I worry?
    Not unless they have the bat!
  • (cs)

    A later developer tried to change it up a little and include a little Barney in his code, but we managed to nip it in the bud.

  • Son Of Thor (unregistered)

    I knew soneone like that we gave him the Nickname ROB$

    Yes this was over 20 years ago.

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    Nagesh:
    frits:
    The poop of DOOM:
    Franky:
    I like how every sample contains an additional little wtf in the from of an unused variable, etc. etc.
    Reread it again and just noticed that little pearl
    private void button34_click(object sender, EventArgs e) { if (serialPort1.IsOpen) { string andy = "R"; serialPort1.Write("R"); } }
    Yup, not used at all :D
    Actually, it's an optimization using string interning ;).

    Why not use constant here?

    He did... Didn't you see the quoted 'R'?

    ...both quoted 'R's?

  • azsdfasg (unregistered)

    ANNDDEEEHHH!

    ASKIMEEEETTTT!

  • Wim (unregistered)

    He dropped the usage of "Andy" in his last code..... So there was improvment?

  • (cs)

    Lazy Andy Afternoon I hate the usage of words like foobar, foo, bar, baz etc. in examples. I've seen these in actual production code. While they may make sense in examples (because it's as abstract as it gets), it's so, so wrong everywhere else...

  • Christian (unregistered)

    private void button34_click(object sender, EventArgs e)... button34_click as another real wtf...

  • m (unregistered)

    Is the Arduino a Big Andian or Little Andyian platform?

  • (cs) in reply to Kiss me I'm Polish
    Kiss me I'm Polish:
    Lazy Andy Afternoon I hate the usage of words like foobar, foo, bar, baz etc. in examples. I've seen these in actual production code. While they may make sense in examples (because it's as abstract as it gets), it's so, so wrong everywhere else...

    I've always had a problem with "my" prefixing objects. Again, it's what's done in examples, but it feels childish, somehow, bringing to mind things like "my little p**y" and "my first training bra" and "my mummy" and the like. Anyone else share this eccentricity?

  • (cs) in reply to QJo
    QJo:
    I've always had a problem with "my" prefixing objects. Again, it's what's done in examples, but it feels childish, somehow, bringing to mind things like "my little p**y" and "my first training bra" and "my mummy" and the like. Anyone else share this eccentricity?

    To a very limited extent. When I first upgraded from Windows 3.30 to 95, I looked around until I found out how to change those supposedly unalterable system icons so I could rename "My Computer" to "My Widdle Computesy-Wootsy".

  • (cs) in reply to QJo
    QJo:
    Kiss me I'm Polish:
    Lazy Andy Afternoon I hate the usage of words like foobar, foo, bar, baz etc. in examples. I've seen these in actual production code. While they may make sense in examples (because it's as abstract as it gets), it's so, so wrong everywhere else...

    I've always had a problem with "my" prefixing objects. Again, it's what's done in examples, but it feels childish, somehow, bringing to mind things like "my little p**y" and "my first training bra" and "my mummy" and the like. Anyone else share this eccentricity?

    Depends on.

    If you're talking about code written from scratch, it's horrible.

    If you're talking about code written within an existing framework and you use it to distinguish between framework code and your own, then please by all means go ahead. In this case, it's the easiest and clearest way to distinguish between what the framework already provides and what you should be writing.

  • !Andy (unregistered)

    is that him? g

    http://www.chsonline.com/team/andrew_code.html

  • Martian Kyo (unregistered) in reply to ubersoldat

    If you were to look closer i think you will find that actually Object extends Andy.

  • foo (unregistered) in reply to boog
    boog:
    ...everyone on Julius's team knows Andy. Actually, it's hard not to know him.
    find codebase/ -type f | xargs -d'\n' sed -i 's/andy/broken/gi'
    Great way for everyone to finally forget Andy, and improve the code's self-documentation at the same time.
    Thanks for this hbroken trick.
  • (cs) in reply to QJo
    QJo:
    "my little p**y"
    You're missing an asterisk.
  • werner (unregistered)

    for a moment i thought it may have been the same guy: thedailywtf.com/Articles/ANDYNO.aspx

Leave a comment on “The Andy Pattern”

Log In or post as a guest

Replying to comment #:

« Return to Article