• Andy (unregistered)

    Andy was here frist

  • SeySayux (unregistered)

    Frist!

    (Yea yea akismet)

  • ubersoldat (cs)

    public class Andy extends Object{ ... }

    public class X extends Andy

    Where X is every class in your codebase.

  • Lockwood (cs)

    My database stuff seems to have a small trait of Andyism in it. There are little bits of Andy (75%) throughout: SELECT foo FROM bar WHERE a = @a AND b = @b AND ...

  • Anonymous (unregistered) in reply to ubersoldat
    ubersoldat:
    public class Andy extends Object{ ... }

    public class X extends Andy

    Where X is every class in your codebase.

    It's too early for horror stories.

  • frits (cs)

    Andy must have been part of a pair programming team (evidenced by the frequent use of "we"). Unfortunately for his partner, Andy was the only one allowed to drive. Andy mut've been some kind of Senior Software Engineer.

  • nag_geoff (unregistered)

    Personally I see this as a failure of the code review team. How did this code reach beyond the development machine is a mystery to me?

    A "propah" code review would have eliminated such errors in the future.

    It is imperative that the programming team mend its ways and have some sort of process before releasing code to production.

    Does anyone care about variable names if the code does what it is supposed to?

  • Franky (unregistered)

    I like how every sample contains an additional little wtf in the from of an unused variable, etc. etc.

  • Steve The Cynic (cs)

    Andy would be the reason why a baseball bat is an essential tool for code reviews.

  • nag_geoff (unregistered) in reply to Steve The Cynic
    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.

  • Oregon Trail (unregistered)

    Here lies andy peperony and chease

  • YF (unregistered) in reply to Franky
    Comment held for moderation.
  • The poop of DOOM (cs) in reply to Franky
    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
  • YF (unregistered) in reply to Steve The Cynic
    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?
  • The poop of DOOM (cs) in reply to YF
    YF:
    Franky:
    I like how every sample contains an additional little wtf in the from of an unused variable, etc. etc.
    Not only that, but if the snippets are accurate, it does not follow consistent identation/spacing, consistent word case, consistent naming convention, etc etc

    Captcha: valetudo... ouch, just perfect, I'm afraid

    You got inconsistencies in languages themselves, too. In PHP, for example, some functions start with, eg. str_, while others don't have the underscore. You also have parameters that follow ($needle, $haystack) for some functions, and other, similar functions have ($haystack, $needle). If such things are built into a language, then can you still call it a WTF? It seems more like that guy's been coding the same way languages've been made.

  • Severity One (cs) in reply to The poop of DOOM
    The poop of DOOM:
    In PHP, for example, some functions start with, eg. str_, while others don't have the underscore. You also have parameters that follow ($needle, $haystack) for some functions, and other, similar functions have ($haystack, $needle). If such things are built into a language, then can you still call it a WTF?
    About here, somebody would make the obligatory remark about PHP and TRWTF.
  • YF (unregistered) in reply to Severity One
    Severity One:
    The poop of DOOM:
    In PHP, for example, some functions start with, eg. str_, while others don't have the underscore. You also have parameters that follow ($needle, $haystack) for some functions, and other, similar functions have ($haystack, $needle). If such things are built into a language, then can you still call it a WTF?
    About here, somebody would make the obligatory remark about PHP and TRWTF.

    TRWTF is PHP

    There! Lunch time, can I go now?

  • My Name Is Missing (unregistered)

    What would come of coupling between Andy and the Brillant Paula Bean?

    Perhaps a new horror movie series for programmers?

  • DoucheBag (unregistered) 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?

    Two negatives Make a positive...

  • frits (cs) 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
    Actually, it's an optimization using string interning ;).
  • zelmak (cs) in reply to Anonymous
    Anonymous:
    ubersoldat:
    public class Andy extends Object{ ... }

    public class X extends Andy

    Where X is every class in your codebase.

    It's too early for horror stories.

    Sorry, we already have that:

    public interface LoggableObject { ... }

    public abstract AbstractLoggableObject implements LoggableObject { ... }

    and everything is a descendent of AbstractLoggableObject.

  • TPS Reports (unregistered) in reply to The poop of DOOM
    The poop of DOOM:
    You got inconsistencies in languages themselves, too. In PHP, for example, some functions start with, eg. str_, while others don't have the underscore. You also have parameters that follow ($needle, $haystack) for some functions, and other, similar functions have ($haystack, $needle). If such things are built into a language, then can you still call it a WTF?

    If that language is PHP, then yes, we can definitely still call it a WTF.

  • Weps (cs)

    if x and y then uh oh

  • Zapp Brannigan (unregistered)

    Writing to an LCD? Is this code for an embedded system?

  • thylux (unregistered)

    That reminded me of the song by The Killers: Andy You're a Star! (www.youtube.com/watch?v=xY0y-gOe78c)

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

    .pde is an extension commonly used by Arduino code, so I'm guessing that it is, yes.

  • Nagesh (cs) in reply to frits
    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?

  • mikedjames (cs)

    Its an RFID reader for a tennis game featuring Andy Murray. Simples.

  • C-Octothorpe (cs) in reply to frits
    frits:
    Software Engineer
    This made me giggle because it reminds me of a the "Systems Engineer" I once worked alongside who would lay lan cable all day...
  • steenbergh (cs)

    Reminds me of Rachelle.

    //TODO: Andy

  • C-Octothorpe (cs) in reply to Nagesh
    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'?

  • boog (cs) in reply to frits
    frits:
    Andy must have been part of a pair programming team (evidenced by the frequent use of "we"). Unfortunately for his partner, Andy was the only one allowed to drive. Andy mut've been some kind of Senior Software Engineer.
    Or maybe the partner was so ashamed, he advised Andy to sign his code this way.
  • PedanticCurmudgeon (cs) 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, is how governments operate.
    FTFY
  • The poop of DOOM (cs) in reply to Nagesh
    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?

    Because the week after, it'd be "S". That's not very constant, is it, if he has to change it each week?

  • Nagesh (cs) in reply to C-Octothorpe

    Yes, but i am saying use constant like this.

    private void button34_click(object sender, EventArgs e) 
    { 
     if (serialPort1.IsOpen) 
     { 
    const string andy = "R"; 
     serialPort1.Write(andy); 
     } 
    }
    
    

    I thinking that andy like to see his name in coed all time. So this blatent misuse of variable naming conventions.

  • Nagesh (cs) in reply to The poop of DOOM
    The poop of DOOM:
    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?

    Because the week after, it'd be "S". That's not very constant, is it, if he has to change it each week?

    Who is passing the "S" in that case? Are you seeing thing that I am not seeing or are you his boss / coleage / subordinete?

  • frits (cs) in reply to Nagesh
    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?
  • _ (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?
    I don't like to name mine because then I feel bad when I beat it...
  • Andy (unregistered)

    No I'm not this Andy!

  • zirias (unregistered) in reply to The poop of DOOM
    The poop of DOOM:
    string andy = "R";
    Yup, not used at all :D
    So, Andy is useless you say?
  • OldCoder (unregistered) in reply to nag_geoff
    nag_geoff:
    ...the meteoric rise of human civilization.
    Now you're being silly!
  • tragomaskhalos (unregistered)

    I assume that the intention of the dramatic comment

    // activate help variable

    is to impress readers who might otherwise think that Andy is an idiot who's overly fond of superfluous temporaries.

  • Paul (unregistered) in reply to nag_geoff
    nag_geoff:
    Does anyone care about variable names if the code does what it is supposed to?

    Depends. Were you planning to maintain or re-use the code at all?

  • randyandy (unregistered) in reply to nag_geoff
    Does anyone care about variable names if the code does what it is supposed to?
    No, variable names are superfluous. To be sure we're not mislead by variable names, we have a SCM commit hook that runs the source through an obfuscator.
  • #254 (unregistered)

    Andy walks with me, Andy talks with me, Andy tells me I am his own.

  • Zylon (cs)

    This article gave me visual hallucinations. By the second code snippet, I was starting to see the code written in crayon.

    ANDY MADE THIS. I'M HELPING! FRANK AND BEANS! FRANK AND BEANS!

  • Jonathan (unregistered) in reply to WC

    TRWTF is Arduino used in production.

  • Rick (cs) 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?
    If you own a baseball bat, but don't actually play baseball, then yes you should worry.
  • CrisW (cs) in reply to OldCoder
    OldCoder:
    nag_geoff:
    ...the meteoric rise of human civilization.
    Now you're being silly!

    Totally. Meteors don't rise, they fall.

  • Toon (unregistered)

    This WTF just put a smile on my face. I wouldn't smiling if I'd been the poor sap who mailed this in, though.

Leave a comment on “The Andy Pattern”

Log In or post as a guest

Replying to comment #:

« Return to Article