• (cs)

    <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"!

     

  • (cs) in reply to marvin_rabbit
    marvin_rabbit:
    Anonymous:
    Anonymous:
    Anonymous:
    Alex Papadimoulis:

    <font face="Courier New" size="2">DO_NOT_USE_AT_ALL_EVER);</font>

    <font face="Courier New" size="2"><font color="#000080">public</font> <font color="#000080">void</font> SaveOrg(<font color="#000080">int</font> cmpKey, <font color="#000080">object</font> org, <font color="#000080">object</font> DO_NOT_USE_AT_ALL_EVER);</font>

    I wonder if the parameter should be of type object.  Maybe it should inherit from a base class such as the Illudium236SpaceModulator class.



    I thought it was Uranium PU-36?

    My WTF.  It is actually 'illudium Q-38 explosive space modulator'


    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.
     
  • (cs) in reply to Drew
    Anonymous:
    Much like opening/closing the main drain in Joe vs. the Volcano, it probably does nothing.


    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.
  • JoeBloggs (unregistered) in reply to Kelsey
    Anonymous:
    This reminds me of touring through Australia's only nuclear reactor at Lucas Heights, near Sydney. Inside the reactor there is a button, which says

    'Do Not Press This Button'

    Apparently it was hooked up to a counter. Particularly fun on open to the public days.

    I need to get me one of those. :-)

  • Rubinium.org (unregistered)

    I think that it will cause a magnetic disturbance that will crash planes.

  • (cs) in reply to Cooper

    // Please do not read this comment

    // Thank you

  • (cs) in reply to Mark
    Mark:

    // Please do not read this comment

    // Thank you



    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.
  • (cs)

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

  • Dave (unregistered)

    a. how can one call the method without providing all the parameters?
    2. What happened?!

    Heh, the captcha is 'random'

  • Dave (unregistered) in reply to kmerkle

    "I have no response to that" was also used in "LA Story", also a brilliant movie.

  • (cs)

    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

  • TheBeautyAndTheBreast (unregistered) in reply to OneFactor
    OneFactor:
    Now the Python was more crafty than any of the wild animals inherited from Object. He said to the woman, "Did God really name the fruit, 'DO_NOT_USE_AT_ALL_EVER'?"

    The woman said to the Python, "We may use the cmpKey, but God did say, 'You must not use fruit at all ever, and you must not construct a reference to it, or you will throw an exception.' "

     "You will not throw an exception," the Python said to the woman. "For God knows that when you use it your IObject will be implemented, and you will be.Equal(toGod), knowing good and evil."

    When the woman saw that the fruit of the tree was good for food and inherited from IObject, and also desirable for gaining wisdom, she de-referenced it and called a method. She also passed a reference to her husband, who was with her, and he de-referenced it. Then the IObjects of both of them were implemented, and they realized their object references had not been set to an instance of object; so they sewed fig leaves together and made traces for their stacks.



    And then the Python said:
    >>> import this

    And it was good.




  • mark (unregistered) in reply to Digitalbath

    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.

  • (cs) in reply to mark
    Anonymous:
    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.


    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).
  • home homine lupus est (unregistered) in reply to mark

    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

  • someone (unregistered) in reply to mark
    Anonymous:
    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.
    public class FemaleProgrammer extends Programmer {
        // do not use at all ever
    }
  • (cs)

    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)

  • LarsW (unregistered)

    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

    if (DO_NOT_USE_AT_ALL_EVER!=null) {
        DO_NOT_USE_AT_ALL_EVER = null;
    }
    and continuing?

    or maybe even

    if (DO_NOT_USE_AT_ALL_EVER!=null) throw new IllegalArgumentException("Now you've done it...");

    I'm using Java here, but should look almost the same in C# I presume...

  • Dazed (unregistered) in reply to ammoQ
    ammoQ:
    Anonymous:
    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.


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

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

  • (cs) in reply to ammoQ
    ammoQ:

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


    Anonymous was referring to:
    Digitalbath:

    I once had a female coworker who happened to have that talent as well.  My favorite story is when some random morning, she overheard someone say that our tech lead was taking a personal day that day.  She exclaimed, "NO!!!  He has to come in today.  He HAS to help me fix what I broke."


    as sexist. I happen to agree with anonymous in this case.

  • a guy who knows how to google the answer (unregistered) in reply to mrprogguy

    don't worry...you're not the one to correct them...

    why not check the proper site?

    <font color="#000000">"Marvin The Martian has a whole host of space age tools to aid him in his efforts. The Illudium Pew 36 Explosive Space is part of his arsenal."</font>
    http://looneytunes.warnerbros.com/stars_of_the_show/marvin_the_martian/marvin_story.html


  • toni (unregistered)
    Alex Papadimoulis:

    <font face="Courier New" size="2"><font color="#000080">public object</font> LoadOrg(<font color="#000080">int</font> cmpKey, <font color="#000080">object</font> DO_NOT_USE_AT_ALL_EVER);</font>



    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
  • Cowboy (unregistered) in reply to a guy who knows how to google the answer
    http://looneytunes.warnerbros.com/stars_of_the_show/marvin_the_martian/marvin_story.html
    Have a look at source of that website. Now that is a WTF.

    And this forum-software is the worst I've ever seen.

  • Anon (unregistered) in reply to toni

    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.

  • movie buff (unregistered) in reply to ParkinT
    ParkinT:

    "Never, ever cross the streams"

    -paraphrased from Ghostbusters

    Unless not crossing them doesn't work...

  • Me (unregistered) in reply to Cowboy
    Cowboy:
    http://looneytunes.warnerbros.com/stars_of_the_show/marvin_the_martian/marvin_story.html
    Have a look at source of that website. Now that is a WTF.

    And this forum-software is the worst I've ever seen.



    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.

  • PS (unregistered) in reply to Me

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



  • Boaz (unregistered) in reply to PS

    Wow, that is a beautiful (if disturbing) WTF. Kinda brings the whole concept of literate programming to a new level.

  • (cs) in reply to PS

    PS:

    That's what JavaDoc is for. Did VB's IDE not have something similar that showed the documentation?

    Pete

  • Tei (unregistered) in reply to Boaz
    Anonymous:
    Wow, that is a beautiful (if disturbing) WTF. Kinda brings the whole concept of literate programming to a new level.


    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
  • PS (unregistered) in reply to Tei
    Rugrat:
    PS:

    That's what JavaDoc is for. Did VB's IDE not have something similar that showed the documentation?

    Pete


    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.

    Anonymous:
    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

    Hmm, how do you program the buttons? Can you insert buttons into the code behind the buttons as well?

  • (cs) in reply to Deparment of Redundancy Department

    Now there's a book I havent seen for about 10 years.
    My sister used to be scared of it  :P

  • (cs) in reply to JoeBloggs

    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.

  • GD (unregistered)

    Hey, this is the second "Steve" in a row! Was it here at TDWTF that I read about the "steve to girl ratio"?

  • csrster (unregistered) in reply to Disgruntled DBA
    Disgruntled DBA:
    RayS:
    Recent upgrades to the system have actually changed this...


    <font face="Courier New" size="2"><font color="#000080">public object</font> LoadOrg(<font color="#000080">int</font> cmpKey, <font color="#000080">object</font> DO_NOT_USE_AT_ALL_EVER_I_MEAN_IT);

    ...
    </font>

    Yes, but then someone submitted this code:


    ...
    try
    {LoadOrg (num, DOES_ANYBODY_WANT_A_PEANUT);}
    ...



    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".)
  • (cs) in reply to Carl de Billy
    Carl de Billy:

    Maybe a THIS_PARAMETER_IS_NO_LONGER_USED name would have been a better idea.

    That's the reason why there is an [Obsolete] attribute into the .NET Framework.


    Similarly, Java 1.5 has the @Deprecated annotation.  Most decent compilers will also pick up a @deprecated tag inside Javadoc too.

  • Jesper Stocholm (unregistered)

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

  • home homine lupus est (unregistered) in reply to PS
    Anonymous:

    Anonymous:
    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

    Hmm, how do you program the buttons? Can you insert buttons into the code behind the buttons as well?


    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
  • M (unregistered) in reply to mrprogguy

    mrprogguy:
    I hate being the prick that corrects the prick that corrects everyone else, but if you go to http://www.gargaro.com/marvinsounds.html and have a listen to the clips you will definitely hear "Q," not "PU."  (This, despite the fact that some of the clip files are actually named "pew"-this or that, and transcribed as "pew."  Power of suggestion, no doubt.)  Crank up the volume a bit, and listen carefully.  It's "Q."

    You should at least check with M before you blame Q.

  • Sam (unregistered) in reply to WTF?!

    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?

  • DO_NOT_QUOTE_ME_AT_ALL_EVER (unregistered) in reply to tin

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

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

  • less-than-perfect++ (unregistered) in reply to Jesper Stocholm

    Anonymous:
    <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.</FONT>

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

  • TheDoom (unregistered) in reply to less-than-perfect++

    Yanks eh? They never got the hang of C++.


  • (cs) in reply to Rinky Dink

    Anonymous:
    Kind of obvious.

    This is an entry into a recursive function, and the recursion needs to pass an object when it calls itself.

    And the first call must be null to start it all off.

     

    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?

  • (cs) in reply to home homine lupus est
    Anonymous:
    Maybe whas changed the implementation, but the interface can be altered, and the var name is a suggestion-of-use to avoid attemps to istil using it, that WILL be a error.


    Is do what mean you?  WTF?

      -dZ.
  • (cs) in reply to isaphrael
    isaphrael:
    feh.
    I just use 'Verboten' in these instances.  that way anyone debugging my code has to spend some time learning German before they spend even more time investigating the code.

    something about making me look more efficient than other people, i'm not sure...


    I don't know german, but I saw Das Boot and Stalag 17, so I understand what that is.

        dZ.
  • (cs) in reply to Carl de Billy
    Anonymous:

    Maybe a THIS_PARAMETER_IS_NO_LONGER_USED name would have been a better idea.

    That's the reason why there is an [Obsolete] attribute into the .NET Framework.



    You mean, the .NET Framework has been flagged obsolete, already?

    An we thought it had such promise...

        dZ.
  • wgc (unregistered) in reply to DZ-Jay

    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.

  • (cs) in reply to GD

    Anonymous:
    Hey, this is the second "Steve" in a row! Was it here at TDWTF that I read about the "steve to girl ratio"?

    On the dev team at my workplace, we have two Terry's (both male) and one female.

  • (cs) in reply to OneFactor

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

Leave a comment on “The Forbidden Parameter”

Log In or post as a guest

Replying to comment #:

« Return to Article