Click here to Skip to main content
15,919,245 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: Most Unhelpful Message Ever Pin
Stefan_Lang30-Jul-13 0:27
Stefan_Lang30-Jul-13 0:27 
GeneralRe: Most Unhelpful Message Ever Pin
vonb29-Jul-13 19:59
vonb29-Jul-13 19:59 
GeneralRe: Most Unhelpful Message Ever Pin
Gary Wheeler30-Jul-13 1:51
Gary Wheeler30-Jul-13 1:51 
GeneralRe: Most Unhelpful Message Ever Pin
vonb30-Jul-13 2:37
vonb30-Jul-13 2:37 
GeneralRe: Most Unhelpful Message Ever Pin
Bernhard Hiller29-Jul-13 22:25
Bernhard Hiller29-Jul-13 22:25 
GeneralRe: Most Unhelpful Message Ever Pin
jsc4229-Jul-13 23:12
professionaljsc4229-Jul-13 23:12 
GeneralRe: Most Unhelpful Message Ever PinPopular
BotCar30-Jul-13 2:39
BotCar30-Jul-13 2:39 
GeneralRe: Most Unhelpful Message Ever Pin
cmger29-Jul-13 23:43
cmger29-Jul-13 23:43 
GeneralRe: Most Unhelpful Message Ever Pin
Fran Porretto30-Jul-13 0:55
Fran Porretto30-Jul-13 0:55 
GeneralRe: Most Unhelpful Message Ever Pin
Langenbach30-Jul-13 1:59
Langenbach30-Jul-13 1:59 
GeneralRe: Most Unhelpful Message Ever Pin
Isfeasachme30-Jul-13 3:41
Isfeasachme30-Jul-13 3:41 
GeneralRe: Most Unhelpful Message Ever Pin
Simon_Whale30-Jul-13 3:57
Simon_Whale30-Jul-13 3:57 
GeneralRe: Most Unhelpful Message Ever Pin
RafagaX30-Jul-13 4:43
professionalRafagaX30-Jul-13 4:43 
GeneralRe: Most Unhelpful Message Ever Pin
Member 937516630-Jul-13 6:55
Member 937516630-Jul-13 6:55 
GeneralRe: Most Unhelpful Message Ever Pin
IndifferentDisdain30-Jul-13 8:34
IndifferentDisdain30-Jul-13 8:34 
GeneralRe: Most Unhelpful Message Ever Pin
Member 937516630-Jul-13 12:58
Member 937516630-Jul-13 12:58 
JokeRe: Most Unhelpful Message Ever Pin
Chad3F2-Aug-13 12:54
Chad3F2-Aug-13 12:54 
GeneralRe: Most Unhelpful Message Ever Pin
Brisingr Aerowing19-Aug-13 16:30
professionalBrisingr Aerowing19-Aug-13 16:30 
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 1:08
pasztorpisti7-Sep-13 1:08 
GeneralRe: Most Unhelpful Message Ever Pin
DaveBurt30-Jul-13 7:05
DaveBurt30-Jul-13 7:05 
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 1:05
pasztorpisti7-Sep-13 1:05 
GeneralRe: Most Unhelpful Message Ever Pin
Andy Brummer1-Aug-13 9:09
sitebuilderAndy Brummer1-Aug-13 9:09 
GeneralRe: Most Unhelpful Message Ever Pin
Argonia1-Aug-13 21:36
professionalArgonia1-Aug-13 21:36 
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 1:01
pasztorpisti7-Sep-13 1:01 
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 0:59
pasztorpisti7-Sep-13 0:59 
But an assert usually isn't compiled into release builds. One of our projects currently using debug, profile and release (and sometimes more) configs internally.
relase: obvoius.
profile: builds used by the qa and internal workers. this is essentially a release build with optimizations but asserts are on.
debug: obvious.

Whenever possible its better to put in compile time errors/static asserts. In my opinion the assert you described should be a comment, a tagged task or TODO. I usually mark such codepieces with "// TODO:" or "// HACK:" or "// FIXME:" or "// TRON_TODO:" if I want to differentiate this from others' todo tags. This is easy to find with a global search in any language. In eclipse you can define your own tasks and the "tasks" view is able to collect these tags when you compile/autocompile your java code...

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.