Click here to Skip to main content
12,698,048 members (23,862 online)

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: Catastrophic Failure! Pin
BillW335-Nov-13 9:46
professionalBillW335-Nov-13 9:46 
GeneralRe: Catastrophic Failure! Pin
patbob21-Feb-14 6:20
memberpatbob21-Feb-14 6:20 
GeneralWhy bother with any other exception data? The message should suffice. Pin
yiangos17-Oct-13 5:16
professionalyiangos17-Oct-13 5:16 
GeneralRe: Why bother with any other exception data? The message should suffice. Pin
Sentenryu18-Oct-13 2:06
memberSentenryu18-Oct-13 2:06 
GeneralRe: Why bother with any other exception data? The message should suffice. Pin
yiangos23-Oct-13 7:57
professionalyiangos23-Oct-13 7:57 
JokeRe: Why bother with any other exception data? The message should suffice. Pin
RyanDev18-Oct-13 6:15
memberRyanDev18-Oct-13 6:15 
GeneralRe: Why bother with any other exception data? The message should suffice. Pin
Jacek Gajek19-Oct-13 6:12
memberJacek Gajek19-Oct-13 6:12 
GeneralRe: Why bother with any other exception data? The message should suffice. Pin
yiangos23-Oct-13 7:51
professionalyiangos23-Oct-13 7: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. Pin
Bill_Hallahan1-Nov-13 18:35
memberBill_Hallahan1-Nov-13 18:35 
GeneralWhy care about descriptive names? Pin
Jacek Gajek16-Oct-13 22:34
memberJacek Gajek16-Oct-13 22:34 
JokeRe: Why care about descriptive names? Pin
Kornfeld Eliyahu Peter16-Oct-13 22:47
memberKornfeld Eliyahu Peter16-Oct-13 22:47 
GeneralRe: Why care about descriptive names? Pin
Jacek Gajek16-Oct-13 23:03
memberJacek Gajek16-Oct-13 23:03 
GeneralRe: Why care about descriptive names? Pin
Argonia17-Oct-13 0:28
memberArgonia17-Oct-13 0:28 
GeneralRe: Why care about descriptive names? Pin
Nicholas Marty17-Oct-13 5:30
professionalNicholas Marty17-Oct-13 5:30 
GeneralRe: Why care about descriptive names? Pin
phil.o18-Oct-13 5:12
memberphil.o18-Oct-13 5:12 
GeneralRe: Why care about descriptive names? Pin
Jacek Gajek19-Oct-13 6:18
memberJacek Gajek19-Oct-13 6:18 
GeneralHad a Boss Pin
michaelbarb14-Nov-13 9:58
professionalmichaelbarb14-Nov-13 9:58 
GeneralExecutable that requires elevation Pin
Michael Haephrati15-Oct-13 12:21
mvpMichael Haephrati15-Oct-13 12:21 
GeneralRe: Executable that requires elevation Pin
Richard Deeming15-Oct-13 13:11
professionalRichard Deeming15-Oct-13 13:11 
GeneralRe: Executable that requires elevation Pin
Michael Haephrati15-Oct-13 13:40
mvpMichael Haephrati15-Oct-13 13:40 
GeneralRe: Executable that requires elevation Pin
Rage15-Oct-13 23:56
memberRage15-Oct-13 23:56 
GeneralRe: Executable that requires elevation Pin
Dave Kreskowiak16-Oct-13 2:30
mvpDave Kreskowiak16-Oct-13 2:30 
GeneralRe: Executable that requires elevation Pin
Richard Deeming16-Oct-13 2:45
professionalRichard Deeming16-Oct-13 2:45 
GeneralRe: Executable that requires elevation Pin
Dan Neely18-Oct-13 8:14
memberDan Neely18-Oct-13 8:14 
GeneralRe: Executable that requires elevation Pin
CIDev18-Oct-13 9:27
professionalCIDev18-Oct-13 9:27 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 21 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid