Click here to Skip to main content
15,885,757 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: Try/catch block... Pin
Reese Currie21-Nov-12 2:52
Reese Currie21-Nov-12 2:52 
GeneralRe: Try/catch block... Pin
bkebamc21-Nov-12 5:17
bkebamc21-Nov-12 5:17 
GeneralRe: Try/catch block... Pin
H.Brydon21-Nov-12 16:34
professionalH.Brydon21-Nov-12 16:34 
GeneralRe: Try/catch block... Pin
Bernhard Hiller21-Nov-12 20:27
Bernhard Hiller21-Nov-12 20:27 
GeneralRe: Try/catch block... Pin
lukeer22-Nov-12 21:06
lukeer22-Nov-12 21:06 
GeneralRe: Try/catch block... Pin
KP Lee26-Nov-12 7:41
KP Lee26-Nov-12 7:41 
GeneralRe: Try/catch block... Pin
Gary R. Wheeler21-Nov-12 4:26
Gary R. Wheeler21-Nov-12 4:26 
GeneralRe: Try/catch block... PinPopular
PhilLenoir21-Nov-12 6:36
professionalPhilLenoir21-Nov-12 6:36 
Quitter - use recursion!
C#
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
Brisingr Aerowing27-Nov-12 8:24
professionalBrisingr Aerowing27-Nov-12 8:24 
GeneralRe: Try/catch block... Pin
Member 771191721-Nov-12 9:12
Member 771191721-Nov-12 9:12 
GeneralRe: Try/catch block... Pin
kakan28-Nov-12 0:46
professionalkakan28-Nov-12 0:46 
GeneralRe: Try/catch block... Pin
PIEBALDconsult20-Nov-12 13:30
mvePIEBALDconsult20-Nov-12 13:30 
GeneralRe: Try/catch block... PinPopular
jasperp20-Nov-12 20:56
professionaljasperp20-Nov-12 20:56 
GeneralRe: Try/catch block... Pin
spencepk21-Nov-12 4:03
spencepk21-Nov-12 4:03 
GeneralRe: Try/catch block... Pin
Thomas Daniels21-Nov-12 4:10
mentorThomas Daniels21-Nov-12 4:10 
GeneralRe: Try/catch block... Pin
RafagaX21-Nov-12 4:28
professionalRafagaX21-Nov-12 4:28 
GeneralRe: Try/catch block... Pin
Thomas Daniels21-Nov-12 4:32
mentorThomas Daniels21-Nov-12 4:32 
GeneralRe: Try/catch block... Pin
jnlt21-Nov-12 5:33
jnlt21-Nov-12 5:33 
GeneralWhy would you do this to a stored procedure? It never did anything to you. PinPopular
thrakazog15-Nov-12 11:58
thrakazog15-Nov-12 11:58 
GeneralRe: Why would you do this to a stored procedure? It never did anything to you. Pin
Brisingr Aerowing15-Nov-12 12:48
professionalBrisingr Aerowing15-Nov-12 12:48 
GeneralRe: Why would you do this to a stored procedure? It never did anything to you. PinPopular
jim lahey20-Nov-12 3:41
jim lahey20-Nov-12 3:41 
JokeRe: Why would you do this to a stored procedure? It never did anything to you. Pin
Lewis198620-Nov-12 20:50
professionalLewis198620-Nov-12 20:50 
GeneralRe: Why would you do this to a stored procedure? It never did anything to you. PinPopular
Pete O'Hanlon20-Nov-12 12:09
mvePete O'Hanlon20-Nov-12 12:09 
GeneralRe: Why would you do this to a stored procedure? It never did anything to you. Pin
Florin Jurcovici22-Nov-12 1:13
Florin Jurcovici22-Nov-12 1:13 
GeneralRe: Why would you do this to a stored procedure? It never did anything to you. Pin
SomeGuyThatIsMe21-Nov-12 2:17
SomeGuyThatIsMe21-Nov-12 2: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.