Click here to Skip to main content
11,578,241 members (61,293 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, embarrasing 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: The Sandbox Pin
ColborneGreg30-Aug-14 18:13
memberColborneGreg30-Aug-14 18:13 
GeneralKill me Pin
PhilLenoir28-Aug-14 9:04
memberPhilLenoir28-Aug-14 9:04 
GeneralRe: Kill me Pin
Gary R. Wheeler7-Sep-14 2:38
memberGary R. Wheeler7-Sep-14 2:38 
GeneralWhat is null equal to? Pin
sloosecannon25-Aug-14 5:59
membersloosecannon25-Aug-14 5:59 
I come before you with a question, a yearning in my heart. What is null..... Equal to?

...
        if (value == null || value.equals(null)) {
            return "null";
        }
...
Evidently, the concept of "null" and "null pointers" and "null pointer calls" is lost on the guys who wrote this particular line of code. It doesn't make any errors, probably because someone added the first condition after a few NPEs happened...

EDIT: Clarification - the title is rhetorical.
GeneralRe: What is null equal to? Pin
PIEBALDconsult25-Aug-14 6:27
memberPIEBALDconsult25-Aug-14 6:27 
GeneralRe: What is null equal to? Pin
mark merrens25-Aug-14 6:56
membermark merrens25-Aug-14 6:56 
AnswerRe: What is null equal to? Pin
Afzaal Ahmad Zeeshan25-Aug-14 6:59
professionalAfzaal Ahmad Zeeshan25-Aug-14 6:59 
GeneralRe: What is null equal to? Pin
sloosecannon25-Aug-14 7:45
membersloosecannon25-Aug-14 7:45 
GeneralRe: What is null equal to? Pin
OriginalGriff25-Aug-14 8:15
protectorOriginalGriff25-Aug-14 8:15 
GeneralRe: What is null equal to? Pin
Brisingr Aerowing25-Aug-14 12:06
professionalBrisingr Aerowing25-Aug-14 12:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web04 | 2.8.150603.1 | Last Updated 5 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid