Click here to Skip to main content
13,253,507 members (51,387 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: Try/catch block... Pin
Reese Currie21-Nov-12 3:52
memberReese Currie21-Nov-12 3:52 
GeneralRe: Try/catch block... Pin
bkebamc21-Nov-12 6:17
memberbkebamc21-Nov-12 6:17 
GeneralRe: Try/catch block... Pin
H.Brydon21-Nov-12 17:34
memberH.Brydon21-Nov-12 17:34 
GeneralRe: Try/catch block... Pin
Bernhard Hiller21-Nov-12 21:27
memberBernhard Hiller21-Nov-12 21:27 
GeneralRe: Try/catch block... Pin
lukeer22-Nov-12 22:06
memberlukeer22-Nov-12 22:06 
GeneralRe: Try/catch block... Pin
KP Lee26-Nov-12 8:41
memberKP Lee26-Nov-12 8:41 
GeneralRe: Try/catch block... Pin
Gary R. Wheeler21-Nov-12 5:26
memberGary R. Wheeler21-Nov-12 5:26 
GeneralRe: Try/catch block... Pin
PhilLenoir21-Nov-12 7:36
memberPhilLenoir21-Nov-12 7:36 
Quitter - use recursion!
public string ReadFile(string filename)
{
     try
     {
          return File.ReadAllText(filename);
     }
     catch
     {
          return ReadFile(filename);
     }
}

Life is like a s**t sandwich; the more bread you have, the less s**t you eat.

GeneralRe: Try/catch block... Pin
Zac Greve27-Nov-12 9:24
memberZac Greve27-Nov-12 9:24 
GeneralRe: Try/catch block... Pin
Member 771191721-Nov-12 10:12
memberMember 771191721-Nov-12 10:12 
GeneralRe: Try/catch block... Pin
kakan28-Nov-12 1:46
memberkakan28-Nov-12 1:46 
GeneralRe: Try/catch block... Pin
PIEBALDconsult20-Nov-12 14:30
memberPIEBALDconsult20-Nov-12 14:30 
GeneralRe: Try/catch block... Pin
jasperp20-Nov-12 21:56
memberjasperp20-Nov-12 21:56 
GeneralRe: Try/catch block... Pin
spencepk21-Nov-12 5:03
memberspencepk21-Nov-12 5:03 
GeneralRe: Try/catch block... Pin
ProgramFOX21-Nov-12 5:10
memberProgramFOX21-Nov-12 5:10 
GeneralRe: Try/catch block... Pin
RafagaX21-Nov-12 5:28
memberRafagaX21-Nov-12 5:28 
GeneralRe: Try/catch block... Pin
ProgramFOX21-Nov-12 5:32
memberProgramFOX21-Nov-12 5:32 
GeneralRe: Try/catch block... Pin
jnlt21-Nov-12 6:33
memberjnlt21-Nov-12 6:33 
GeneralWhy would you do this to a stored procedure? It never did anything to you. Pin
thrakazog15-Nov-12 12:58
memberthrakazog15-Nov-12 12:58 
GeneralRe: Why would you do this to a stored procedure? It never did anything to you. Pin
Zac Greve15-Nov-12 13:48
memberZac Greve15-Nov-12 13:48 
GeneralRe: Why would you do this to a stored procedure? It never did anything to you. Pin
jim lahey20-Nov-12 4:41
memberjim lahey20-Nov-12 4:41 
JokeRe: Why would you do this to a stored procedure? It never did anything to you. Pin
Lewis198620-Nov-12 21:50
memberLewis198620-Nov-12 21:50 
GeneralRe: Why would you do this to a stored procedure? It never did anything to you. Pin
Pete O'Hanlon20-Nov-12 13:09
protectorPete O'Hanlon20-Nov-12 13:09 
GeneralRe: Why would you do this to a stored procedure? It never did anything to you. Pin
Florin Jurcovici22-Nov-12 2:13
memberFlorin Jurcovici22-Nov-12 2:13 
GeneralRe: Why would you do this to a stored procedure? It never did anything to you. Pin
SomeGuyThatIsMe21-Nov-12 3:17
memberSomeGuyThatIsMe21-Nov-12 3:17 

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 |
Web03 | 2.8.171114.1 | Last Updated 21 Nov 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid