Click here to Skip to main content
15,881,600 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralUnnecessary Commented Code Pin
Monjurul Habib3-Mar-11 10:21
professionalMonjurul Habib3-Mar-11 10:21 
GeneralRe: Unnecessary Commented Code Pin
fjdiewornncalwe3-Mar-11 10:25
professionalfjdiewornncalwe3-Mar-11 10:25 
GeneralRe: Unnecessary Commented Code Pin
Monjurul Habib4-Mar-11 7:50
professionalMonjurul Habib4-Mar-11 7:50 
GeneralRe: Unnecessary Commented Code Pin
Jeroen De Dauw3-Mar-11 15:02
Jeroen De Dauw3-Mar-11 15:02 
GeneralRe: Unnecessary Commented Code Pin
Sander Rossel3-Mar-11 23:17
professionalSander Rossel3-Mar-11 23:17 
GeneralRe: Unnecessary Commented Code Pin
Rod Kemp4-Mar-11 1:44
Rod Kemp4-Mar-11 1:44 
GeneralRe: Unnecessary Commented Code Pin
jschell5-Mar-11 8:29
jschell5-Mar-11 8:29 
GeneralRe: Unnecessary Commented Code Pin
thatraja8-Mar-11 1:45
professionalthatraja8-Mar-11 1:45 
It's really disgusting. At least they might comment only the particular line instead of whole thing & new copy of that.
C#
public virtual bool TraverseRecord(string TraverseFor, string Id)
    {
        bool HasRows = false;
       string sql = "";
        //sql = "SP_NAVIGATE '" + TraverseFor + "', '" + Id + "'";
        sql = "SP_NAVIGATE_CHILD_T '" + TraverseFor + "', '" + Id + "'";//Calling new Stored procedure
        iMHUtility.ExecuteStoredProcedure(sql);
        if (iMHUtility.IsErrorOnExecution() == false)
       {
            if (iMHUtility.HasMoreRecords())
            {
                HasRows = true;
                ValueInitialize();
            }
        }
        return HasRows;
    }

Also they may create another parameter for sp_name in the method.
thatraja

My Tip/Tricks
My Dad had a Heart Attack on this day so don't...

GeneralRe: Unnecessary Commented Code Pin
BillW3314-Mar-11 7:47
professionalBillW3314-Mar-11 7:47 
GeneralRe: Unnecessary Commented Code Pin
drummerboy051125-Mar-11 12:28
professionaldrummerboy051125-Mar-11 12:28 
GeneralRe: Unnecessary Commented Code Pin
Falterfire13-Jul-11 5:28
Falterfire13-Jul-11 5:28 
GeneralComment [modified] Pin
Monjurul Habib3-Mar-11 9:58
professionalMonjurul Habib3-Mar-11 9:58 
GeneralRe: Comment Pin
AspDotNetDev3-Mar-11 11:26
protectorAspDotNetDev3-Mar-11 11:26 
GeneralRe: Comment Pin
Monjurul Habib3-Mar-11 20:09
professionalMonjurul Habib3-Mar-11 20:09 
GeneralRe: Comment Pin
AspDotNetDev3-Mar-11 20:44
protectorAspDotNetDev3-Mar-11 20:44 
GeneralRe: Comment Pin
Monjurul Habib4-Mar-11 10:12
professionalMonjurul Habib4-Mar-11 10:12 
GeneralRe: Comment Pin
Lutosław27-Mar-11 11:15
Lutosław27-Mar-11 11:15 
GeneralRe: Comment Pin
RobCroll3-Mar-11 19:26
RobCroll3-Mar-11 19:26 
GeneralRe: Comment Pin
Monjurul Habib3-Mar-11 20:11
professionalMonjurul Habib3-Mar-11 20:11 
GeneralRe: Comment Pin
Joan M8-Mar-11 0:47
professionalJoan M8-Mar-11 0:47 
Generalwarning C4706: assignment within conditional expression Pin
Samuel Cragg3-Mar-11 8:29
Samuel Cragg3-Mar-11 8:29 
GeneralRe: warning C4706: assignment within conditional expression Pin
Monjurul Habib3-Mar-11 10:01
professionalMonjurul Habib3-Mar-11 10:01 
GeneralRe: warning C4706: assignment within conditional expression Pin
makumazan844-Mar-11 2:38
makumazan844-Mar-11 2:38 
GeneralRe: warning C4706: assignment within conditional expression Pin
oggenok644-Mar-11 11:44
oggenok644-Mar-11 11:44 
GeneralRe: warning C4706: assignment within conditional expression Pin
Lutosław27-Mar-11 11:22
Lutosław27-Mar-11 11:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.