Comment On Got Time?

Please program in more days, read the subject of one of Peter's unread e-mails. As the replacement for Noah, the company's veteran programmer, Peter was starting to get used to strange-sounding emails requesting simple hacks and tweaks to applications used by their clients. He opened up the message ... [expand full text]
« PrevPage 1 | Page 2 | Page 3 | Page 4Next »

Re: Got Time?

2006-02-14 14:16 • by anonyMouse
gotta love magic numbers

Re: Got Time?

2006-02-14 14:16 • by uncool
ewww....

Re: Got Time?

2006-02-14 14:18 • by Jimmy C
"...thousands of codes...", hilarious.

Re: Got Time?

2006-02-14 14:19 • by Trotsky
60071 in reply to 60070
4th!

Re: Got Time?

2006-02-14 14:20 • by Randolpho

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. ;)

Re: Got Time?

2006-02-14 14:20 • by R.Flowers
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.

Re: Got Time?

2006-02-14 14:20 • by Dry Humor
This guy really didn't Noah what he was doing!

Re: Got Time?

2006-02-14 14:21 • by WIldpeaks

Running out of days... Priceless

Re: Got Time?

2006-02-14 14:22 • by Gene Wirchenko
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

Re: Got Time?

2006-02-14 14:24 • by Edwin
Ow... brain...hurts....



Math, Good! 

Re: Got Time?

2006-02-14 14:25 • by WTF Batman
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]

Re: Got Time?

2006-02-14 14:25 • by pmagill
60079 in reply to 60075
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.)

Re: Got Time?

2006-02-14 14:27 • by .*
WTF! You'd think that learning division would be easier than copy+pasting all that.

Re: Got Time?

2006-02-14 14:28 • by Volmarias
60081 in reply to 60079
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.

Re: Got Time?

2006-02-14 14:30 • by Mung Kee
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.

Re: Got Time?

2006-02-14 14:30 • by Volmarias
60083 in reply to 60081

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

Re: Got Time?

2006-02-14 14:35 • by Ross Day
60086 in reply to 60081
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: Raise



Absolute brillant!

Re: Got Time?

2006-02-14 14:41 • by An apprentice
60087 in reply to 60078

Speaking of transcription errors...

Else
dayCount = 99999
dayCount = 99999
End If

XXX

Re: Got Time?

2006-02-14 14:41 • by Gene Wirchenko
60088 in reply to 60081
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

Re: Got Time?

2006-02-14 14:45 • by An apprentice
60089 in reply to 60087

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...

Re: Got Time?

2006-02-14 14:46 • by Albatross
60090 in reply to 60086
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: Raise


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

Re: Got Time?

2006-02-14 14:56 • by ChiefCrazyTalk
60092 in reply to 60089
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

Re: Got Time?

2006-02-14 15:02 • by Dan Waters
Noah was obviously not the kind of guy who was good at noticing patterns.

Re: Got Time?

2006-02-14 15:03 • by mrsticks1982
60094 in reply to 60074

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


 


sweet pun!!!

Re: Got Time?

2006-02-14 15:05 • by DopefishJustin
Well, it's Visual Basic (QBasic?), what do you expect? :P

Re: Got Time?

2006-02-14 15:11 • by diaphanein
60097 in reply to 60095
Too bad this Noah didn't drown in the flood. It would have saved a few of Peter's brain cells.

Re: Got Time?

2006-02-14 15:18 • by Manni
60100 in reply to 60095

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.

Re: Got Time?

2006-02-14 15:20 • by travis
60101 in reply to 60081
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.

Re: Got Time?

2006-02-14 15:28 • by pmagill
60102 in reply to 60095
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.

Re: Got Time?

2006-02-14 15:33 • by sir.steve.h

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

dayCount = totalHours / 24
hourCount = totalHours % 24

Or does VB not support modulus?

Re: Got Time?

2006-02-14 15:35 • by pmagill
60105 in reply to 60103
VB does support modulus:

hourcount = totalHours Mod 24

Nice and easy to read.

Re: Got Time?

2006-02-14 15:37 • by Nemo
Now this is what I come here for: Real mind-blowing stupidity. Not that
subtle stuff like we've been getting recently. More Noah!



Re: Got Time?

2006-02-14 15:38 • by Bob
60107 in reply to 60103
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

Re: Got Time?

2006-02-14 15:38 • by Manni
60108 in reply to 60102

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.

Re: Got Time?

2006-02-14 15:39 • by Greg
60109 in reply to 60070

"...thousands of codes..."

Would he get them from the internets?

Re: Got Time?

2006-02-14 15:42 • by Runtime Error
60110 in reply to 60100
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.





Re: Got Time?

2006-02-14 15:43 • by R.Flowers
60111 in reply to 60081

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!

Re: Got Time?

2006-02-14 15:44 • by osp70

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

Re: Got Time?

2006-02-14 15:45 • by Djinn
60113 in reply to 60102
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?

Re: Got Time?

2006-02-14 15:46 • by Javariel
60114 in reply to 60103
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





Re: Got Time?

2006-02-14 15:48 • by Matt
60115 in reply to 60110
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.

Re: Got Time?

2006-02-14 15:50 • by Runtime Error
60116 in reply to 60115
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.

Re: Got Time?

2006-02-14 15:54 • by CodeMonkey
60117 in reply to 60114
No, don't hard code in numbers...you never know when the number of hours in a day will change!

Re: Got Time?

2006-02-14 15:54 • by pmagill
60118 in reply to 60114
[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]

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!

Re: Got Time?

2006-02-14 15:55 • by Manni
60119 in reply to 60110
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.


D o u b l e   T r u e

Re: Got Time?

2006-02-14 15:56 • by osp70
60120 in reply to 60110

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.

Re: Got Time?

2006-02-14 16:00 • by Manni
60121 in reply to 60119

Manni:


True that.


D o u b l e   T r u e



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?

Re: Got Time?

2006-02-14 16:03 • by nobody
60122 in reply to 60115
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
.....

Re: Got Time?

2006-02-14 16:12 • by pmagill
60123 in reply to 60121
Manni:

Manni:


True that.


D o u b l e   T r u e



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.

Re: Got Time?

2006-02-14 16:16 • by Pyromancer
60124 in reply to 60120
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]

« PrevPage 1 | Page 2 | Page 3 | Page 4Next »

Add Comment