Click here to Skip to main content
15,881,655 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: Comment Pin
Monjurul Habib3-Mar-11 20:11
professionalMonjurul Habib3-Mar-11 20:11 
GeneralRe: Comment Pin
Joan M8-Mar-11 0:47
professionalJoan M8-Mar-11 0:47 
Generalwarning C4706: assignment within conditional expression Pin
Samuel Cragg3-Mar-11 8:29
Samuel Cragg3-Mar-11 8:29 
GeneralRe: warning C4706: assignment within conditional expression Pin
Monjurul Habib3-Mar-11 10:01
professionalMonjurul Habib3-Mar-11 10:01 
GeneralRe: warning C4706: assignment within conditional expression Pin
makumazan844-Mar-11 2:38
makumazan844-Mar-11 2:38 
GeneralRe: warning C4706: assignment within conditional expression Pin
oggenok644-Mar-11 11:44
oggenok644-Mar-11 11:44 
GeneralRe: warning C4706: assignment within conditional expression Pin
Lutosław27-Mar-11 11:22
Lutosław27-Mar-11 11:22 
GeneralRe: warning C4706: assignment within conditional expression Pin
jsc4213-Apr-11 4:07
professionaljsc4213-Apr-11 4:07 
The layout is not pretty and I would have commented it a lot more thoroughly, but there is nothing wrong with a complex if statement. I know that the refactoring polizei will feel that 1000 statements are better than one but as long as the code is well laid out and well commented (which this isn't), then a single statement can be simpler to follow.

The warning, incidentally, is for the final stanza in the line after the comment // LANG_hu section: spec. Hungarian rule. The compiler is guessing that rv = affix_check(st,i) should be rv == affix_check(st,i)
RantWorst practise - asking a question without searching... Pin
Ed Nutting2-Mar-11 2:09
Ed Nutting2-Mar-11 2:09 
GeneralRe: Worst practise - asking a question without searching... [modified] Pin
_Erik_2-Mar-11 3:17
_Erik_2-Mar-11 3:17 
GeneralRe: Worst practise - asking a question without searching... Pin
Ravi Sant2-Mar-11 5:14
Ravi Sant2-Mar-11 5:14 
GeneralRe: Worst practise - asking a question without searching... Pin
fjdiewornncalwe3-Mar-11 8:58
professionalfjdiewornncalwe3-Mar-11 8:58 
GeneralRe: Worst practise - asking a question without searching... Pin
Ed Nutting3-Mar-11 9:06
Ed Nutting3-Mar-11 9:06 
GeneralRe: Worst practise - asking a question without searching... Pin
BillW3314-Mar-11 6:55
professionalBillW3314-Mar-11 6:55 
GeneralRe: Worst practise - asking a question without searching... Pin
Ed Nutting14-Mar-11 7:24
Ed Nutting14-Mar-11 7:24 
GeneralRe: Worst practise - asking a question without searching... Pin
drummerboy051125-Mar-11 12:31
professionaldrummerboy051125-Mar-11 12:31 
GeneralRe: Worst practise - asking a question without searching... Pin
Lutosław27-Mar-11 11:27
Lutosław27-Mar-11 11:27 
GeneralUltimate Database Fail [updated] Pin
wizardzz1-Mar-11 5:05
wizardzz1-Mar-11 5:05 
GeneralRe: Ultimate Database Fail Pin
musefan1-Mar-11 6:22
musefan1-Mar-11 6:22 
GeneralRe: Ultimate Database Fail Pin
wizardzz1-Mar-11 6:25
wizardzz1-Mar-11 6:25 
GeneralRe: Ultimate Database Fail Pin
musefan1-Mar-11 6:36
musefan1-Mar-11 6:36 
GeneralRe: Ultimate Database Fail Pin
AspDotNetDev1-Mar-11 7:26
protectorAspDotNetDev1-Mar-11 7:26 
GeneralRe: Ultimate Database Fail Pin
AspDotNetDev1-Mar-11 7:38
protectorAspDotNetDev1-Mar-11 7:38 
GeneralRe: Ultimate Database Fail Pin
wizardzz1-Mar-11 7:59
wizardzz1-Mar-11 7:59 
GeneralRe: Ultimate Database Fail Pin
AspDotNetDev1-Mar-11 8:35
protectorAspDotNetDev1-Mar-11 8:35 

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.