Click here to Skip to main content

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.

 
JokeRe: What this 'null' check doing here... Pinmemberryanb319-Jul-13 5:19 
GeneralRe: What this 'null' check doing here... PinprofessionalMohammed Hameed10-Jul-13 20:55 
GeneralRe: What this 'null' check doing here... Pinmemberryanb3111-Jul-13 2:32 
GeneralRe: What this 'null' check doing here... PinprofessionalMohammed Hameed11-Jul-13 2:35 
JokeRe: What this 'null' check doing here... PinmemberLucian Gadau10-Jul-13 2:23 
GeneralRe: What this 'null' check doing here... Pinprofessionalvonb9-Jul-13 2:35 
GeneralRe: What this 'null' check doing here... PinprofessionalMohammed Hameed9-Jul-13 2:39 
RantRe: What this 'null' check doing here... PinprofessionalRichard Deeming9-Jul-13 3:58 
vonb wrote:
return (from oRec in DataModel.Employees select oRec).ToList();

Why do so many people insist on adding a pointless "from x in source select x" query to their code, when it has the same result as the much more concise "source"?
private List<Employee> GetEmployees()
{
   return DataModel.Employees.ToList();
}



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: What this 'null' check doing here... Pinprofessionalvonb9-Jul-13 4:56 
GeneralRe: What this 'null' check doing here... PinprofessionalRichard Deeming9-Jul-13 6:54 
GeneralRe: What this 'null' check doing here... PinmemberDavid C. Thompson10-Jul-13 4:05 
GeneralRe: What this 'null' check doing here... PinprofessionalMohammed Hameed10-Jul-13 20:39 
GeneralRe: What this 'null' check doing here... PinmemberDavid C. Thompson10-Jul-13 21:51 
GeneralRe: What this 'null' check doing here... PinmemberMark Starr10-Jul-13 5:25 
GeneralRe: What this 'null' check doing here... PinmemberKP Lee10-Jul-13 21:19 
GeneralRe: What this 'null' check doing here... PinmemberMark Starr11-Jul-13 6:18 
GeneralRe: What this 'null' check doing here... PinmemberKP Lee15-Jul-13 21:32 
GeneralRe: What this 'null' check doing here... PinmemberMark Starr16-Jul-13 6:20 
GeneralRe: What this 'null' check doing here... Pinmembersilverfox200110-Jul-13 6:33 
GeneralRe: What this 'null' check doing here... PinprofessionalMohammed Hameed10-Jul-13 20:35 
GeneralRe: What this 'null' check doing here... PinmemberRafagaX10-Jul-13 6:43 
GeneralRe: What this 'null' check doing here... PinprofessionalMohammed Hameed10-Jul-13 20:43 
GeneralRe: What this 'null' check doing here... PinmemberMichael Losinski10-Jul-13 6:59 
GeneralRe: What this 'null' check doing here... PinprofessionalMohammed Hameed10-Jul-13 20:45 
GeneralRe: What this 'null' check doing here... PinmemberKP Lee10-Jul-13 22:01 

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
Web01 | 2.8.141216.1 | Last Updated 18 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid