Click here to Skip to main content
14,303,603 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: This is the kind of productivity you get when you pay by lines of code Pin
OriginalGriff19-Feb-13 4:59
protectorOriginalGriff19-Feb-13 4:59 
GeneralRe: This is the kind of productivity you get when you pay by lines of code Pin
Bernhard Hiller19-Feb-13 5:05
memberBernhard Hiller19-Feb-13 5:05 
GeneralRe: This is the kind of productivity you get when you pay by lines of code Pin
fjdiewornncalwe20-Feb-13 3:13
professionalfjdiewornncalwe20-Feb-13 3:13 
GeneralRe: This is the kind of productivity you get when you pay by lines of code Pin
wout de zeeuw6-Mar-13 14:31
memberwout de zeeuw6-Mar-13 14:31 
GeneralIF-free codes Pin
SarK0Y15-Feb-13 12:34
memberSarK0Y15-Feb-13 12:34 
GeneralRe: IF-free codes Pin
Paul Conrad15-Feb-13 12:54
professionalPaul Conrad15-Feb-13 12:54 
GeneralRe: IF-free codes Pin
SarK0Y15-Feb-13 13:06
memberSarK0Y15-Feb-13 13:06 
GeneralRe: IF-free codes Pin
Gary Wheeler19-Feb-13 0:17
memberGary Wheeler19-Feb-13 0:17 
SarK0Y wrote:
superfluous IFs make code slower.
That isn't necessarily true. Modern processors use a variety of tricks that reduce the 'cost' of unused branches. One of the problems of 'computed conditional' logic is that you incur the cost for all cases, not just the unused branch. Your overall performance actually decreases.
Software Zen: delete this;

GeneralRe: IF-free codes Pin
Chad3F20-Feb-13 19:03
memberChad3F20-Feb-13 19:03 
GeneralRe: IF-free codes Pin
dusty_dex19-Feb-13 5:54
memberdusty_dex19-Feb-13 5:54 
GeneralRe: IF-free codes Pin
DarthDana19-Mar-13 10:09
professionalDarthDana19-Mar-13 10:09 
GeneralRe: IF-free codes Pin
RonDsz19-Feb-13 9:36
memberRonDsz19-Feb-13 9:36 
JokeRe: IF-free codes Pin
Brisingr Aerowing25-Feb-13 14:58
professionalBrisingr Aerowing25-Feb-13 14:58 
GeneralRe: IF-free codes Pin
PIEBALDconsult15-Feb-13 19:27
protectorPIEBALDconsult15-Feb-13 19:27 
JokeRe: IF-free codes Pin
Brisingr Aerowing15-Feb-13 19:47
professionalBrisingr Aerowing15-Feb-13 19:47 
GeneralRe: IF-free codes Pin
Monaco.Bavarian18-Feb-13 19:50
memberMonaco.Bavarian18-Feb-13 19:50 
GeneralRe: IF-free codes Pin
KP Lee19-Feb-13 11:36
memberKP Lee19-Feb-13 11:36 
AnswerRe: IF-free codes Pin
Monaco.Bavarian19-Feb-13 19:07
memberMonaco.Bavarian19-Feb-13 19:07 
GeneralRe: IF-free codes Pin
KP Lee19-Feb-13 21:51
memberKP Lee19-Feb-13 21:51 
GeneralRe: IF-free codes Pin
Stefan_Lang19-Feb-13 0:30
memberStefan_Lang19-Feb-13 0:30 
GeneralRe: IF-free codes Pin
JHubSharp19-Feb-13 4:14
memberJHubSharp19-Feb-13 4:14 
GeneralRe: IF-free codes Pin
Gary Huck19-Feb-13 5:19
memberGary Huck19-Feb-13 5:19 
GeneralRe: IF-free codes Pin
Zan Lynx19-Feb-13 11:10
memberZan Lynx19-Feb-13 11:10 
GeneralRe: IF-free codes Pin
5urd19-Feb-13 6:01
member5urd19-Feb-13 6:01 
GeneralRe: IF-free codes Pin
Dave Kreskowiak5-Mar-13 3:55
mveDave Kreskowiak5-Mar-13 3:55 

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.