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

 
GeneralRe: Why is my code so slow?? Pin
vonb24-Sep-13 19:20
vonb24-Sep-13 19:20 
GeneralRe: Why is my code so slow?? Pin
PIEBALDconsult24-Sep-13 19:22
mvePIEBALDconsult24-Sep-13 19:22 
GeneralRe: Why is my code so slow?? Pin
vonb24-Sep-13 19:58
vonb24-Sep-13 19:58 
GeneralRe: Why is my code so slow?? Pin
Nagy Vilmos24-Sep-13 22:14
professionalNagy Vilmos24-Sep-13 22:14 
GeneralRe: Why is my code so slow?? Pin
AmitGajjar25-Sep-13 1:58
professionalAmitGajjar25-Sep-13 1:58 
GeneralRe: Why is my code so slow?? Pin
SortaCore1-Oct-13 10:58
SortaCore1-Oct-13 10:58 
GeneralRe: Why is my code so slow?? Pin
Bernhard Hiller25-Sep-13 21:45
Bernhard Hiller25-Sep-13 21:45 
GeneralNot really a question of how-do-I... Pin
SortaCore22-Sep-13 23:41
SortaCore22-Sep-13 23:41 
Hmmm... is this dumb or brilliant?
C#
if ((logicalTabs ? tabs_General1.cbException.Focused : tabs_General1.cbJobStatus.Focused) &&
    e.KeyCode == Keys.Up)
{	

as opposed to:
C#
if (( (logicalTabs && tabs_General1.cbException.Focused) || 
      (!logicalTabs && tabs_General1.cbJobStatus.Focused) )  &&
    e.KeyCode == Keys.Up)
{	


I can't decide now. Unsure | :~
Readability contrasting with good practice?
GeneralRe: Not really a question of how-do-I... Pin
dan!sh 23-Sep-13 0:45
professional dan!sh 23-Sep-13 0:45 
GeneralRe: Not really a question of how-do-I... Pin
OriginalGriff23-Sep-13 0:51
mveOriginalGriff23-Sep-13 0:51 
GeneralRe: Not really a question of how-do-I... Pin
Member 205300623-Sep-13 1:01
Member 205300623-Sep-13 1:01 
QuestionRe: Not really a question of how-do-I... Pin
Eddy Vluggen23-Sep-13 3:40
professionalEddy Vluggen23-Sep-13 3:40 
GeneralRe: Not really a question of how-do-I... Pin
Suvabrata Roy23-Sep-13 3:26
professionalSuvabrata Roy23-Sep-13 3:26 
GeneralRe: Not really a question of how-do-I... Pin
Dan Neely24-Sep-13 2:57
Dan Neely24-Sep-13 2:57 
GeneralRe: Not really a question of how-do-I... Pin
0bx24-Sep-13 4:07
0bx24-Sep-13 4:07 
GeneralRe: Not really a question of how-do-I... Pin
PIEBALDconsult24-Sep-13 15:37
mvePIEBALDconsult24-Sep-13 15:37 
GeneralRe: Not really a question of how-do-I... Pin
Brisingr Aerowing10-Oct-13 9:21
professionalBrisingr Aerowing10-Oct-13 9:21 
GeneralRe: Not really a question of how-do-I... Pin
BuggyTimes25-Sep-13 3:38
BuggyTimes25-Sep-13 3:38 
GeneralAnyone see the problem here? Pin
Mardy Git19-Sep-13 22:50
Mardy Git19-Sep-13 22:50 
GeneralRe: Anyone see the problem here? Pin
BotCar19-Sep-13 22:57
BotCar19-Sep-13 22:57 
GeneralRe: Anyone see the problem here? Pin
Sentenryu20-Sep-13 2:30
Sentenryu20-Sep-13 2:30 
GeneralRe: Anyone see the problem here? Pin
BotCar20-Sep-13 2:51
BotCar20-Sep-13 2:51 
GeneralRe: Anyone see the problem here? Pin
Argonia19-Sep-13 23:50
professionalArgonia19-Sep-13 23:50 
GeneralRe: Anyone see the problem here? Pin
Mardy Git19-Sep-13 23:56
Mardy Git19-Sep-13 23:56 
GeneralRe: Anyone see the problem here? Pin
Richard Deeming20-Sep-13 2:01
mveRichard Deeming20-Sep-13 2:01 

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.