Click here to Skip to main content
15,887,683 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
James Lonero3-Aug-13 5:32
James Lonero3-Aug-13 5:32 
GeneralRe: Most Unhelpful Message Ever Pin
Lutosław6-Aug-13 23:29
Lutosław6-Aug-13 23:29 
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 1:27
pasztorpisti7-Sep-13 1:27 
GeneralRe: Most Unhelpful Message Ever Pin
Lutosław6-Aug-13 23:25
Lutosław6-Aug-13 23:25 
GeneralRe: Most Unhelpful Message Ever Pin
NickPace7-Aug-13 4:53
NickPace7-Aug-13 4:53 
JokeRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 1:27
pasztorpisti7-Sep-13 1:27 
GeneralRe: Most Unhelpful Message Ever Pin
ExcellentOrg21-Aug-13 0:40
ExcellentOrg21-Aug-13 0:40 
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 1:24
pasztorpisti7-Sep-13 1:24 
Well, it depends on the language and the scenario. I personally love exception handling but in some cases I avoid using exceptions. For example in C++ I don't like it because the rules are too loose (you can throw by value, reference, pointer, there is no standard exception base class/exception chaining): the result is that most libraries simply don't use it or use it only internally. If you have to wire together several libraries with their own exception types that can also be a pain in the ass. Another scenario where the presence of exception handling sometimes matters is extremely performance critical, maybe low level code.

One of my friend told me a tale about one of his job interviews. The interviewer ask him the following question: "What is the purpose of smart pointers?". Of course my friend told a tale about object ownership and resource allocation/deallocation. Finally the interviewer gave him the right answer: "Smart pointers are useful because of the exceptions!". Smile | :) Smile | :) Smile | :) It clearly shows the incompetence of the iterviewer, he simply didn't understand that smart pointers are just a possible application of RAII, and he has no clue about object ownership, RAII,...
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 1:16
pasztorpisti7-Sep-13 1:16 
GeneralRe: Most Unhelpful Message Ever Pin
Dennis E White29-Jul-13 11:18
professionalDennis E White29-Jul-13 11:18 
GeneralRe: Most Unhelpful Message Ever PinPopular
NickPace29-Jul-13 11:46
NickPace29-Jul-13 11:46 
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 

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.