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

 
GeneralA VS induced horror by me, kinda Pin
Megidolaon27-Apr-09 22:28
Megidolaon27-Apr-09 22:28 
GeneralRe: A VS induced horror by me, kinda Pin
Thomas Weller27-Apr-09 22:53
Thomas Weller27-Apr-09 22:53 
AnswerRe: A VS induced horror by me, kinda Pin
killabyte28-Apr-09 2:13
killabyte28-Apr-09 2:13 
GeneralRe: A VS induced horror by me, kinda Pin
Jeroen De Dauw28-Apr-09 5:54
Jeroen De Dauw28-Apr-09 5:54 
GeneralRe: A VS induced horror by me, kinda Pin
killabyte28-Apr-09 12:18
killabyte28-Apr-09 12:18 
GeneralRe: A VS induced horror by me, kinda Pin
Kenneth Ballard28-Apr-09 8:54
Kenneth Ballard28-Apr-09 8:54 
GeneralRe: A VS induced horror by me, kinda Pin
Megidolaon28-Apr-09 20:47
Megidolaon28-Apr-09 20:47 
GeneralSwitch Statement from Hell PinPopular
Brady Kelly27-Apr-09 7:18
Brady Kelly27-Apr-09 7:18 
Nothing horrible like using enums or flags as case values, no, we preserve the whole JOIN clause,
as issued from some vile marriage between combo box and literals.
Yes, the strSQLJOIN value is chosen as a SelectedValue of a combo!
There are eight cases, this being the last. The first only includes Level1.
                switch (strSQLJOIN)
                {
.
.
                    case "LEFT JOIN Extensions ON CallRecords.Ext_ID = Extensions.Ext_ID LEFT JOIN Level1 ON Extensions.LevUp_ID = Level1.Lev_ID LEFT JOIN Level2 ON Level1.LevUp_ID = Level2.Lev_ID LEFT JOIN Level3 ON Level2.LevUp_ID = Level3.Lev_ID LEFT JOIN Level4 ON Level3.LevUp_ID = Level4.Lev_ID LEFT JOIN Level5 ON Level4.LevUp_ID = Level5.Lev_ID LEFT JOIN Level6 ON Level5.LevUp_ID = Level6.Lev_ID LEFT JOIN Level7 ON Level6.LevUp_ID = Level7.Lev_ID LEFT JOIN Level8 ON Level7.LevUp_ID = Level8.Lev_ID LEFT JOIN CAT ON CallRecords.Cat_ID = CAT.Cat_ID ":
                        detailSelectList = "select Sites.SiteName, Sites.ReportCentre, Level8.LevelCode, Level8.LevelName, ";
                        strSQLGROUPandORDER = "GROUP BY Sites.SiteName, Sites.ReportCentre, Level8.LevelCode, Level8.LevelName ORDER BY Sites.SiteName, Sites.ReportCentre, Level8.LevelCode, Level8.LevelName;";
                        break;






GeneralRe: Switch Statement from Hell Pin
Luc Pattyn27-Apr-09 7:49
sitebuilderLuc Pattyn27-Apr-09 7:49 
GeneralRe: Switch Statement from Hell Pin
Jeroen De Dauw27-Apr-09 10:53
Jeroen De Dauw27-Apr-09 10:53 
GeneralRe: Switch Statement from Hell Pin
BillW3312-May-09 9:51
professionalBillW3312-May-09 9:51 
GeneralRe: Switch Statement from Hell Pin
ricmil4227-Apr-09 11:32
ricmil4227-Apr-09 11:32 
GeneralRe: Switch Statement from Hell Pin
Spunky Coder27-Apr-09 19:41
Spunky Coder27-Apr-09 19:41 
GeneralRe: Switch Statement from Hell Pin
Super Lloyd29-Apr-09 17:38
Super Lloyd29-Apr-09 17:38 
GeneralRe: Switch Statement from Hell Pin
Brady Kelly29-Apr-09 21:57
Brady Kelly29-Apr-09 21:57 
JokeRe: Switch Statement from Hell Pin
Super Lloyd29-Apr-09 22:47
Super Lloyd29-Apr-09 22:47 
GeneralRe: Switch Statement from Hell Pin
OriginalGriff30-Apr-09 1:19
mveOriginalGriff30-Apr-09 1:19 
AnswerRe: Switch Statement from Hell Pin
Super Lloyd30-Apr-09 1:39
Super Lloyd30-Apr-09 1:39 
GeneralHow to check less then / greater then Pin
ParagPatel22-Apr-09 22:50
ParagPatel22-Apr-09 22:50 
GeneralRe: How to check less then / greater then Pin
StM0n22-Apr-09 23:05
StM0n22-Apr-09 23:05 
GeneralRe: How to check less then / greater then Pin
Jeroen De Dauw23-Apr-09 0:27
Jeroen De Dauw23-Apr-09 0:27 
JokeRe: How to check less then / greater then Pin
Michael Bookatz23-Apr-09 1:01
Michael Bookatz23-Apr-09 1:01 
GeneralRe: How to check less then / greater then PinPopular
Nagy Vilmos23-Apr-09 1:38
professionalNagy Vilmos23-Apr-09 1:38 
JokeRe: How to check less then / greater then Pin
Nemanja Trifunovic23-Apr-09 7:57
Nemanja Trifunovic23-Apr-09 7:57 
GeneralRe: How to check less then / greater then Pin
Dan Neely23-Apr-09 8:17
Dan Neely23-Apr-09 8:17 

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.