• jbrecken (unregistered)

    He was coding with a plastic spoon in his mouth.

  • Matt (unregistered) in reply to ParkinT
    ParkinT:
    // WTF?

    That's a WTF comment if ever I saw one.

  • (cs)

    SUBSTITUTE_me_for_him; SUBSTITUTE_my_coke_for_gin; // ...

    <edit> damnit, too late...

  • (cs)

    Whatever happened to the clbuttic rudeness filter? Shouldn't this be "SUSBSbreastUTE_CODE"?

  • Feek (unregistered) in reply to Brian
    Brian:
    Outlaw Programmer:
    By FAR the best joke post I've seen on this site!

    I'm not sure if that is an insult or what. But I'm used to being mis-understood, it happens even on my own development team sometimes, especially when we hire a new developer.

    The reason most people thought it was a joke was because none of us can fathom why you think this is a valid way to program.

    In most languages I've worked in, this would generate a compile time error. The question is, then, why would you use invalid code as a "TODO" (though it's less of a TODO and more of a breaking the build) instead of doing an #error preprocessor or something like that?

  • (cs) in reply to ChiefCrazyTalk
    ChiefCrazyTalk:
    Robert:
    Ah, this is C-Hash isn't it?

    Isn't there a piece of inappropriate XML that's the correct way of doing this.

    Nope, it's C-pound.

    C-£?

  • SUSBSTITUTE_WITTY_USERNAME (unregistered)

    C-Number-Sign.

    So what happens if you have multiple todos in one function?

  • (cs)
    He didn't respond when I mentioned that the code had been there for over six months.
    Have you tried ending his process?
  • (cs) in reply to Kyle K.
    Kyle K.:
    IF I was the team lead, my response would be

    "Well, congrats, you passed test #1. You had the initiative and curiosity to both notice and ask about SUBSTITUTE_CODE. Test #2 is to see whether you have the same initiative to step up and do something about it."

    Sounds like an opportunity to me!

    Oh, Bog! BTDT. Three times. The first two times, they didn't. The third time was so bad I never tried it again.

    Hint: when writing code to replace something the lead developer couldn't be bothered to fix (or couldn't fix), the careful FNG+ will ensure that the new code at least compiles before submitting it to the lead developer. The wary FNG will at least make certain that it is either all written in a single language (hopefully the correct one), or with the correct glue to ensure that it all works.

    I had written three lines of illegible perl code. He proposed to replace it with >50 lines of csh, sed, C, Pascal, and something else - maybe Java? About 2001, so D-flat was possible, too (although not on his resume - but neither was Pascal). No glue; it was all written as if he thought it was all valid perl code. And, the relevance to what the three lines of legible perl code did was quite low.

    Admittedly, it did cause the perl code to be re-written. The attempt was so bad, I felt compelled to at least document in comments what the code was doing. After writing about 20 lines of comments, it became obvious to me how to rewrite the code legibly.

    +FNG = Friendly New Guy. Really. Well, sometimes Funny New Guy. Certainly not Florida National Guard. HTH. HAND.

  • Dave (unregistered)
    // TODO: Hire a teamlead that LEADS a team 

    Now where did I leave my ostrich cannon ?

  • 4thgradeenglsh (unregistered) in reply to PSWorx
    PSWorx:
    SUBSTITUTE_me_for_him; SUBSTITUTE_my_coke_for_gin; // ...

    SUBSTITUTE_you_for_my_mom;

    At least I'll get my washing done.

    Sorry, you totally asked for that :-P

  • more randomer than you (unregistered)

    looks to me like not only did the SUSBSTITUTE_CODE method make a completely new developer aware of a potential bug to fix, but it also got an extra 61 people who don't even work at the company to consider it. Good luck getting that kind of attention with any traditional TODO method.

  • Hans (unregistered) in reply to SUSBSTITUTE_WITTY_USERNAME
    SUSBSTITUTE_WITTY_USERNAME:
    C-Number-Sign.

    So what happens if you have multiple todos in one function?

    Then you have a dodo.

  • (cs) in reply to jim
    jim:
    I think what you were looking for is #warning
    Alas, it's not portable. Really. Found that out the hard way. (OTOH, #error is. Or at least if it isn't supported, the preprocessor will generate an error message complaining about it, which is good enough...)
  • BK (unregistered)

    "no one actually cares for //TODO" , as no one actually cares for warnings, as it seems.

  • Dave G (unregistered) in reply to john
    john:
    #warn FIXME: You really, really need to read this code, it's broken

    #ifdef FIX_IT_OR_DIE #error FIXME: I'm not kidding. #endif

    Not sure about Visual C#, but many compilers offer the ability to treat warnings as errors. It doesn't always help because sometimes code compiled on one architecture compiles without warnings but on others it will warn about something non-critical like iconv() expecting a const char * on BSD systems or simply char * on GNU systems.

    In any case, with gcc I quite often compile with -Wall -Werror just to keep things "tidy".

  • (cs)

    I'm sorry, I'm not exactly seeing the problem. He put it there where everyone will see it, and eventually fix the code. Now that Franc saw it, he will presumably fix the code. Sounds like mission accomplished to me.

  • Stephen Leary (unregistered)

    The real wtf is that anyone actually uses SourceSafe anymore.

  • DJ (unregistered) in reply to Dave G
    Not sure about Visual C#, but many compilers offer the ability to treat warnings as errors. It doesn't always help because sometimes code compiled on one architecture compiles without warnings but on others it will warn about something non-critical like iconv() expecting a const char * on BSD systems or simply char * on GNU systems.

    In any case, with gcc I quite often compile with -Wall -Werror just to keep things "tidy".

    #if DEBUG #warning Fix this code before we release #else #error I told you to fix this before we release #endif

  • Pragmatic_fixer (unregistered)

    I prefer:

    #pragma WTF!
    

    The compiler / preprocessor is required to issue a diagnostic:

    cc: unknown pragma: WTF!

    Always good for a laugh. Even when it is not funny.

  • (cs) in reply to dkf
    dkf:
    jim:
    I think what you were looking for is #warning
    Alas, it's not portable. Really. Found that out the hard way. (OTOH, #error is. Or at least if it isn't supported, the preprocessor will generate an error message complaining about it, which is good enough...)
    It's kind of ironic that a compiler that doesn't support #error will respond by emitting an error, but a compiler that doesn't support #warning won't even emit a warning...
  • john (unregistered)

    I don't see the problem, but then again fortunately I don't have OCD. Don't worry, once you've programmed a couple of hundred projects to tight deadlines you'll be wishing the internet has a delete button.

  • Jamie (unregistered) in reply to ChiefCrazyTalk

    C-Sharp or C-Hash, silly American.

  • NotANub (unregistered)

    Treat warnings as errors FTW, that's how pros do it.

    Seems pride in one's work is a lost cause these days...

  • (cs)

    I had a smart ass over eager Jr. Developer once - I think he's a plumber now...

  • parabuzzle (unregistered)

    The RWTF is that they used source safe

  • minim (unregistered) in reply to Outlaw Programmer
    Outlaw Programmer:
    I think you might be missing the point. Everyone leaves in unused variables or methods from time to time.
    I don't, and I don't see any reason why anyone should. Any decent IDE will display them as warnings, so fix the fckrs.
  • causa (unregistered) in reply to TopCod3r
    TopCod3r:
    Bot:
    In general TODOs should be used for things that need to be cleaned up or changed in the future, not as a way to document bugs. A unit test to reproduce the bug is usually the best way to document a bug until it is fixed.

    I didn't think bugs were possible if you used TDD?

    Just so I know: Joke, troll or plonker?

  • ClaudeSuck.de (unregistered) in reply to Robert
    Robert:
    Ah, this is C-Hash isn't it?

    Isn't there a piece of inappropriate XML that's the correct way of doing this.

    Or is it Hash-C-ish???

  • ClaudeSuck.de (unregistered) in reply to tlowder
    tlowder:
    I had a smart ass over eager Jr. Developer once - I think he's a plumber now...

    Given that a plumber takes maybe even more money than I as an independent worker I don't see what is wrong about it.

    Given all those TRWTFs I wonder if I shouldn't become one myself (and create real and not virtual WTFs).

  • picked (unregistered)

    hello

Leave a comment on “SUSBSTITUTE_CODE”

Log In or post as a guest

Replying to comment #:

« Return to Article