12,691,523 members (31,760 online)

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

 Make the font red! No, black! Can we do both? AnalogNerd20-Dec-12 9:51 AnalogNerd 20-Dec-12 9:51
 Re: Make the font red! No, black! Can we do both? Rob Grainger20-Dec-12 10:21 Rob Grainger 20-Dec-12 10:21
 Re: Make the font red! No, black! Can we do both? Zac Greve20-Dec-12 12:23 Zac Greve 20-Dec-12 12:23
 Re: Make the font red! No, black! Can we do both? jlopez78826-Dec-12 19:21 jlopez788 26-Dec-12 19:21
 Re: Make the font red! No, black! Can we do both? Marcus Kramer27-Dec-12 7:23 Marcus Kramer 27-Dec-12 7:23
 Re: Make the font red! No, black! Can we do both? Zac Greve30-Dec-12 13:08 Zac Greve 30-Dec-12 13:08
 Re: Make the font red! No, black! Can we do both? Rob Grainger4-Jan-13 10:58 Rob Grainger 4-Jan-13 10:58
 Val Grind (the wrong kind) Rob Grainger20-Dec-12 6:12 Rob Grainger 20-Dec-12 6:12
 From some legacy VB6 code I'm in the process of making redundant...```Private Sub Command7_Click() Dim PolNumb As Long If Val("" & txtOpenPolicyNo) > 0 Then PolNumb = Val("" & txtOpenPolicyNo) Else PolNumb = Val("" & InputBox("Policy ID ")) If Val("" & PolNumb) > 0 Then PolNumb = GetPolicyNumberfromID(PolNumb) End If End If If Val("" & PolNumb) > 0 Then FindPolicy GetPolicyIDfromNumber(PolNumb) End If End Sub```I particularly like the lines...`If Val("" & PolNumb) > 0 Then`which effectively convert a number to a string, prepend an empty string, then convert it back again... just for good measure.
 Re: Val Grind (the wrong kind) Naerling20-Dec-12 11:40 Naerling 20-Dec-12 11:40
 Re: Val Grind (the wrong kind) Nagy Vilmos20-Dec-12 23:55 Nagy Vilmos 20-Dec-12 23:55
 Re: Val Grind (the wrong kind) Brady Kelly2-Jan-13 22:46 Brady Kelly 2-Jan-13 22:46
 Re: Val Grind (the wrong kind) Nagy Vilmos2-Jan-13 23:52 Nagy Vilmos 2-Jan-13 23:52
 Re: Val Grind (the wrong kind) LesF4-Jan-13 10:51 LesF 4-Jan-13 10:51
 Re: Val Grind (the wrong kind) Rob Grainger4-Jan-13 11:09 Rob Grainger 4-Jan-13 11:09
 Re: Val Grind (the wrong kind) Naerling4-Jan-13 12:56 Naerling 4-Jan-13 12:56
 Re: Val Grind (the wrong kind) Member 46088986-Jan-13 12:45 Member 4608898 6-Jan-13 12:45
 Re: Val Grind (the wrong kind) Naerling6-Jan-13 13:26 Naerling 6-Jan-13 13:26
 Re: Val Grind (the wrong kind) Chris Quinn24-Dec-12 1:19 Chris Quinn 24-Dec-12 1:19
 Re: Val Grind (the wrong kind) Rob Grainger29-Dec-12 4:19 Rob Grainger 29-Dec-12 4:19
 Re: Val Grind (the wrong kind) Chris Quinn31-Dec-12 1:17 Chris Quinn 31-Dec-12 1:17
 Re: Val Grind (the wrong kind) Rob Grainger31-Dec-12 3:57 Rob Grainger 31-Dec-12 3:57
 Re: Val Grind (the wrong kind) Mark Hurd3-Jan-13 15:32 Mark Hurd 3-Jan-13 15:32
 Re: Val Grind (the wrong kind) Rob Grainger4-Jan-13 10:55 Rob Grainger 4-Jan-13 10:55
 Re: Val Grind (the wrong kind) Mark Hurd4-Jan-13 15:56 Mark Hurd 4-Jan-13 15:56
 Re: Val Grind (the wrong kind) playstation328-Dec-12 22:22 playstation3 28-Dec-12 22:22
 Last Visit: 31-Dec-99 19:00     Last Update: 17-Jan-17 4:37 Refresh « Prev1...186187188189190191192193194195 Next »