15,117,318 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.

 Re: Undoubtedly this is my own ignorance in glorious action but... Andy Bantly6-Aug-13 11:54 Andy Bantly 6-Aug-13 11:54
 So you think you know what double.Parse does? harold aptroot3-Aug-13 0:27 harold aptroot 3-Aug-13 0:27
 Re: So you think you know what double.Parse does? PIEBALDconsult3-Aug-13 6:31 PIEBALDconsult 3-Aug-13 6:31
 Re: So you think you know what double.Parse does? Dennis_E4-Aug-13 9:25 Dennis_E 4-Aug-13 9:25
 Re: So you think you know what double.Parse does? harold aptroot4-Aug-13 10:07 harold aptroot 4-Aug-13 10:07
 Re: So you think you know what double.Parse does? Dennis_E7-Aug-13 8:38 Dennis_E 7-Aug-13 8:38
 Re: So you think you know what double.Parse does? harold aptroot7-Aug-13 8:51 harold aptroot 7-Aug-13 8:51
 Re: So you think you know what double.Parse does? Rob Grainger15-Aug-13 1:18 Rob Grainger 15-Aug-13 1:18
 Others may find it logical that zero cannot be positive. Seriously though, floating-point numbers are defined by an international standard (IEEE 754) that allows for +0 and -0. They have well defined meanings. Wiki[^] The problem here is that while the language respects these, double.Parse fails to. "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
 Re: So you think you know what double.Parse does? AlphaDeltaTheta4-Aug-13 21:50 AlphaDeltaTheta 4-Aug-13 21:50
 Re: So you think you know what double.Parse does? Lutosław6-Aug-13 11:56 Lutosław 6-Aug-13 11:56
 Re: So you think you know what double.Parse does? harold aptroot6-Aug-13 11:59 harold aptroot 6-Aug-13 11:59
 Re: So you think you know what double.Parse does? Lutosław6-Aug-13 12:15 Lutosław 6-Aug-13 12:15
 Re: So you think you know what double.Parse does? ExcellentOrg21-Aug-13 1:07 ExcellentOrg 21-Aug-13 1:07
 Face, meet palm... Dave Kreskowiak2-Aug-13 10:45 Dave Kreskowiak 2-Aug-13 10:45
 Re: Face, meet palm... lewax002-Aug-13 11:22 lewax00 2-Aug-13 11:22
 Best Function Ever LNogueira2-Aug-13 7:20 LNogueira 2-Aug-13 7:20
 Re: Best Function Ever Sentenryu2-Aug-13 7:44 Sentenryu 2-Aug-13 7:44
 Re: Best Function Ever Ravi Bhavnani2-Aug-13 8:08 Ravi Bhavnani 2-Aug-13 8:08
 Re: Best Function Ever ZurdoDev2-Aug-13 9:03 ZurdoDev 2-Aug-13 9:03
 Re: Best Function Ever Paul M Watt2-Aug-13 8:58 Paul M Watt 2-Aug-13 8:58
 Re: Best Function Ever Andy Bantly5-Aug-13 8:56 Andy Bantly 5-Aug-13 8:56
 Re: Best Function Ever Mohibur Rashid19-Aug-13 18:37 Mohibur Rashid 19-Aug-13 18:37
 Re: Best Function Ever ZurdoDev2-Aug-13 9:05 ZurdoDev 2-Aug-13 9:05