Click here to Skip to main content
15,112,198 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: So you think you know what double.Parse does? Pin
harold aptroot7-Aug-13 8:51
Memberharold aptroot7-Aug-13 8:51 
GeneralRe: So you think you know what double.Parse does? Pin
Rob Grainger15-Aug-13 1:18
MemberRob Grainger15-Aug-13 1:18 
GeneralRe: So you think you know what double.Parse does? Pin
AlphaDeltaTheta4-Aug-13 21:50
MemberAlphaDeltaTheta4-Aug-13 21:50 
GeneralRe: So you think you know what double.Parse does? Pin
Lutosław6-Aug-13 11:56
MemberLutosław6-Aug-13 11:56 
GeneralRe: So you think you know what double.Parse does? Pin
harold aptroot6-Aug-13 11:59
Memberharold aptroot6-Aug-13 11:59 
GeneralRe: So you think you know what double.Parse does? Pin
Lutosław6-Aug-13 12:15
MemberLutosław6-Aug-13 12:15 
GeneralRe: So you think you know what double.Parse does? Pin
ExcellentOrg21-Aug-13 1:07
MemberExcellentOrg21-Aug-13 1:07 
GeneralFace, meet palm... Pin
Dave Kreskowiak2-Aug-13 10:45
mveDave Kreskowiak2-Aug-13 10:45 
You know that feeling when you do something stupid and don't realize it until you've beat your brain to mush trying to fix it?? Yeah, try this on for size. Creating a converter to import images from a database (.BMP of all things!!) to something a bit more DB and web friendly, like PNG. Of course, I want to see the resulting images:
C#
using (Bitmap newBitmap = targetBytes.ToBitmap())
{
    ...
    TargetPictureBox.Image = newBitmap;
    ...
}

The targetPictureBox just showed a nice big red X. For 2 hours I couldn't figure out why this code worked yesterday but didn't work today! I accidently put the using block around the wrong bit of code! D'Oh! | :doh:

GeneralRe: Face, meet palm... Pin
lewax002-Aug-13 11:22
Memberlewax002-Aug-13 11:22 
GeneralBest Function Ever Pin
LNogueira2-Aug-13 7:20
MemberLNogueira2-Aug-13 7:20 
GeneralRe: Best Function Ever Pin
Sentenryu2-Aug-13 7:44
MemberSentenryu2-Aug-13 7:44 
GeneralRe: Best Function Ever Pin
Ravi Bhavnani2-Aug-13 8:08
professionalRavi Bhavnani2-Aug-13 8:08 
GeneralRe: Best Function Ever Pin
ZurdoDev2-Aug-13 9:03
professionalZurdoDev2-Aug-13 9:03 
GeneralRe: Best Function Ever Pin
Paul M Watt2-Aug-13 8:58
mentorPaul M Watt2-Aug-13 8:58 
GeneralRe: Best Function Ever Pin
Andy Bantly5-Aug-13 8:56
MemberAndy Bantly5-Aug-13 8:56 
GeneralRe: Best Function Ever Pin
Mohibur Rashid19-Aug-13 18:37
professionalMohibur Rashid19-Aug-13 18:37 
GeneralRe: Best Function Ever Pin
ZurdoDev2-Aug-13 9:05
professionalZurdoDev2-Aug-13 9:05 
GeneralRe: Best Function Ever Pin
Mladen Janković2-Aug-13 11:31
MemberMladen Janković2-Aug-13 11:31 
GeneralRe: Best Function Ever Pin
Paul M Watt5-Aug-13 19:11
mentorPaul M Watt5-Aug-13 19:11 
GeneralRe: Best Function Ever Pin
Lutosław14-Aug-13 1:09
MemberLutosław14-Aug-13 1:09 
GeneralRe: Best Function Ever Pin
MarkTJohnson6-Aug-13 7:51
professionalMarkTJohnson6-Aug-13 7:51 
GeneralRe: Best Function Ever Pin
PIEBALDconsult9-Aug-13 9:03
professionalPIEBALDconsult9-Aug-13 9:03 
GeneralRe: Best Function Ever Pin
MacSpudster13-Aug-13 6:25
professionalMacSpudster13-Aug-13 6:25 
GeneralRe: Best Function Ever Pin
ExcellentOrg21-Aug-13 1:10
MemberExcellentOrg21-Aug-13 1:10 
GeneralRe: Best Function Ever Pin
Super Lloyd7-Aug-13 4:02
MemberSuper Lloyd7-Aug-13 4:02 

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.