|
|
|
| Non-WTF Job: C++ Developer at Good Grievance (Ronkonkoma, NY) |
| « Prev | Page 1 | Page 2 | Next » |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 10:00
•
by
GettinSadda
|
|
Actually in the UK it's Happy Spring Bank Holiday!
Captcha: First! (not) |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 10:04
•
by
my name
(unregistered)
|
|
shesh, slow day!
captcha - doom |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 10:11
•
by
sig
(unregistered)
|
|
At least it's kind enough to beep when it's done :)
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 10:25
•
by
Nick
(unregistered)
|
|
So......many......Variants......
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 10:26
•
by
Look at me! I'm on the internets
(unregistered)
|
|
Poor Amy.
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 10:39
•
by
gygax
(unregistered)
|
|
Something inside me just hurts when I look at it.
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 10:40
•
by
Yarr
(unregistered)
|
|
Oh god, what happens if Amy leaves the company?
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 10:54
•
by
Shinobu
(unregistered)
|
|
"TO BE SPECIFEID" - the real WTF is that he can't spell.
If Amy leaves the company, they'll just search-and-replace her name for her replacement. Ah... business logic. |
|
CHeck with the Vatican: It's Whit Monday
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 11:03
•
by
Stiggy
(unregistered)
|
|
The real WTF has gotta that no-one's yet ripped into the use of VB(A) again, for a change.
A good programmer can code well in any langauge, just as surely as a bad one can write c&^p like this... |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 11:17
•
by
Alexander Dzhoganov
(unregistered)
|
|
The interesting side is that this is probably part of some in-house programming language they built for parsing documents. Think of the mind-boggling HORROR! I fear this system :/
Captcha: (a) pointer (misuse is better than this) |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 11:17
•
by
Brad
(unregistered)
|
|
I really want to know what this was used for...
Captcha: craaazy...yeah, no kidding |
|
Yet another failed attempt at job security...
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 11:39
•
by
fcardenas
(unregistered)
|
|
This function is used only from Monday to Thursday. On Fridays the system calls another similar funcion with the text "Pass to Amy next Monday"
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 11:51
•
by
bumblebeeman
(unregistered)
|
|
No way. I'm flabbergasted that someone would put that into production. I wonder if they feel bad about what they've done?
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 11:56
•
by
Vincent
(unregistered)
|
|
How about happy pentecost?
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 12:03
•
by
gotem
(unregistered)
|
Hey, this secures the job of both the programmer and Amy |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 12:24
•
by
DW
(unregistered)
|
|
I sure hope he wrote unit tests
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 12:32
•
by
bobbo
(unregistered)
|
|
Can somebody tell me how I set Firefox's Adblock extension to block lines of comment text which start with 'Captcha' please?
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 12:50
•
by
Failure Than Worse
(unregistered)
|
|
Anyone want to rewrite this in a C-style pseudocode for those of us who don't speak this language?
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 13:06
•
by
Eugene
(unregistered)
|
|
How do you know Amy isn't the programmer?
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 13:15
•
by
T$
(unregistered)
|
It's really not that bad: Select Case works like a switch statement. The Excel.Worksheet.RoundUp is using Microsoft Excel for some reason. If statements are the same. calculatethenumbers = "whatever" is equivalent to return "whatever" And beep as you may have guessed is a reserved word in VBA that beeps. That series of if statements confuses me though, I didn't know you could have if without an end if for one line statements, good to know. |
|
Cool. Truly classic, and truly a WTF?!!
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 15:01
•
by
Strilanc
(unregistered)
|
|
No variable naming, no function naming, no typing (the function's return type changes!!), hard coding customer names... looks like a classic case of function-does-too-much
I really, really hope this isn't used deep down in the system. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 15:03
•
by
Thomas
(unregistered)
|
|
Oh, crap.
Now, this is a nice one.... |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 15:09
•
by
Anonymous Coward
(unregistered)
|
You can do that with Greasemonkey. ... CAPTCHA: onomatopoeia |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 15:35
•
by
Shinobu
(unregistered)
|
Otherwise you wouldn't be able to write things like If A Then If B Then DoA Else DoB Else If B Then DoC Else DoDon one line. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 16:20
•
by
Joel
(unregistered)
|
|
It's a great day for us Canadians too. We had last Monday off, and this Monday we have no customers calling.
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 17:17
•
by
Mario
(unregistered)
|
|
Well, it's the 7th monday after easter: http://en.wikipedia.org/wiki/Public_holidays_in_Belgium.
Of note is that the official founding of the Christian church was yesterday. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 18:57
•
by
MK
(unregistered)
|
No, not unless Microsoft has changed the semantics of the language recently. Assigning to the function name sets the return value of the function, but the function does not actually exit until it reaches the end OR an "Exit Function" statement. In Delphi there's the "Result" implied variable for any function that does the same thing, it's just more obvious especially in recursive functions. Result := Result + ThisFunction(Number - 1); is a lot more obvious than the VB equivalent: ThisFunction = ThisFunction + ThisFunction(Number - 1) And even more so for functions that take no input parameters (which I'd almost say are a WTF all on their own, but do have their uses sometimes). In both languages, if you want to actually return that value right then, you have to say so explicitly. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 18:58
•
by
MK
(unregistered)
|
No, not unless Microsoft has changed the semantics of the language recently. Assigning to the function name sets the return value of the function, but the function does not actually exit until it reaches the end OR an "Exit Function" statement. In Delphi there's the "Result" implied variable for any function that does the same thing, it's just more obvious especially in recursive functions. Result := Result + ThisFunction(Number - 1); is a lot more obvious than the VB equivalent: ThisFunction = ThisFunction + ThisFunction(Number - 1) And even more so for functions that take no input parameters (which I'd almost say are a WTF all on their own, but do have their uses sometimes). In both languages, if you want to actually return that value right then, you have to say so explicitly. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 20:16
•
by
Daniel Beardsmore
|
Bobbo -- if you missed this, please see http://userscripts.org/scripts/show/7631 (something sjs posted to another thread). Works a charm, and uses the Greasemonkey extension. Bow before sjs (if it's his work) |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-28 20:25
•
by
Watson
(unregistered)
|
DoB DoB Do |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 01:06
•
by
Dark
(unregistered)
|
|
Silly Yarr. Amy isn't a person. Amy is the name of another function!
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 01:29
•
by
BillyBob
(unregistered)
|
Out of all that, you decided the spelling was the biggest issue? |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 03:05
•
by
csrster
(unregistered)
|
|
I am sure this Whitsuntide wtf is evidence that the Holy Spirit has come among us. Such coding is surely beyond the capabilities of one not inspired by Divine Grace.
|
|
My best guess is that x and y are Excel spreadsheet coordinates and that depending on what field we're in, it'll return some output... v, w and z probably some values from the same spreadsheet (w looks like a dropdown to me).
I think it's called from inside a loop where it's running thru all the fields (all the possible x and y values). If I were Amy I'd change that "Pass to Amy tomorrow" phrase to "Pass to Amy when hell freezes over".... |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 06:19
•
by
Dube
(unregistered)
|
|
What i really like is the "beep" at the end!
I hope this function is called multiple times to drive the user into madness |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 07:37
•
by
ajw
(unregistered)
|
|
This probably isn't as bad as it looks. My guess is that calculatethenumbers() gets called for each cell of an Excel spreadsheet, and does different things based on the coordinates.
It's probably a way of taking a really convoluted legacy spreadsheet that Marie in Accounts has produced in exactly the same way since 1992 and refuses to change, and turning it into something usable. A custom function used in exactly one place for exactly one purpose. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 08:21
•
by
dkf
(unregistered)
|
My guess is that it started that way, but has now transmogrified itself into a hairy monster that rules the company, simply because nobody anywhere dares touch it. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 09:36
•
by
sanitarium
(unregistered)
|
Cool, ta |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 09:42
•
by
M L
(unregistered)
|
I like how the text referred to this obvious VBA script in an Excel spreadsheet as "the system", as if it were a core application running on a mainframe. I guess it just doesn't sound like much of WTF if Alex had written "Ray Suker sends in a function from an Excel spreadsheet he inherited from some guy in accounting." |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 09:52
•
by
java.lang.Chris;
|
Here goes:
I think that preserves the insanity of the VB code, although I don't understand what that switch like statement does. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 09:58
•
by
java.lang.Chris;
|
You'd be surprised to learn how many critical applications in the finance sector are actually appalling hacks written in VBA. It seems every bank tries to avoid writing standalone applications by getting a semi-IT person to knock up something with Excel or Access. In fact, that's what the highly paid consultant sitting opposite me does. With a copy of "Excel VBA For Dummies" on his desk I might add. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 10:24
•
by
don't forget those who died
(unregistered)
|
|
'Happy' Memorial Day?
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 14:39
•
by
Harrow
(unregistered)
|
Amy probably has long since departed the company been successively replaced several times. The operator of this program is responsible for knowing the identity of the current "logical Amy". -Harrow. |
|
Are you sure you didn't take that code from one of the OMG WTF entries?
|
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 16:37
•
by
iToad
(unregistered)
|
This example demonstrates that it is possible to write bad VBA code in any language. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 16:58
•
by
Shinobu
(unregistered)
|
Brilliant! You made my day. |
Re: Classic WTF: calculatethenumbers(v,w,x,y,z)
2007-05-29 17:18
•
by
James Steiner
(unregistered)
|
As has been suggested, this code is an Excel macro, in VBA. As you guessed, "Select Case" is like a switch block. The Range function reports the value of the given spreadsheet cell. So, there you go. This function probably is called by one cell at the end of the row in in each row of a selection of rows. The variables are from cells from that row (some specific columns, of course), and it takes the bizzare pattern of input in those cells, and produces a column of values that (once the rows are sorted) might very well speed up or make easier the work of some poor clerical worker (a subord of Amy, no doubt). Its very likely that the source input is some "MUST NEVER BE CHANGED" mainframe database report, cut-and-pasted via 3270 emulator text screen-captures into a text file (possibly by a macro written in the 3270 emulator package's own macro language), then manually imported into Excel, then munged further with this macro. You probably can't believe that before caculatethenumbers, their jobs were even harder. I can. I've been there, done that, and made some pretty bizzare, but utterly useful and utterly specific-purpose spreadsheets to help the poor bastards out. You see, (customer facing) production is one thing. That's where the money is, all the spit and polish and unit testing. But then there's what some poor clerical worker in the basement has to do. Nobody cares about the clericals, or how to make their jobs easier with the fancy tools they have. They all have Excel, but none of them really knows how to use it. So, some sympathetic IT support fellow spends a few hours whipping up some monstrosity macro/template to try to ease their burden. It probabaly knocks 3 hours off the job every day. Then, they in the basement happily use that bizzare, single-purpose tool for the next 7 years, and hail the IT guy as a genius for ever after. ( At least, until the forced upgrade to the next version of Excel that breaks the macro, and the IT guy hasn't touched Excel macros in 7 years deserts them, and they go back to the old, hard, slow way, that nobody remembers how to do) Poor, piteous things. |
| « Prev | Page 1 | Page 2 | Next » |