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.

 
GeneralRe: Comparisons... Pinmemberjan larsen4-Jul-14 3:46 
GeneralRe: Comparisons... PinprofessionalBernhard Hiller4-Jul-14 4:15 
GeneralRe: Comparisons... Pinmemberjan larsen9-Jul-14 23:28 
GeneralIIF to the rescue... PinprofessionalSander Rossel30-Jun-14 6:29 
Because there is no other way to compare OrderNumber to 0 Laugh | :laugh:
   Private Function IsNew(ByVal OrderNumber As Long) As Boolean
      Return IIf(OrderNumber = 0, True, False)
   End Function
It's not horrible, but it's pretty representative for the code as a whole.
A lot of redundancy, a lot of global variables, no null values (but still NullReferenceExceptions...), Forms with 1000+ lines of code, etc.
 
VB is not the problem, it's the programmers that code it.
It's an OO world.
public class SanderRossel : Lazy<Person>
{
   public void DoWork()
   {
      throw new NotSupportedException();
   }
}

GeneralRe: IIF to the rescue... PinprofessionalBernhard Hiller30-Jun-14 21:38 
GeneralRe: IIF to the rescue... PinprofessionalSander Rossel30-Jun-14 21:56 
GeneralRe: IIF to the rescue... PinprofessionalBernhard Hiller30-Jun-14 22:35 
GeneralRe: IIF to the rescue... PinprofessionalSander Rossel30-Jun-14 22:56 
GeneralRe: IIF to the rescue... PinprofessionalBernhard Hiller1-Jul-14 21:57 
GeneralRe: IIF to the rescue... PinprofessionalSander Rossel2-Jul-14 1:58 

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.1411028.1 | Last Updated 28 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid