Click here to Skip to main content

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, embarrasing 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: Catastrophic Failure! PinprofessionalBillW335-Nov-13 8:46 
GeneralRe: Catastrophic Failure! Pinmemberpatbob21-Feb-14 5:20 
GeneralWhy bother with any other exception data? The message should suffice. Pinprofessionalyiangos17-Oct-13 4:16 
GeneralRe: Why bother with any other exception data? The message should suffice. PinmemberSentenryu18-Oct-13 1:06 
GeneralRe: Why bother with any other exception data? The message should suffice. Pinprofessionalyiangos23-Oct-13 6:57 
JokeRe: Why bother with any other exception data? The message should suffice. PinmemberRyanDev18-Oct-13 5:15 
GeneralRe: Why bother with any other exception data? The message should suffice. PinmemberJacek Gajek19-Oct-13 5:12 
GeneralRe: Why bother with any other exception data? The message should suffice. Pinprofessionalyiangos23-Oct-13 6:51 
Continuing on your serious note: the code per se, should not fail, I agree. But the final program may fail at times. Say you have a web request in there, and any of the following occurs:
(a) the remote server times out (e.g. the server is offline)
(b) the remote server has a bug, returning a 500 error
(c) the remote server cannot find the requested resource, returning a 404 error
(d) the remote server forbids access to the requested resource, returning a 403 error
 
Any of the above results in the web request throwing an exception in YOUR application, but your code is not to blame. So there is a chance that a bug-free program CAN fail. That's why you should have error handling and meaningful error reporting.
Φευ! Εδόμεθα υπό ρηννοσχήμων λύκων!
(Alas! We're devoured by lamb-guised wolves!)

GeneralRe: Why bother with any other exception data? The message should suffice. PinmemberBill_Hallahan1-Nov-13 17:35 
GeneralWhy care about descriptive names? PinmemberJacek Gajek16-Oct-13 21:34 
JokeRe: Why care about descriptive names? PinmemberKornfeld Eliyahu Peter16-Oct-13 21:47 
GeneralRe: Why care about descriptive names? PinmemberJacek Gajek16-Oct-13 22:03 
GeneralRe: Why care about descriptive names? PinmemberArgonia16-Oct-13 23:28 
GeneralRe: Why care about descriptive names? PinprofessionalNicholas Marty17-Oct-13 4:30 
GeneralRe: Why care about descriptive names? Pinmemberphil.o18-Oct-13 4:12 
GeneralRe: Why care about descriptive names? PinmemberJacek Gajek19-Oct-13 5:18 
GeneralHad a Boss Pinprofessionalmichaelbarb14-Nov-13 8:58 
GeneralExecutable that requires elevation PinmvpMichael Haephrati15-Oct-13 11:21 
GeneralRe: Executable that requires elevation PinprofessionalRichard Deeming15-Oct-13 12:11 
GeneralRe: Executable that requires elevation PinmvpMichael Haephrati15-Oct-13 12:40 
GeneralRe: Executable that requires elevation PinmemberRage15-Oct-13 22:56 
GeneralRe: Executable that requires elevation PinmvpDave Kreskowiak16-Oct-13 1:30 
GeneralRe: Executable that requires elevation PinprofessionalRichard Deeming16-Oct-13 1:45 
GeneralRe: Executable that requires elevation PinmemberDan Neely18-Oct-13 7:14 
GeneralRe: Executable that requires elevation PinprofessionalCIDev18-Oct-13 8:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.140902.1 | Last Updated 2 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid