• (cs)

    bool isDaveStillAVirgin = true;

  • synp (unregistered) in reply to mfc
    mfc:
    //Remeber the f*cking appointment at 5 PM today

    I hope the f*cking appointment is for an interview somewhere else.

    This code is just begging to be put up on every bulletin board in the office.

    And forwarded to any potential employer who calls for a reference.

  • synp (unregistered) in reply to valerion
    valerion:
    const bool isDaveStillAVirgin = true;
    FTFY
  • (cs) in reply to boog
    boog:
    So, the other day I was making the case that code was not a window into the emotions, experiences, and ultimately the soul of the developer.

    After seeing today's example, I stand corrected. Well played, TheDailyWTF. Well played.

    animal crackers or Lorna Doones
    Lorna Doones. No question. Cookie always beats cracker.

    I'm not sure if people outside the U.S. know about animal crackers here. Although they are called "crackers", they are actually sweet, like a butter cookie/biscuit. Despite Shirley Temple's song, animal crackers would not taste very good in soup.

  • Pizza Fries (unregistered) in reply to synp
    synp:
    valerion:
    const bool isDaveStillAVirgin = true;
    FTFY

    QFT. That is going to persist for the lifetime of his program for sure.

  • boog (unregistered) in reply to synp
    synp:
    mfc:
    //Remeber the f*cking appointment at 5 PM today

    I hope the f*cking appointment is for an interview somewhere else.

    This code is just begging to be put up on every bulletin board in the office.

    And forwarded to any potential employer who calls for a reference.

    Absolutely not. If you prevent his employment elsewhere, he'll never leave.

  • anon (unregistered) in reply to Remy Porter
    Remy Porter:
    JamesQMurphy:
    I can also guess what kind of appointment Dave has at 5pm.

    It says right in the comment: it's a f*cking appointment.

    With Kendrick?

  • AllMales? (unregistered)

    TRRWTF is that there seem to be no comments from our lady friends here yet.

  • (cs)

    TRWTF is "F*CK KENDRICK" over and over again in a file nobody else is ever supposed to see. You'd think in the privacy of his own little world he'd the gooyams to spell it out without the asterisk.

  • nasch (unregistered) in reply to Anonymous
    Anonymous:
    DeaDPooL:
    Too far fetched to believe IMO
    From personal experience I disagree... They are forever checking in files that have no place being in source control, just because said file was in their work area and they forgot to delete/ignore it before syncing.

    I suspect he was commenting on the contents of the file, not the likelihood of accidentally checking something in to source control.

  • Stretch (unregistered)

    Yes that is a good book. No wtf here though.

  • boog (unregistered) in reply to JamesQMurphy
    JamesQMurphy:
    boog:
    Lorna Doones. No question. Cookie always beats cracker.

    I'm not sure if people outside the U.S. know about animal crackers here. Although they are called "crackers", they are actually sweet, like a butter cookie/biscuit. Despite Shirley Temple's song, animal crackers would not taste very good in soup.

    I'm in the U.S., and I know what animal crackers are. They are sweet and delicious, I agree, but they are still crackers.

    If it'd said "circus animals" instead, then it'd be a different story. Circus animals are not only cookies, but they are frosted with sprinkles.

  • (cs) in reply to Remy Porter
    Remy Porter:
    I mean, think about it- a "1" face is likely a show-stopper, no question.

    Just add a wouldIDoHerFromBehind variable.

  • Skawt (unregistered)

    What are Lorna Doones? Are they any good? He should get animal crackers and channel his rage into biting their heads off. It seems like a better use of company time.

  • GrimKeeper (unregistered)

    I guess I'd really like to see Darcy's legs.

  • (cs) in reply to Skawt
    Skawt:
    What are Lorna Doones? Are they any good? He should get animal crackers and channel his rage into biting their heads off. It seems like a better use of company time.

    They're shortbread cookies. Yes, they're good.

  • (cs) in reply to boog
    boog:
    JamesQMurphy:
    boog:
    Lorna Doones. No question. Cookie always beats cracker.

    I'm not sure if people outside the U.S. know about animal crackers here. Although they are called "crackers", they are actually sweet, like a butter cookie/biscuit. Despite Shirley Temple's song, animal crackers would not taste very good in soup.

    I'm in the U.S., and I know what animal crackers are. They are sweet and delicious, I agree, but they are still crackers.

    If it'd said "circus animals" instead, then it'd be a different story. Circus animals are not only cookies, but they are frosted with sprinkles.

    Good point. Whenever I say "animal crackers" I usually am referring to Circus Animals, which come in the box that looks like a circus wagon. Mea culpa!

  • Raniz (unregistered)

    TRWTF here is that he's got utility functions that he can never use since they're not in the repository (and if they're in some other file in the repo, why have a copy of them in his own private file?)

  • vanasan (unregistered)
    return cum;
    I don't think that's how it works.
  • ick (unregistered) in reply to vanasan
    vanasan:
    return cum;
    I don't think that's how it works.

    Snowball?

  • (cs) in reply to vanasan
    vanasan:
    return cum;
    I don't think that's how it works.
    Never saw the films in health class, eh?
  • flyboyfred (unregistered) in reply to Anonymous
    Anonymous:
    I've found the WTF in Dave's girl-ranking algorithm. It makes all the calculations correctly but fails to handle the GirlWouldntTouchYouWithATenFootBargePoleException that gets thrown as soon as he attempts to interop with the girl.

    Exceptions should be used only for exception cases. This would clearly be a normal case.

  • (cs) in reply to Google is your friend
    GIYF:
    Dear Dave,

    A better idea would be to do a quick Google search and find out that you can in fact delete a file from a Subversion repository (if you use the URL).

    And Noah, do you even knowah anything about Subversion?

    kthxbye

    Well at the time Dave asked, he didn't know that he needed to delete a file. He thought he had to delete a "revision."

    Lern2Read

  • (cs) in reply to Raniz
    Raniz:
    TRWTF here is that he's got utility functions that he can never use since they're not in the repository (and if they're in some other file in the repo, why have a copy of them in his own private file?)
    I assume he put them there so he could look busy if/when the boss or any of his colleagues walked up to his screen.
  • Ike (unregistered)

    No doubt the reason he spent so long deciding whether or not to buy animal crackers is the writing on the box:

    "Hmmm. 'Do not consume if seal is broken.' I'm going to have to go through the whole box to find the seal..."

  • (cs) in reply to Vladimir Poutines
    Vladimir Poutines:
    He probably meant to do root-sum-squared but forgot the root.

    Skipping the root is a common optimization if you're just using the result as a sort key.

  • Anonymous Short Person (unregistered) in reply to Richard

    "Everybody knows that legs should be long!"

    Umm, not on "little people". Long legs on "little people" would look...wierd?

  • joe blow (unregistered)

    Hmmmm, what about a Lorna Doone covered Hashini?

  • (cs)

    TRWTF is passing Girl by value instead of by const reference…

  • (cs)

    I could totally make an Access db that does all this. Rate their T&A, other attributes (voice, attitude, etc.), and throw it all into an procedure that returns a 1-10 value. Then I'd fill the table with my opinions of my coworkers.

    I feel myself getting creepier already!

  • Grammar Nazi (unregistered) in reply to belgariontheking
    belgariontheking:
    GIYF:
    Dear Dave,

    A better idea would be to do a quick Google search and find out that you can in fact delete a file from a Subversion repository (if you use the URL).

    And Noah, do you even knowah anything about Subversion?

    kthxbye

    Well at the time Dave asked, he didn't know that he needed to delete a file. He thought he had too delete an "revision."

    Lern2Read

    FTFY. Geez, doesn't anyone no how too speak English these days?

  • (cs) in reply to SuperAnalyst
    SuperAnalyst:
    I could totally make an Access db that does all this. Rate their T&A, other attributes (voice, attitude, etc.), and throw it all into an procedure that returns a 1-10 value. Then I'd fill the table with my opinions of my coworkers.

    I feel myself getting creepier already!

    There are dozens of Facebook apps that already do this. I bet a few of them use Access as their back-end.

  • Franz Kafka (unregistered) in reply to Anonymous
    Anonymous:
    DeaDPooL:
    Too far fetched to believe IMO
    From personal experience I disagree. The devs at my company are absolutely useless when it comes to code syncs (we use Serena Dimensions with the Windows Explorer plugin for synching a local work area with the back-end). They are forever checking in files that have no place being in source control, just because said file was in their work area and they forgot to delete/ignore it before syncing. This happens about once a week, give or take.

    Now, plenty of our coders write stuff on their own time, either proper code or fun little algorithms like Dave's "girl-ranking" algorithm. I really don't think it is much of a stretch for a non-work file to end up in a synchronisable work area. If that happens and you don't pay attention whilst syncing, crap like this is inevitable. I've never come across a girl-ranking algorithm but I have certainly seen plenty of examples of inappropriate files being commited to source control due to a bad sync.

    Sure, lots of your coworkers put improper stuff in the source control system, but why would you keep your todo list in a cpp file in the first place?

  • kth (unregistered) in reply to highphilosopher

    Almost. AllGirls[0].legs is set 4 times, not three.

  • Sutherlands (unregistered) in reply to Enterprise Architect
    Enterprise Architect:
    TRWTF is passing Girl by value instead of by const reference…
    No, that makes sense. That way whatever you do to it in your function doesn't make it back to the original.
  • (cs)

    A few things no one's seemed to have commented on:

    NthPower is a case of reinventing the wheel, poorly. It's an inferior version of C/C++'s pow.

    The scoring algorithm should be its own function rather than being implemented twice in CompGirl. Hell, it should really be a method of Girl, but Dave seems intent on writing C in C++. He's taking advantage of a few syntactic conveniences of C++ while completely ignoring OOP.

    Even if you ignore the social implications and creep factor of ratings girls like that and wanting to blackmail Kendrick, Dave still seems to be a shitty programmer.

  • (cs) in reply to Maurits
    Maurits:
    Vladimir Poutines:
    He probably meant to do root-sum-squared but forgot the root.

    Skipping the root is a common optimization if you're just using the result as a sort key.

    I wasn't aware of that. It makes sense for integers. I wouldn't try it for floating point numbers where values -1.0 to 1.0 were expected.

  • Clank (unregistered) in reply to Sutherlands
    Sutherlands:
    Enterprise Architect:
    TRWTF is passing Girl by value instead of by const reference…
    No, that makes sense. That way whatever you do to it in your function doesn't make it back to the original.
    I use Rohypnol for a similar purpose.
  • Mike Caron (unregistered)

    So, no one commenting on how he's obviously keeping this file in the same place he keeps all his work stuff? I mean I can understand the accidental committal (shit happens), but it never would have happened if he kept his personal code separate from his work code...

  • Dan (unregistered)

    long tooth; double chin;

  • methinks (unregistered) in reply to Grammar Nazi
    Grammar Nazi:
    belgariontheking:
    GIYF:
    Dear Dave,

    A better idea would be to do a quick Google search and find out that you can in fact delete a file from a Subversion repository (if you use the URL).

    And Noah, do you even knowah anything about Subversion?

    kthxbye

    Well at the time Dave asked, he didn't know that he needed to delete a file. He thought he had too delete an "revision."

    Lern2Read

    FTFY. Geez, doesn't anyone no how too speak English these days?

    Cheese, dozen't anniwon no how two speak english these daze?

    FTFY

  • methinks (unregistered)

    ONLY WRITE THIS FCKING COMMENT WHEN NOBODY ELSE IS IN THE OFFICE ONLY WRITE THIS FCKING COMMENT WHEN NOBODY ELSE IS IN THE OFFICE

    captcha: eros - how curiously unfitting for this WTF ;o)

  • PITA (unregistered) in reply to davee123
    davee123:
    Where's the function to choose between Lorna Doones and Animal Crackers?

    I figured the WTF would be that he's always choosing Doones because Lorna.wouldIDoHer = true, but is false for animal crackers.

    DaveE

    Maybe he's not into beastiality.

  • PITA (unregistered) in reply to Grammar Nazi
    Grammar Nazi:
    belgariontheking:
    GIYF:
    Dear Dave,

    A better idea would be to do a quick Google search and find out that you can in fact delete a file from a Subversion repository (if you use the URL).

    And Noah, do you even knowah anything about Subversion?

    kthxbye

    Well at the time Dave asked, he didn't know that he needed to delete a file. He thought he had too delete an "revision."

    Lern2Read

    FTFY. Geez, doesn't anyone no how too speak English these days?
    Know

  • Jack (unregistered)
    wouldIDoHer = false;
    wouldSheDoMe = !wouldIDoHer;

    But really, this algorithm needs a lot more data.

    wouldSheDoMeOnHerBack
    wouldSheDoMeOnHerKnees
    fBloodAlcoholLevel
    iDaysSinceSheLastDidAnyone
    iDaysSinceAnyoneTried
    isBlindfolded
    isBlind
    ...
    My point being, the female cannot be reduced to a simple formula... God knows how much we've tried...
  • (cs) in reply to belgariontheking
    belgariontheking:
    GIYF:
    Dear Dave,

    A better idea would be to do a quick Google search and find out that you can in fact delete a file from a Subversion repository (if you use the URL).

    And Noah, do you even knowah anything about Subversion?

    kthxbye

    Well at the time Dave asked, he didn't know that he needed to delete a file. He thought he had to delete a "revision."

    Lern2Read

    Clearly, he was just worried that his updated rating of Darcy's legs wouldn't pass code review and he wanted to revert it with no trace.

  • (cs)
    SVN Commit 
       Message:
    
             Just what do you think you're doing, Dave?
             
             obligatory
    
    
  • jkupski (unregistered)

    I object to the girl data being hardcoded. What happens if a new girl is hired, an old girl leaves, or one suffers a disfiguring accident? You'd have to recompile!

    Girl data should be stored in a database--or if we're being enterprisey today, in an XML file.

  • CodeNinja (unregistered) in reply to Sutherlands

    I don't think you understand what a const reference does...

    Of course, if you get something as a const reference, you can't modify it without being a tool and casting it back to a normal reference (IE: 'girl1.face = 1' would fail at compile time if girl1 was a const reference). Besides, he's not attempting to modify any values in the Girl, just access them. Perfect example of a proper location to use a const reference.

  • (cs) in reply to boog
    boog:
    Actually, it's very easy to remove files from a Subversion repository's history.

    Coincidentally, it's even easier to completely demolish your repository while doing so.

    http://subversion.apache.org/faq.html#removal

    Unless you know of a better way. It seems #subversion doesn't. Do tell.

    Sutherlands:
    No, that makes sense. That way whatever you do to it in your function doesn't make it back to the original.
    Ahem, const...

Leave a comment on “Dave.cpp”

Log In or post as a guest

Replying to comment #:

« Return to Article