Click here to Skip to main content
15,901,122 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: Database rats nest Pin
Bradml6-Mar-07 0:53
Bradml6-Mar-07 0:53 
GeneralRe: Database rats nest Pin
Steve Fillingham6-Mar-07 19:32
Steve Fillingham6-Mar-07 19:32 
Generalif something then... nothing Pin
Fernando A. Gomez F.5-Mar-07 13:27
Fernando A. Gomez F.5-Mar-07 13:27 
GeneralRe: if something then... nothing Pin
John R. Shaw9-Mar-07 12:38
John R. Shaw9-Mar-07 12:38 
GeneralObject identifiers [modified] Pin
_oti5-Mar-07 13:12
_oti5-Mar-07 13:12 
Generalduplicate variable names seperated by scope Pin
Jason De Arte5-Mar-07 13:08
Jason De Arte5-Mar-07 13:08 
GeneralRe: duplicate variable names seperated by scope Pin
bluesboy847-Mar-07 1:06
bluesboy847-Mar-07 1:06 
GeneralUnnecessary try / catch block Pin
David Rush5-Mar-07 10:17
professionalDavid Rush5-Mar-07 10:17 
Whilre reviewing the code from some contract developers, I have found a common construct:

<br />
public void SomeMethod()<br />
{<br />
    try<br />
    {<br />
        // some code here...<br />
    }<br />
    catch (Exception exception)<br />
    {<br />
        throw exception; // Just re-throw<br />
    }<br />
}<br />


Why just catch and re-throw an exception? This just adds to the complexity of the execution without doing anything in return.
GeneralRe: Unnecessary try / catch block Pin
PIEBALDconsult5-Mar-07 12:52
mvePIEBALDconsult5-Mar-07 12:52 
GeneralRe: Unnecessary try / catch block Pin
DavidNohejl5-Mar-07 13:07
DavidNohejl5-Mar-07 13:07 
GeneralRe: Unnecessary try / catch block Pin
Ed.Poore5-Mar-07 21:36
Ed.Poore5-Mar-07 21:36 
GeneralRe: Unnecessary try / catch block Pin
David Rush6-Mar-07 9:26
professionalDavid Rush6-Mar-07 9:26 
GeneralRe: Unnecessary try / catch block Pin
GWB@s1c6-Mar-07 7:58
GWB@s1c6-Mar-07 7:58 
GeneralRe: Unnecessary try / catch block Pin
David Rush6-Mar-07 9:43
professionalDavid Rush6-Mar-07 9:43 
GeneralRe: Unnecessary try / catch block Pin
Brian R6-Mar-07 13:33
Brian R6-Mar-07 13:33 
GeneralUse Appropriate Development Tools Pin
Brian Leach5-Mar-07 10:16
Brian Leach5-Mar-07 10:16 
GeneralRe: Use Appropriate Development Tools Pin
Chris Losinger5-Mar-07 11:25
professionalChris Losinger5-Mar-07 11:25 
GeneralRe: Use Appropriate Development Tools [modified] Pin
PIEBALDconsult5-Mar-07 12:54
mvePIEBALDconsult5-Mar-07 12:54 
GeneralRe: Use Appropriate Development Tools Pin
Dan Neely6-Mar-07 2:18
Dan Neely6-Mar-07 2:18 
GeneralEver experienced this Pin
Rama Krishna Vavilala5-Mar-07 9:37
Rama Krishna Vavilala5-Mar-07 9:37 
GeneralRe: Ever experienced this Pin
pbraun5-Mar-07 10:00
pbraun5-Mar-07 10:00 
GeneralRe: Ever experienced this Pin
Christian Graus6-Mar-07 0:09
protectorChristian Graus6-Mar-07 0:09 
GeneralRe: Ever experienced this Pin
David Rush6-Mar-07 9:59
professionalDavid Rush6-Mar-07 9:59 
GeneralVB.NET Pin
Shog94-Mar-07 11:51
sitebuilderShog94-Mar-07 11:51 
GeneralRe: VB.NET Pin
#1234-Mar-07 12:56
#1234-Mar-07 12:56 

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.