|
|
|
| Non-WTF Job: Software Developer at Rustici Software (Franklin, Tennessee) |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |
|
No doubt return_true_24() not only returns true, it aborts if it thinks that you're a terrorist seeking to take control of the US government.
|
|
What's wrong with this? I write functions all the time that return true.
captcha: tps mmmmmmmmm yeaaaaaaaaaaaah |
|
Of course it makes perfect sense. You need a family of functions to reflect varying degrees of 'truthiness'.
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:05
•
by
OMG
|
|
So, what's new?
enum Bool {
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:06
•
by
dpm
|
|
I call dibs on writing the return_true_42() function. ok dpm |
I'd be fascinated to see some examples -- ideally, three or more. Given the function's only purpose is to return a boolean value, I wonder what "slightly different" actions it could be performing... Some nasty side-effects, perhaps? Or maybe the code contains "#define bool int"? |
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:25
•
by
Autonuke
|
:-) return (bool) ( return_true_6() * return_true_9() ); |
|
The WTF for me is the Symantec add in the RSS feed that says 'Enterprise security software that gets to threats before they get to you'. Two things:
wtFFtw captcha: awesomeness |
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:27
•
by
Erzengel
|
(I hope you're joking) There's a differance between a function with a meaningful name that returns true, and a function whose stated purpose is to return true, and yet might not. One should give such a function a meaningful name so that maintainers will know what's really happening in the function: //Note: WTF's are intentionally preserved: Feel free to count them. bool return_true88() As you can see, you really don't know what's happening in 12, 5, and 19. All you know is that 88 tends to open a file, forget to close it, and contains no error checking. imagine if these had meaningful names, like CheckRegistry, CheckCommandVars, and ConfigExists. |
Proof positive that all maintenance programmers (like myself) are suckers. Captcha = awesomeness. I wish. |
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:31
•
by
OMG
|
Perhaps you meant return_true_6() * return_true_7(), or was that an intentional wtf? |
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:34
•
by
Jason
|
This Anonymous fails in a most spectacular way. Congratulations in showing your literary ignorance :P. |
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:35
•
by
Sarusa
|
http://en.wikipedia.org/wiki/The_Answer_to_Life,_the_Universe,_and_Everything
|
|
(rampant speculation) bool return_true_24() static int truthiness = 24;
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:39
•
by
narrator
|
|
The number 42 refers to The Answer to The Ultimate Question of Life, The Universe, and Everything from The Hitchhiker's Guide to the Galaxy by Douglas Adams. The ultimate question turned out to be 'what is six times nine', also from Adams' series. So... intentional, but not a WTF. |
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:40
•
by
marvin_rabbit
|
Nope. Yours is the WTF for now knowing The Hitchhikers Guide Trilogy lore. |
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:40
•
by
Zap
|
6*7 = 42 if you use a tridecimal system. |
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:42
•
by
Jason
|
|
and oddly enough, 6 * 9 = 42 in base 13.
Captcha: knowhutimean No, I don't think I do. |
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:46
•
by
Zap
|
actually, that should be "6*9" instead of "6*7". |
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:47
•
by
emurphy
|
|
"I may be a pretty sad person, but I don't make jokes in base 13." --Douglas Adams
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:49
•
by
PlasmaB
|
|
The only circumstances under which i would write a function like this is if i were writing a proc/function who's implementation has yet to be completed *and* i wish to test the rest of the system in isolation. This sort of thing should, of course, be FIXME'd to death! and never reach test, let alone live! The WTF is that there are coders out there that do this!!! Mind you don't trip over your spurs boys!!!
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 14:59
•
by
Jason
|
Which is why I said 'oddly enough'... |
|
it doesnt get better than this.... truly a "Representative Line" :D
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 15:06
•
by
nuclear_eclipse
|
|
The *real* WTF is that this article has turned into nothing but a pedantic HHGTTG festival....
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 15:17
•
by
PlasmaB
|
|
>The *real* WTF is that this article has turned into nothing but a pedantic HHGTTG festival.... agreed! lets have some *real* WTFs please! |
Re: Representative Line: Tetricosanary Logic
2006-11-14 15:25
•
by
newfweiler
|
I once quoted "Resistance is useless!" and was chided "Resistance is FUTILE! Get it right!". Evidently I was in the middle of a pendantic something else festival. |
|
Seems to me as if these functions were actually reverse-engineered from somewhere. That's how you get to names like these. That, or a massive amount of scripted program transformation...
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 15:31
•
by
Proud To Be Junior
|
|
The ultimate WTF method declaration we had at my last place from one of our Senior Software Developers was a method in java declared as: public List fetchSameButDifferent(List other);
I can't remember what it did (or tried to do), but I will never forget that name...
|
|
The REAL WTF is that they don't start numbering from zero! *ba dum bum pish* |
Re: Representative Line: Tetricosanary Logic
2006-11-14 15:44
•
by
bgodot
|
Resistance is Volts over Amperes. |
Re: Representative Line: Tetricosanary Logic
2006-11-14 15:51
•
by
badpazzword
|
|
Since we are in subject of WTFs and 42: (Source)
#include <stdio.h> #define SIX 1 + 5 #define NINE 8 + 1 int main() { printf( "The real meaning of life: %d\n", SIX * NINE ); return( 0 ); } |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:07
•
by
Matthew
|
|
Heh. That's clever. Thanks for sharing. :) Captcha: 1337 |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:08
•
by
bruzie
|
But how do you know that the question isn't 6 x 7? The computer that was calculating the great question (Earth) was compromised by the addition of the Golgafrinchams 2 million years before readout. Therefore the question was tainted - 6 x 9 = 42. The question was supposed to be calculated by the humans descended from the cavemen, not the telephone sanitisers. We don't know (and neither did DNA) what the true question was. |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:20
•
by
jkaiser
|
|
was beat to it.... |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:21
•
by
savar
|
|
The "real WTF" is that it isn't consolidated into one function:
return_true(int truthiness_level) {
Hmmm after rereading this I think I should have added explicit sarcasm tags. Or are they implied for all posts on TDWTF? |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:25
•
by
savar
|
Thanks for the link...I never read an analysis of a C program in Italian before. |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:35
•
by
Ghost Ware Wizard
|
|
<wtf/> what about: public int GetInt() { int } |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:35
•
by
Ghost Ware Wizard
|
|
<wtf/> what about: public int GetInt() { int nValue |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:35
•
by
Ghost Ware Wizard
|
|
<wtf/> what about: public int GetInt() { int nValue = |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:35
•
by
Ghost Ware Wizard
|
|
<wtf/> what about: public int GetInt() { int nValue |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:35
•
by
Ghost Ware Wizard
|
|
<wtf/> what about: public int GetInt() { int nValue = |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:35
•
by
Ghost Ware Wizard
|
|
<wtf/> what about: public int GetInt() { int nValue = 0; return nValue; } and then having all of your developers use GetInt when they need an local variable.
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:37
•
by
Ghost Ware Wizard
|
|
AAAAAAAAAAAAAAAAAA sorry people
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:38
•
by
Anonymous
|
That's nice, you should put that on the English version of Wikipedia. captcha: is already in my autocompletion list ;-) |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:38
•
by
sf
|
I prefer: if ( (bool) ( return_true_6() * return_true_9() ) == TRUE) return TRUE; else return FALSE; |
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:43
•
by
Hans
|
|
I hope you corrected the misguided pedant. The correct line is indeed "Resistance is useless!", as can be heard on track 16 of the CD edition. Oh, and for more information on this vital subject, please refer to this article. :-) |
|
the TRUE wtf is that it's not a tri-state! Bheh.... I was going to write something about how I want to wrap my hands around the whole dev team's necks including the project managers, but bleck... I've accepted the fact that craptastic shit like this is an everyday occurance. I only hope that I'm never on such a team...
|
Re: Representative Line: Tetricosanary Logic
2006-11-14 16:49
•
by
Whiskey Tango Foxtrot? Over.
|
Being pedantic about HGttG is entirely fun -- especially since I've been re-reading the series recently -- so I'm gonna go ahead and be pedantic and say: "Yeah, um, we never actually find out what the ultimate question is in the book, that part where Arthur pulls letters out of a hat is just a joke. Arthur got it, you should too. Also, the correct quote is 'what do you get when you multiply six by nine'."
Ok, I'm done. :D |
Re: Representative Line: Tetricosanary Logic
2006-11-14 17:05
•
by
Eam
|
|
bool return_true_24() { return Convert.ToBoolean("They have my daughter".ToString()); } |
Re: Representative Line: Tetricosanary Logic
2006-11-14 17:09
•
by
Otto
|
Agreed. DNA expanded the joke to actually make more sense in the book version, where Ford notes that it's probably the wrong question, or a variation on the right one (before they pull out the letters). Having it turn out to be a variation on the wrong one was the humorous bit, which most people miss anyway. In the radio series it is much less clear, I grant you. The gag there is more along the lines of it indeed being the correct question, it simply turns out that the universe itself was wrong. |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |