Click here to Skip to main content
15,887,214 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.

 
JokeIt won't take no for an answer PinPopular
Pedro H. Fialho18-Feb-14 2:54
Pedro H. Fialho18-Feb-14 2:54 
GeneralRe: It'll not take no for an answer Pin
André Kraak18-Feb-14 3:05
André Kraak18-Feb-14 3:05 
GeneralRe: It'll not take no for an answer Pin
OriginalGriff18-Feb-14 4:37
mveOriginalGriff18-Feb-14 4:37 
GeneralRe: It won't take no for an answer Pin
LynxEnvoy18-Feb-14 7:55
LynxEnvoy18-Feb-14 7:55 
GeneralRe: It won't take no for an answer Pin
Pedro H. Fialho19-Feb-14 1:50
Pedro H. Fialho19-Feb-14 1:50 
GeneralRe: It won't take no for an answer Pin
thatraja19-Feb-14 3:09
professionalthatraja19-Feb-14 3:09 
GeneralRe: It won't take no for an answer Pin
Bernhard Hiller18-Feb-14 21:45
Bernhard Hiller18-Feb-14 21:45 
RantRe: It won't take no for an answer Pin
Vladimir Svyatski19-Feb-14 3:17
professionalVladimir Svyatski19-Feb-14 3:17 
The code is complete bullshit!

  • What is the point of using ref? objWord is not assigned any value. I guess, the author has never heard of reference types and value types, doesn't differentiate them and also is a former C++ developer.
  • If an exception is generated, a variable, representing it, can NEVER be null. And the check
    C#
    ex != null
    just looks stupid.
  • Also, it will sound very upsetting for the author, but if the exception mentioned above is ever generated, he is about to face an infinite recursion, hence he will also face the full power of the StackOverflowException.


Summarizing the above, I'd say he better work in McDonald's. To get a chance to become a manager Roll eyes | :rolleyes: , that is a real chance to afford Ford Mustang GT... someday Shucks | :-\ .
lifecycle of a lifecycle of a lifecycle

GeneralRe: It won't take no for an answer Pin
Pedro H. Fialho19-Feb-14 3:44
Pedro H. Fialho19-Feb-14 3:44 
GeneralRe: It won't take no for an answer Pin
dexterama19-Feb-14 7:19
professionaldexterama19-Feb-14 7:19 
GeneralRe: It won't take no for an answer Pin
Brisingr Aerowing26-Feb-14 11:04
professionalBrisingr Aerowing26-Feb-14 11:04 
GeneralGender doesn't matter PinPopular
T Pat10-Feb-14 20:28
T Pat10-Feb-14 20:28 
JokeRe: Gender doesn't matter Pin
Nicholas Marty10-Feb-14 20:36
professionalNicholas Marty10-Feb-14 20:36 
GeneralRe: Gender doesn't matter Pin
T Pat10-Feb-14 21:59
T Pat10-Feb-14 21:59 
GeneralRe: Gender doesn't matter Pin
Jörgen Andersson10-Feb-14 20:38
professionalJörgen Andersson10-Feb-14 20:38 
GeneralRe: Gender doesn't matter Pin
Bernhard Hiller11-Feb-14 21:55
Bernhard Hiller11-Feb-14 21:55 
GeneralRe: Gender doesn't matter Pin
Nagy Vilmos11-Feb-14 22:06
professionalNagy Vilmos11-Feb-14 22:06 
GeneralRe: Gender doesn't matter Pin
BillW3313-Feb-14 10:10
professionalBillW3313-Feb-14 10:10 
GeneralRe: Gender doesn't matter Pin
ZurdoDev12-Feb-14 1:00
professionalZurdoDev12-Feb-14 1:00 
GeneralRe: Gender doesn't matter Pin
Matt T Heffron13-Feb-14 10:44
professionalMatt T Heffron13-Feb-14 10:44 
GeneralVMWare logic Pin
Bernhard Hiller5-Feb-14 20:29
Bernhard Hiller5-Feb-14 20:29 
GeneralRe: VMWare logic Pin
Andrius Leonavicius7-Feb-14 6:56
professionalAndrius Leonavicius7-Feb-14 6:56 
GeneralRe: VMWare logic Pin
Brisingr Aerowing10-Feb-14 15:16
professionalBrisingr Aerowing10-Feb-14 15:16 
GeneralBut what to try? Pin
Marc Clifton4-Feb-14 5:28
mvaMarc Clifton4-Feb-14 5:28 
GeneralRe: But what to try? Pin
DaveAuld4-Feb-14 6:13
professionalDaveAuld4-Feb-14 6:13 

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.