Click here to Skip to main content
15,881,559 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.

 
GeneralC and Machine Code horror Pin
Timothy Baldwin2-Dec-08 11:12
Timothy Baldwin2-Dec-08 11:12 
GeneralRe: C and Machine Code horror Pin
Paul Conrad2-Dec-08 11:16
professionalPaul Conrad2-Dec-08 11:16 
GeneralRe: C and Machine Code horror Pin
PIEBALDconsult2-Dec-08 13:39
mvePIEBALDconsult2-Dec-08 13:39 
GeneralRe: C and Machine Code horror Pin
supercat95-Dec-08 6:19
supercat95-Dec-08 6:19 
GeneralRe: C and Machine Code horror Pin
Timothy Baldwin8-Dec-08 8:30
Timothy Baldwin8-Dec-08 8:30 
GeneralRe: C and Machine Code horror Pin
supercat98-Dec-08 19:30
supercat98-Dec-08 19:30 
GeneralRe: C and Machine Code horror Pin
Lutosław5-Dec-08 12:11
Lutosław5-Dec-08 12:11 
GeneralC# bool datatype horror [modified] Pin
Shyam Bharath24-Nov-08 5:00
Shyam Bharath24-Nov-08 5:00 
Here is a code i came across in my own project. Apparently I coded this when I was learning C# few years back. It gave me a good laugh now

bool isActive;
if (chkExamActive.Checked == false)
    isActive = false;
else
    isActive = true;


EDIT

OK I was just going through this old project of mine so here is another one in the same .cs file

ArrayList correctAnswers = new ArrayList();
correctAnswers.Add(txtPhrase.Text);

QuestionTableAdapter questionAdapter = new QuestionTableAdapter();
long QuestionID = questionAdapter.GetData()[0].QuestionID;        
CorrectAnswerTableAdapter correctAnswerAdapter = new CorrectAnswerTableAdapter();
foreach (string correctAnswer in correctAnswers)
       correctAnswerAdapter.Insert(correctAnswer, QuestionID);


Find the horror above Roll eyes | :rolleyes:

-------------------------------------------
It's code that drives you - Shyam

modified on Monday, November 24, 2008 11:26 AM

GeneralRe: C# bool datatype horror Pin
PIEBALDconsult24-Nov-08 5:23
mvePIEBALDconsult24-Nov-08 5:23 
GeneralRe: C# bool datatype horror Pin
Shyam Bharath24-Nov-08 5:32
Shyam Bharath24-Nov-08 5:32 
GeneralRe: C# bool datatype horror Pin
Jason Lepack (LeppyR64)24-Nov-08 5:32
Jason Lepack (LeppyR64)24-Nov-08 5:32 
GeneralRe: C# bool datatype horror Pin
Shyam Bharath24-Nov-08 5:37
Shyam Bharath24-Nov-08 5:37 
GeneralRe: C# bool datatype horror Pin
Lutosław25-Nov-08 10:02
Lutosław25-Nov-08 10:02 
GeneralRe: C# bool datatype horror Pin
Shyam Bharath26-Nov-08 0:07
Shyam Bharath26-Nov-08 0:07 
GeneralRe: C# bool datatype horror Pin
ocdogan4-Dec-08 6:41
ocdogan4-Dec-08 6:41 
RantRe: C# bool datatype horror Pin
TJS4u4-Dec-08 22:51
TJS4u4-Dec-08 22:51 
RantSQL trigger fun Pin
ruanr24-Nov-08 1:07
ruanr24-Nov-08 1:07 
GeneralRe: SQL trigger fun Pin
Ashfield24-Nov-08 1:31
Ashfield24-Nov-08 1:31 
GeneralRe: SQL trigger fun Pin
ruanr24-Nov-08 1:37
ruanr24-Nov-08 1:37 
GeneralRe: SQL trigger fun Pin
Ashfield24-Nov-08 1:55
Ashfield24-Nov-08 1:55 
GeneralRe: SQL trigger fun Pin
Le centriste25-Nov-08 3:22
Le centriste25-Nov-08 3:22 
GeneralRe: SQL trigger fun Pin
Ashfield25-Nov-08 9:09
Ashfield25-Nov-08 9:09 
General'Item': member names cannot be the same as their enclosing type Pin
Redwan Albougha22-Nov-08 8:37
Redwan Albougha22-Nov-08 8:37 
GeneralRe: 'Item': member names cannot be the same as their enclosing type Pin
Thomas Weller22-Nov-08 16:54
Thomas Weller22-Nov-08 16:54 
GeneralRe: 'Item': member names cannot be the same as their enclosing type Pin
Redwan Albougha22-Nov-08 22:15
Redwan Albougha22-Nov-08 22:15 

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.