• anonyMouse (unregistered)

    gotta love magic numbers

  • uncool (unregistered)

    ewww....

  • Jimmy C (unregistered)

    "...thousands of codes...", hilarious.

  • Trotsky (unregistered) in reply to Jimmy C

    4th!

  • Randolpho (unregistered)

    I believe I've seen coders use this technique before.

    I think they call it the "Job Security" method. Although, obviously, it doesn't work, since Noah got replaced. ;)

  • (cs)

    Peter had to make a willful decision to never consult a reference book, a website, a colleague... how did he manage to learn to code at all? Then there is the term 'granular' which is a really fancy-sounding word. It would make you believe that the person might know something about date and time functions.

  • Dry Humor (unregistered)

    This guy really didn't Noah what he was doing!

  • (cs)

    Running out of days... Priceless

  • (cs)
    Alex Papadimoulis:
    Please program in more days, read the subject of one of Peter's unread e-mails.


    I could do with more Saturdays myself.

    I do not see the WTF.  Is it the request or the code?  I could easily go for both fitting.

    Sincerely,

    Gene Wirchenko

  • Edwin (unregistered)

    Ow... brain...hurts....

    Math, Good! 

  • (cs)

    ElseIf totalHours <= 48 Then
    dayCount = 1
    hourCount = 0



    Shouldn't this be daycount = 2 ? Probably a transcription error, but I wonder how many similar bugs there were? Nothing like reinventing modular arithmetic or simple division. Eesh.

    [Note from Alex: Whoops -- anonymization typo]

  • pmagill (unregistered) in reply to WIldpeaks

    Everyone knows that our days here are numbered.  Why should our applications be any different?

    CAPTCHA = register (Again!  Alex must be trying to give me a hint.)

  • .* (unregistered)

    WTF! You'd think that learning division would be easier than copy+pasting all that.

  • (cs) in reply to pmagill

    Ladies and gentlemen, I present to you:

    J O B S E C U R I T Y I N A N U T S H E L L

    Noah is an absolute genius, plain and simple. I don't believe for a single minute that he didn't know how to do this the right way.

  • (cs)

    Who the hell is monitoring these developers?  How do they get away with this?  If I were Peter I would be wondering where the other hot steaming piles were.

  • (cs) in reply to Volmarias

    Ok, that came out looking much better before I posted. Thanks, HTML, for killing extra spaces. Lets see if the forum software takes the extra step of safeing this! J O B   S E C U R I T Y   I N   A   N U T S H E L L

  • (cs) in reply to Volmarias

    Is this job security?   ...or is it for performance evaluations?

    Employee: Noah
    Number of Support Tickets Opened: 55908598095809550
    Number of Support Tickets Closed: 55908598095809545
    Number of Support Tickets Left Open: 5 (assuming he had at least some "real" problems)

    Average Ticket Lifetime (Open to Close): 6.17 minutes


    Recommendation: <font color="red" size="5">Raise</font>

    Absolute brillant!

  • An apprentice (unregistered) in reply to WTF Batman

    Speaking of transcription errors...

    Else
    dayCount = 99999
    dayCount = 99999
    End If

    XXX

  • (cs) in reply to Volmarias
    Volmarias:
    Noah is an absolute genius, plain and simple. I don't believe for a single minute that he didn't know how to do this the right way.


    You have more faith in people than I do.

    Sincerely,

    Gene Wirchenko

  • An apprentice (unregistered) in reply to An apprentice

    Attacked by forum software again...

    I just wanted to mention that the guy just assumes some value as the error code for 'values out of range' and hopes it gets caught somewhere upstream. Shouldn't he do something reasonable instead like throwing an exception?

    But he would have to know what an exception is...

  • (cs) in reply to Ross Day
    Ross Day:
    Is this job security?   ...or is it for performance evaluations?

    Employee: Noah
    Number of Support Tickets Opened: 55908598095809550
    Number of Support Tickets Closed: 55908598095809545
    Number of Support Tickets Left Open: 5 (assuming he had at least some "real" problems)

    Average Ticket Lifetime (Open to Close): 6.17 minutes


    Recommendation: <FONT color=red size=5>Raise</FONT>

    Absolute brillant!

    And Peter:

    Employee: Peter
    Number of support tickets opened:  6
    Number of support tickets closed:  1
    Number of tickets left open:  5
    Average Lifetime:  20 minutes

    Recommendation:  Not as good as Noah

  • ChiefCrazyTalk (unregistered) in reply to An apprentice
    Anonymous:

    Attacked by forum software again...

    I just wanted to mention that the guy just assumes some value as the error code for 'values out of range' and hopes it gets caught somewhere upstream. Shouldn't he do something reasonable instead like throwing an exception?

    But he would have to know what an exception is...

     

    And not be using VB

  • Dan Waters (unregistered)

    Noah was obviously not the kind of guy who was good at noticing patterns.

  • (cs) in reply to Dry Humor

    Anonymous:
    This guy really didn't Noah what he was doing!

     

    sweet pun!!!

  • DopefishJustin (unregistered)

    Well, it's Visual Basic (QBasic?), what do you expect? :P

  • diaphanein (unregistered) in reply to DopefishJustin

    Too bad this Noah didn't drown in the flood. It would have saved a few of Peter's brain cells.

  • (cs) in reply to DopefishJustin

    Anonymous:
    Well, it's Visual Basic (QBasic?), what do you expect? :P

    I was wondering where the VB haters were. Thanks for showing up guys. And you're absolutely right, VB has absolutely no constructs for dealing with this problem in a simplified way. Thank God all other languages automatically de-stupid your code when you try to do stuff like this. Because after all, this would NEVER happen in C#.

    Or...could it? Hrm, I guess it's possible that the problem is the "programmer", and not the language. Nah, that's just crazy talk.

  • travis (unregistered) in reply to Volmarias
    Noah is an absolute genius, plain and simple. I don't believe for a single minute that he didn't know how to do this the right way.

    No, he was a blockhead who was never taught modular arithmetic, and also never looked for a better way, even after programming thousands of lines of boilerplate code. Look at the first comment. He clearly thought there would be trouble if the client asked for finer granularity.

    Client: Say, perhaps we could have a faster turnaround now that we want hourly granularity...
    Noah: No! No! I've consulted with the finest minds of our generation! I'm telling you, what you ask for is against the laws of physics! You'll just have to wait while I code your request.

  • pmagill (unregistered) in reply to DopefishJustin
    Anonymous:
    Well, it's Visual Basic (QBasic?), what do you expect? :P


    VB isn't the problem at all.  The problem is no talent people looking to get into application development becuase "that's where all the good jobs are."  VB's only downfall is that it became know as easy, which it isn't.  As proof look at how many people use the language to write poor code. 

    Poor code is not language specific, neither are poor pratices.
  • sir.steve.h (unregistered)

    So, I take it that this would have been a good replacement?

    dayCount = totalHours / 24
    hourCount = totalHours % 24

    Or does VB not support modulus?

  • pmagill (unregistered) in reply to sir.steve.h

    VB does support modulus:

    hourcount = totalHours Mod 24

    Nice and easy to read.

  • Nemo (unregistered)

    Now this is what I come here for: Real mind-blowing stupidity. Not that subtle stuff like we've been getting recently. More Noah!

  • Bob (unregistered) in reply to sir.steve.h
    Anonymous:

    So, I take it that this would have been a good replacement?

    dayCount = totalHours / 24
    hourCount = totalHours % 24

    Or does VB not support modulus?

    Of course it does:

    hourCount = totalHours mod 24

  • (cs) in reply to pmagill

    pmagill:
    Anonymous:
    Well, it's Visual Basic (QBasic?), what do you expect? :P


    VB isn't the problem at all.  The problem is no talent people looking to get into application development becuase "that's where all the good jobs are."  VB's only downfall is that it became know as easy, which it isn't.  As proof look at how many people use the language to write poor code. 

    Poor code is not language specific, neither are poor pratices.

    I would marry you if we lived in Vermont.

  • Greg (unregistered) in reply to Jimmy C
    "...thousands of codes..."
    Would he get them from the internets?
  • Runtime Error (unregistered) in reply to Manni
    Manni:

    Anonymous:
    Well, it's Visual Basic (QBasic?), what do you expect? :P

    I was wondering where the VB haters were. Thanks for showing up guys. And you're absolutely right, VB has absolutely no constructs for dealing with this problem in a simplified way. Thank God all other languages automatically de-stupid your code when you try to do stuff like this. Because after all, this would NEVER happen in C#.

    Or...could it? Hrm, I guess it's possible that the problem is the "programmer", and not the language. Nah, that's just crazy talk.



    VB, much like generic beer and America's Funniest Home Videos is an enabling technology for stupid people.  It allows stupid people to do stupid things on scale that they couldn't accomplish on their own.  While using VB does not make you a dumb programmer, being a dumb programmer does make VB your weapon of choice.  That is unless you really don't know what the fuck you are doing, then its PHP all the way.


  • (cs) in reply to Volmarias

    Volmarias:
    Ladies and gentlemen, I present to you: J O B S E C U R I T Y I N A N U T S H E L L Noah is an absolute genius, plain and simple. I don't believe for a single minute that he didn't know how to do this the right way.

    And as a bonus, he made his successor look like a friggin' genius!

  • (cs)

    A Paula Translation:

    private sub GetDaysAndHours(byval totalHours as integer, byref dayCount as integer, byref hourCount as integer)

       If totalHours = 0 then

          return

       end if

       hourCount += 1

       totalHours -= 1

       if hourCount = 24 then

         hourCount = 0

        dayCount += 1

       end if

       GetDaysAndHours(totalHours, hourCount, dayCount)

    end sub

  • (cs) in reply to pmagill
    Anonymous:
    Anonymous:
    Well, it's Visual Basic (QBasic?), what do you expect? :P


    VB isn't the problem at all.  The problem is no talent people looking to get into application development becuase "that's where all the good jobs are."  VB's only downfall is that it became know as easy, which it isn't.  As proof look at how many people use the language to write poor code. 

    Poor code is not language specific, neither are poor pratices.


    Which makes VB the problem. Let's keep programming difficult and arcane to keep out the undedicated. Look at HTML for god's sake. How much time have we all wasted on other people's crap HTML? Even Java and C# are too easy, but at least there are errors to scare people off (Unsatisfied link error ... ; expected). VB is too readable, too inviting, too easy. Plus it sucks as a language (no short circuiting, 'shared' as static is borked, no break statement, etc).

    Because jokes are easy to miss here: This post is only half-serious. The part about VB sucking as a language is true, the rest is a joke. I'm being sarcastic. See how quickly the humor degrades as it's pointed out?
  • (cs) in reply to sir.steve.h

    Even if by some wierd quirk it didn't, here's the black magic modulus replacement (assumes daycount is an integer):

    dayCount = totalHours/24
    hourCount = totalHours - dayCount * 24


  • Matt (unregistered) in reply to Runtime Error
    Anonymous:
    Manni:

    Anonymous:
    Well, it's Visual Basic (QBasic?), what do you expect? :P

    I was wondering where the VB haters were. Thanks for showing up guys. And you're absolutely right, VB has absolutely no constructs for dealing with this problem in a simplified way. Thank God all other languages automatically de-stupid your code when you try to do stuff like this. Because after all, this would NEVER happen in C#.

    Or...could it? Hrm, I guess it's possible that the problem is the "programmer", and not the language. Nah, that's just crazy talk.



    VB, much like generic beer and America's Funniest Home Videos is an enabling technology for stupid people.  It allows stupid people to do stupid things on scale that they couldn't accomplish on their own.  While using VB does not make you a dumb programmer, being a dumb programmer does make VB your weapon of choice.  That is unless you really don't know what the fuck you are doing, then its PHP all the way.


     

    You forgot to put your flame suit on.

  • Runtime Error (unregistered) in reply to Matt
    Anonymous:
    Anonymous:
    Manni:

    Anonymous:
    Well, it's Visual Basic (QBasic?), what do you expect? :P

    I was wondering where the VB haters were. Thanks for showing up guys. And you're absolutely right, VB has absolutely no constructs for dealing with this problem in a simplified way. Thank God all other languages automatically de-stupid your code when you try to do stuff like this. Because after all, this would NEVER happen in C#.

    Or...could it? Hrm, I guess it's possible that the problem is the "programmer", and not the language. Nah, that's just crazy talk.



    VB, much like generic beer and America's Funniest Home Videos is an enabling technology for stupid people.  It allows stupid people to do stupid things on scale that they couldn't accomplish on their own.  While using VB does not make you a dumb programmer, being a dumb programmer does make VB your weapon of choice.  That is unless you really don't know what the fuck you are doing, then its PHP all the way.


     

    You forgot to put your flame suit on.



    I figured most of the PHP guys wouldn't figure out how to get past the captcha thing.
  • CodeMonkey (unregistered) in reply to Javariel

    No, don't hard code in numbers...you never know when the number of hours in a day will change!

  • pmagill (unregistered) in reply to Javariel

    [sarcasm]
    <sarcasm>Too easy djinn?  Go home and write everything in machine language then.  Higher level languages do have thier place.  Matter of fact I'm going to start that right now!  Heh talk about job security, and no compiler needed!
    </sarcasm>[/sarcasm]

    I would agree with you about VB having limitations, but I wouldn't say it sucked.  In capable hands the language is powerfull, but that goes for any language.  VB does do a lot of handholding and for an experianced developer this often got in the way, but sucking?  I think not.


    And manni, umm, yeah, how bout them steelers?  Err, Power tools!

  • (cs) in reply to Runtime Error
    Runtime Error:
    Manni:

    Anonymous:
    Well, it's Visual Basic (QBasic?), what do you expect? :P

    I was wondering where the VB haters were. Thanks for showing up guys. And you're absolutely right, VB has absolutely no constructs for dealing with this problem in a simplified way. Thank God all other languages automatically de-stupid your code when you try to do stuff like this. Because after all, this would NEVER happen in C#.

    Or...could it? Hrm, I guess it's possible that the problem is the "programmer", and not the language. Nah, that's just crazy talk.



    VB, much like generic beer and America's Funniest Home Videos is an enabling technology for stupid people.  It allows stupid people to do stupid things on scale that they couldn't accomplish on their own.  While using VB does not make you a dumb programmer, being a dumb programmer does make VB your weapon of choice.  That is unless you really don't know what the fuck you are doing, then its PHP all the way.


    True that.

    <FONT color=#000000 size=6><FONT color=#0000ff>D</FONT> <FONT color=#ff0000>o <FONT color=#ffff00>u</FONT> </FONT><FONT color=#0000ff>b</FONT> <FONT color=#008000>l</FONT> <FONT color=#ff0000>e</FONT>   <FONT color=#ffff00>T</FONT> <FONT color=#0000ff>r</FONT> <FONT color=#008000>u</FONT> <FONT color=#ff0000>e</FONT></FONT>

  • (cs) in reply to Runtime Error

    I think we should ban all programming languages and go back to using 1's and 0's.  That way only people who are really dedicated will be using these computers.  Shit, just take away computers and bring back the tablets. 

    Those that fear the evolution of technology and say 'See told ya that new fangled thingy is bad news'  make me shake my head. 

    Think about it.  The evolution of programming has been to abstract the past level of programming.  Assembly removed the 1's and 0's, then some other language replaced that. 

    I would rant on but you know, I haft to pick up my hammer and pick and get back to the tablets.

  • (cs) in reply to Manni

    Manni:

    True that.

    <FONT color=#000000 size=6><FONT color=#0000ff>D</FONT> <FONT color=#ff0000>o <FONT color=#ffff00>u</FONT> </FONT><FONT color=#0000ff>b</FONT> <FONT color=#008000>l</FONT> <FONT color=#ff0000>e</FONT>   <FONT color=#ffff00>T</FONT> <FONT color=#0000ff>r</FONT> <FONT color=#008000>u</FONT> <FONT color=#ff0000>e</FONT></FONT>

    Damn forum software didn't color the text right. If you quote my response, you'll see it's correct. You know what the real WTF is here right? Flightless birds. Seriously, does that make any sense?

  • nobody (unregistered) in reply to Matt

    Just wondering if the client either thought "Peter must be a genius"
    or "Noah was a dumbass", what do you think?

    Would have been funny if he "improved execution time" with some kind
    of binary search:

    if totalHours <= 480 then
        if totalHours <= 240 then
    .....

  • pmagill (unregistered) in reply to Manni
    Manni:

    Manni:

    True that.

    <font color="#000000" size="6"><font color="#0000ff">D</font> <font color="#ff0000">o <font color="#ffff00">u</font> </font><font color="#0000ff">b</font> <font color="#008000">l</font> <font color="#ff0000">e</font>   <font color="#ffff00">T</font> <font color="#0000ff">r</font> <font color="#008000">u</font> <font color="#ff0000">e</font></font>

    Damn forum software didn't color the text right. If you quote my response, you'll see it's correct. You know what the real WTF is here right? Flightless birds. Seriously, does that make any sense?



    Ahh only partially, flightless birds that swim I can see, they just fy in a different medium, ex. penguins.
    Now Ostriches I don't understand, but I hear they taste good.
  • Pyromancer (unregistered) in reply to osp70
    osp70:

    I think we should ban all programming languages and go back to using 1's and 0's.  That way only people who are really dedicated will be using these computers. 

    But to  avoid wtfs like today's programmers need to be taught military-style:

    "Waddaya mean you can't write programs with hex-editor?Get to work you lame code-monkey!" [:D]

Leave a comment on “Got Time?”

Log In or post as a guest

Replying to comment #:

« Return to Article