What useless thing do you want to do today?



  • This code was just found in one of the batches we run in production. 



    <font face="Courier New" size="2">    </font><font face="Courier New" size="2">if (GetFilterCode () == USER_DEFINED)

    </font><font face="Courier New" size="2">    </font><font face="Courier New" size="2">{

            switch (GetLocalFilterCode ())

            {

            default:

                break;

            }

        }</font>



    Not entirely sure it's that useful really =)




  • "This program is running too quickly."



  • You are not thinking WTF!!?? enough, obviously.
    GetLocalFilterCode() odes some extremely important thing.
    This idiom is meant to attract you attention to the fact and make sure that you look in the code.     



  • @Ayende Rahien said:

    You are not thinking WTF!!?? enough, obviously.
    GetLocalFilterCode() odes some extremely important thing.
    This idiom is meant to attract you attention to the fact and make sure that you look in the code.     

    Clearly generated...

    (Must test edit also!)



  • Nah, you folks are missing the whole point - it's side-affect-city! Imagine the xml that must be generated, the java script that could be executing, the database updates that could be occurring (where, in the documentation does it specify that these are merely accessors?)

    Imagine the possibilities!



  • Nah, the two functions called do just return a member variable and should be const, but aren't.



  • I'd just say this is harmless placeholder code for future use. A comment that states so would have been a good idea, but it's still far from a WTF IMHO.


Log in to reply