- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
<FONT color=#000080 size=5>Random Thoughts - with Tom C.O.</FONT>
<FONT face="Courier New" size=2><FONT color=#000080>public object</FONT> BankWithUs(<FONT color=#000080>int bankKey</FONT>, <FONT color=#000080>object</FONT> PLEASE_DO_NOT_ROB);</FONT>
<FONT face="Courier New">object GoToBankAndPassTheJuice = new BankWithUs(OurBank,humanObject(initWithJuice));</FONT>
<FONT face="Courier New">GoToBankAndPassTheJuice.withdrawal(initWithForce);</FONT>
Caught?! How did that happen? I'm sure I passed a reference to "the juice"!
Admin
I hate being the prick that says "You're all wrong." So, I'll try this instead.
Ahem; "Just about everyone has been partially right!"
Illudium PU-36 Explosive Space Modulator.
According to this, Uranium was at least temporarily correct. As opposed to geranuim, which was never correct except in Pogo.
Admin
There is a "MAIN DRAIN" sign hanging off of some pipes in the stairwell at work and every time I pass it all I can think of is Joe vs. The Volcano.
Admin
I need to get me one of those. :-)
Admin
I think that it will cause a magnetic disturbance that will crash planes.
Admin
// Please do not read this comment
// Thank you
Admin
ha! .. very nice! thanks for a good laugh.
Great WTF, great comments.
It's nice to see a simple WTF now and then that doesn't involve trying to parse dozens of lines of madening source code.
Admin
<FONT size=2><FONT face="Courier New"><FONT color=#000080>public object<FONT color=#000000> LoadOrg(</FONT><FONT color=#000080>int</FONT><FONT color=#000000> cmpKey, </FONT></FONT><FONT color=#ff0000>IObject</FONT><FONT color=#000000> DO_NOT_USE_AT_ALL_EVER);</FONT></FONT></FONT>
<FONT size=2><FONT face="Courier New"></FONT></FONT>
Admin
a. how can one call the method without providing all the parameters?
2. What happened?!
Heh, the captcha is 'random'
Admin
"I have no response to that" was also used in "LA Story", also a brilliant movie.
Admin
So I instantiated a do_not_use_at_all_ever object, which I won't use at all ever, so I can use LoadOrg as required. But if I use my do_not_use_at_all_ever object for LoadOrg then I'm no longer not using the do_not_use_at_all_ever object.
I'm stuck.
--Rank
Admin
And then the Python said:
>>> import this
And it was good.
Admin
it becomes fairly obvious from this (and other) comments why female programmers do not exist. Couldn't say coworker, couldn't say another programmer, had to say female programmer. Lucky for all of us male programmers never make mistakes and are never singled out as a group for ridicule. Once worked with a male programmer whose code was always half done and half right, but I never thought it was cause he was male, just that he was incompetent.
Admin
It becomes fairly obvious that some people lack the necessary education to recognize a bible parody, in this case Genesis chapter 2 (the story about Adam and Eve).
Admin
cough I know a female programmer that write his code WITHOUTH TABULATION
if (something()) { whatever()} else if (whatever()){ foo()
} else if (other()) { dadadadadadad(); i = i +1; foo() };
.... tons of code.
After the program is finished, this female rewrite the code adding the tabulation. cough
--Tei
Admin
Admin
It would have been simpler to mark the second parameter as const, wouldn't it?
And, frankly, what interesting things can they do inside the funcition if the type of argument is only known to be as 'object'? Convert to string? Store in hashtable? Does it hurt ? (I've never been converted)
Seriously if they don't want caller to pass the second argument, they should have name it 'DO_NOT_PASS_ANYTHING', or just 'USE_NULL_HERE'.
And even more seriously: why do they expose such an interface instead of
public object LoadOrg(int cmpKey) { LoadOrg(cmpKey,null); }
...which is probably already implemented if [as mentioned earlier] the method uses default parameters (but in this case you can't expect to have different access privilege than the full version, though)
Admin
Er, I presume the argument was named so because it was impossible to change the method signature at this stage, but was there something that prevented the original implementer from doing
and continuing?or maybe even
I'm using Java here, but should look almost the same in C# I presume...
Admin
It becomes fairly obvious that some people leap to conclusions. I think you'll find that this was a response to an earlier post by Digitalbath, not to the bible parody. But yes, it would help if people could quote what they are replying to.
Hmm: I hope the captcha of 'clueless' isn't referring to my post ...
Admin
Anonymous was referring to:
as sexist. I happen to agree with anonymous in this case.
Admin
don't worry...you're not the one to correct them...
http://looneytunes.warnerbros.com/stars_of_the_show/marvin_the_martian/marvin_story.htmlwhy not check the proper site?
Admin
One question I am thinking about is not answered yet:
I do understand I must not "use" the Object, but what does s/he mean? May I use the object before I passe it to the function? Do I have to throw it away like a "disposable object" (I don't know if this is the right translation). Must it be null?
Whatever...
greetings
Admin
And this forum-software is the worst I've ever seen.
Admin
If it's a deprecated parameter, than why not do as a previous poster said and mark it using the ObsoleteAttribute? Then create a new overload that doesn't include said parameter. Sure seems it would be a lot more helpful than marking it as the "forbidden fruit" parameter.
Admin
Unless not crossing them doesn't work...
Admin
I sort of envy you.
You are new to internet and are about to discover a lot of interesting stuff out there.
Don't be discouraged by the implementation of the sites though, just enjoy them.
captcha: bedtime ?
I guess it is.
Admin
This WTF reminds me of some of the rather not so good ideas I had shortly after I discovered the fancy world of computer programming (I'm a hobbyist, no professional). I made my first steps in Visual Basic 6 and was amazed by the IntelliSense features of VB's IDE at that time. One especially "interesting" thing was the feature that every time you typed in a function call and encountered a parameter of an enum type, the IDE automatically popped up a list with all the available constants of this enum. So the idea grew in my mind that you could abuse this to display usage notes, help or other documentation for the function.
The plan was kind of like this:
<font face="Courier New">Public Enum SomeFunction_Documentation
This_is_a_function_doing_something_useful
ParamA__Pass_your_important_data_here
ParamB__pass_your_even_more_important_data_here
Return_value__Returns_an_object_of_calss_SomethingUseful
Raises_a_FileNotFound_error_if_ParamB_is_dividable_by_2_or_a_date
End Enum
Public Function SomeFunction(ParamA As Variant, ParamB As Variant, Optional DoNotUseMe As SomeFunction_Documentation)
'...
End Function
</font>Luckily, the idea never made it into reality...
Admin
Wow, that is a beautiful (if disturbing) WTF. Kinda brings the whole concept of literate programming to a new level.
Admin
PS:
That's what JavaDoc is for. Did VB's IDE not have something similar that showed the documentation?
Pete
Admin
Its not.
The next level Is to replace txt code by xml code (or binary). So you can tint your code, use bold, italic, place tooltips, place buttons, etc.. you can do that with Black Box Oberon Pascal. I dont like it.
-Tei
Admin
I know. Now. That was several years ago and I was a bloody beginner at that time. I didn't even know what a "documentation" was, I just used the word here to make things easier to understand.
Hmm, how do you program the buttons? Can you insert buttons into the code behind the buttons as well?
Admin
Now there's a book I havent seen for about 10 years.
My sister used to be scared of it :P
Admin
Build one. Counters aren't complicated....
If you dont go for electronics, then find a simple diagram for hooking a button to the joystick or parallel port and write a short counting program.
Also, Im pretty sure the radio telescope near here has had various devices like this over the years... They often have open days, and the electronics guys are often building little gadgets for a laugh.
Edit: I should have quoted the comments about the lucas heights reactor and someone wanting a similar counter... Stupid forum software... Never seems to do what you expect.
Admin
Hey, this is the second "Steve" in a row! Was it here at TDWTF that I read about the "steve to girl ratio"?
Admin
if (<font face="Courier New" size="2">DO_NOT_USE_AT_ALL_EVER_I_MEAN_IT.equals(</font>DOES_ANYBODY_WANT_A_PEANUT)) {return "Oook!";}
(Weird .... my captcha just happens to be "null".)
Admin
Similarly, Java 1.5 has the @Deprecated annotation. Most decent compilers will also pick up a @deprecated tag inside Javadoc too.
Admin
<font face="Arial" size="2">I am actually kind of surprised that no-one has suggested this usage of the method, since it is something that I see quite often when reviewing code made by less-than-perfect-programmers.
This is clearly an example of a solution to the "overload-dilemma" that occurs when it is discovered that you need an overload to an existing method, that does more or less the same as the primary method, but in a slightly different way. This method will require the same input-parameters as well as return value, so you cannot make a clean overloaded method. Instead a bogus input variable is specified which solves the problem for the programmer ... but not necessarily for the overall application.
Jesper Stocholm
</font><font face="Arial" size="2">http://stocholm.dk</font>
Admin
You select it, then right-click. A menu show to change label, and set oncommand function, and two guards (functions to disable/able the button). These functions are also in the source code. You can think that the source code is a big delphi form to where place code and forms.
Here is this stuff: http://www.oberon.ch/blackbox.html
The fun stuf is.. you manually place code folders, and your source code can crash :D
I dont like it because is Pascal, and very strongly typed, and is designed as a strong framework with Oberon-OS ideas. So its dificult to read and write text files... And because is slighty underpowered for hacking. Its much better to use python with a gui console, or maybe beanshell.
Sorry the OT.
--Tei
Admin
You should at least check with M before you blame Q.
Admin
An accepted method of saving space surely? Otherwise, you'd need a wrapper function . . .
void recurse(void)
{
_recurse(1);
}
static void _recurse(int I_MUST_BE_NULL)
{
if (null == I_MUST_BE_NULL)
return recurse(1);
else
return recrse(I_MUST_BE_NULL + 1);
}
He he he :)
Sam
And yes, this post is sarcastic*.
* Apart from that sentence. Or was it?
Admin
Why isn't that button labeled "DO_NOT_PUSH_ME_AT_ALL_EVER" instead of "Quote"? People would use it all the time that way...
(And yes, when I was new to this forum I always hit "Reply" as my first order of business, then searched in vain for a way to quote the post I was referring to...)
Admin
You mean like pre-increment and post-increment?
int operator++(int& i);
int operator++(int& i, int DO_NOT_USE_ME_AT_ALL_EVER);
This technique is actually taught in textbooks, at least as applied to C++.
Admin
Yanks eh? They never got the hang of C++.
Admin
That's nice... but WROOONG! Why not create another function and hide this one and initiate the recursion internally? Or maybe one more will overload the compiler, eh?
Admin
Is do what mean you? WTF?
-dZ.
Admin
I don't know german, but I saw Das Boot and Stalag 17, so I understand what that is.
dZ.
Admin
You mean, the .NET Framework has been flagged obsolete, already?
An we thought it had such promise...
dZ.
Admin
I know, I know .... there is a buffer overrun somewhere that poisons the stack. The extra parameter is a hack to prevent the overrun from doing anything dangerous, from someone who couldn't figure out what was happening.
Admin
On the dev team at my workplace, we have two Terry's (both male) and one female.
Admin
<FONT face=Tahoma size=2>and who said three into two doesn't go?</FONT>
<FONT face=Tahoma size=2></FONT>
<FONT face=Tahoma size=2></FONT>
<FONT face=Tahoma size=2></FONT>