Click here to Skip to main content
13,768,886 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: Is it my fault? Pin
Eddy Vluggen18-May-18 1:03
professionalEddy Vluggen18-May-18 1:03 
GeneralRe: Is it my fault? Pin
F-ES Sitecore18-May-18 1:10
mvpF-ES Sitecore18-May-18 1:10 
GeneralRe: Is it my fault? Pin
Eddy Vluggen18-May-18 1:16
professionalEddy Vluggen18-May-18 1:16 
GeneralRe: Is it my fault? Pin
Jon McKee17-May-18 19:21
professionalJon McKee17-May-18 19:21 
GeneralRe: Is it my fault? Pin
Eddy Vluggen18-May-18 0:57
professionalEddy Vluggen18-May-18 0:57 
GeneralRe: Is it my fault? Pin
Jon McKee18-May-18 11:13
professionalJon McKee18-May-18 11:13 
GeneralRe: Is it my fault? Pin
Eddy Vluggen18-May-18 14:09
professionalEddy Vluggen18-May-18 14:09 
GeneralRe: Is it my fault? Pin
David A. Gray25-Jun-18 12:19
memberDavid A. Gray25-Jun-18 12:19 
Eddy Vluggen wrote:
Best practice means not to discourage the use of exceptions, simply because someone thinks that they slow the system. As you can see, it doesn't take much time to invoke the entire exception stack, as it can be done several thousand times in a second.


I've seen a few exceptions that consumed viscerally measurable time, but they were thrown deep in the stack, but the first exception handler that could catch them was in or near the main routine, many layers up the call stack. Hence, there was a lot of stack to unwind.

Eddy Vluggen wrote:
Too many idiots avoiding exceptions altogether and using booleans instead Thumbs Up | :thumbsup: If it is an error, throw an exception, it is that simple.


Too many people being too lazy to use their God given brains as intended. Programming is, after all, all about thinking. Best practices are intended to serve as rules of thumb, not ironclad rules.
David A. Gray
Delivering Solutions for the Ages, One Problem at a Time
Interpreting the Fundamental Principle of Tabular Reporting

GeneralRe: Is it my fault? Pin
PIEBALDconsult16-May-18 18:09
protectorPIEBALDconsult16-May-18 18:09 
GeneralRe: Is it my fault? Pin
Jon McKee17-May-18 15:35
professionalJon McKee17-May-18 15:35 
GeneralRe: Is it my fault? Pin
PIEBALDconsult17-May-18 15:42
protectorPIEBALDconsult17-May-18 15:42 
GeneralRe: Is it my fault? Pin
Jon McKee17-May-18 16:16
professionalJon McKee17-May-18 16:16 
GeneralRe: Is it my fault? Pin
PIEBALDconsult21-May-18 15:11
protectorPIEBALDconsult21-May-18 15:11 
GeneralRe: Is it my fault? Pin
Jon McKee22-May-18 14:54
professionalJon McKee22-May-18 14:54 
GeneralRe: Is it my fault? Pin
Mark Smeltzer23-May-18 7:08
memberMark Smeltzer23-May-18 7:08 
GeneralRe: Is it my fault? Pin
Richard Deeming23-May-18 8:02
mvpRichard Deeming23-May-18 8:02 
GeneralRe: Is it my fault? Pin
Mark Smeltzer23-May-18 8:18
memberMark Smeltzer23-May-18 8:18 
GeneralRecursion in SQL Pin
lw@zi 14-May-18 2:50
professional lw@zi 14-May-18 2:50 
GeneralRe: Recursion in SQL Pin
Jörgen Andersson14-May-18 4:27
protectorJörgen Andersson14-May-18 4:27 
GeneralRe: Recursion in SQL Pin
Richard Deeming14-May-18 9:50
mvpRichard Deeming14-May-18 9:50 
GeneralRe: Recursion in SQL Pin
Super Lloyd14-May-18 17:52
memberSuper Lloyd14-May-18 17:52 
GeneralRe: Recursion in SQL Pin
lw@zi 14-May-18 20:36
professional lw@zi 14-May-18 20:36 
GeneralRe: Recursion in SQL Pin
Super Lloyd14-May-18 22:18
memberSuper Lloyd14-May-18 22:18 
GeneralRe: Recursion in SQL Pin
GuyThiebaut14-May-18 21:45
professionalGuyThiebaut14-May-18 21:45 
GeneralRe: Recursion in SQL Pin
DaveAuld19-May-18 22:36
protectorDaveAuld19-May-18 22:36 

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 | Cookies | Terms of Service
Web05-2016 | 2.8.181117.1 | Last Updated 18 Nov 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid