Click here to Skip to main content
15,889,216 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
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 
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 
I don't think that someone would want to handle the failure of core functions and thread creation is quite a core feature in my opinion. Even if you would want to handle errors after every single line of code you would fail. The solution to your problem is building an automatic document save/backup function into your crash handlers/critical function. This way you guarded your program not only against thread creation errors but a lot of other bugs/crashes too!

BTW, in most of my programs I usually create all needed threads at program startup (in pools) and destroy them at cleanup. In this case a CRITICAL is valid even without document saver. Most multithreaded programs work with a fixed or predictable number of threads that you can precreate.
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 
GeneralRe: Which code you suggest? Pin
ZurdoDev25-Jul-13 7:32
professionalZurdoDev25-Jul-13 7:32 
GeneralRe: Which code you suggest? Pin
OriginalGriff25-Jul-13 8:26
mveOriginalGriff25-Jul-13 8:26 
GeneralRe: Which code you suggest? Pin
ZurdoDev25-Jul-13 8:28
professionalZurdoDev25-Jul-13 8:28 
GeneralRe: Which code you suggest? Pin
OriginalGriff25-Jul-13 8:31
mveOriginalGriff25-Jul-13 8:31 
GeneralRe: Which code you suggest? Pin
ZurdoDev25-Jul-13 8:35
professionalZurdoDev25-Jul-13 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.