Click here to Skip to main content
15,889,403 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
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...
GeneralRe: Most Unhelpful Message Ever Pin
jeron12-Aug-13 5:30
jeron12-Aug-13 5:30 
GeneralRe: Most Unhelpful Message Ever Pin
Chad3F2-Aug-13 13:03
Chad3F2-Aug-13 13:03 
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 0:49
pasztorpisti7-Sep-13 0:49 
GeneralRe: Most Unhelpful Message Ever Pin
Chad3F7-Sep-13 12:40
Chad3F7-Sep-13 12:40 
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 13:09
pasztorpisti7-Sep-13 13:09 
GeneralRe: Most Unhelpful Message Ever Pin
BillW3330-Aug-13 5:35
professionalBillW3330-Aug-13 5:35 
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 0:34
pasztorpisti7-Sep-13 0:34 
QuestionWhich code you suggest? Pin
Rajesh Anuhya24-Jul-13 20:04
professionalRajesh Anuhya24-Jul-13 20:04 
AnswerRe: Which code you suggest? PinPopular
NeverJustHere24-Jul-13 21:02
NeverJustHere24-Jul-13 21:02 
GeneralRe: Which code you suggest? Pin
Reelix25-Jul-13 21:36
Reelix25-Jul-13 21:36 
GeneralRe: Which code you suggest? Pin
KP Lee26-Jul-13 17:21
KP Lee26-Jul-13 17:21 
AnswerRe: Which code you suggest? Pin
_Damian S_24-Jul-13 21:02
professional_Damian S_24-Jul-13 21:02 
AnswerRe: Which code you suggest? PinPopular
Ingo25-Jul-13 3:42
Ingo25-Jul-13 3:42 
AnswerRe: Which code you suggest? Pin
ZurdoDev25-Jul-13 4:48
professionalZurdoDev25-Jul-13 4:48 
GeneralRe: Which code you suggest? PinPopular
OriginalGriff25-Jul-13 5:04
mveOriginalGriff25-Jul-13 5:04 
GeneralRe: Which code you suggest? Pin
ZurdoDev25-Jul-13 5:11
professionalZurdoDev25-Jul-13 5:11 
GeneralRe: Which code you suggest? Pin
Sentenryu25-Jul-13 7:15
Sentenryu25-Jul-13 7:15 

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.