Click here to Skip to main content
11,410,550 members (57,065 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: Something original PinmemberJacek Gajek13-Aug-13 6:51 
GeneralRe: Something original PinprofessionalBrisingr Aerowing19-Aug-13 17:20 
GeneralRe: Something original PingroupExcellentOrg21-Aug-13 1:04 
RantFsking ASP.NET! PinprofessionalRichard Deeming6-Aug-13 11:00 
GeneralRe: Fsking ASP.NET! PinprofessionalBernhard Hiller6-Aug-13 21:57 
GeneralRe: Fsking ASP.NET! PinmemberSentenryu7-Aug-13 10:08 
GeneralWhen things to more than you think Pinmemberimagiro6-Aug-13 8:17 
GeneralRe: When things to more than you think PinmemberSuper Lloyd6-Aug-13 22:13 
GeneralUndoubtedly this is my own ignorance in glorious action but... PinmemberAndy Bantly5-Aug-13 8:52 
GeneralRe: Undoubtedly this is my own ignorance in glorious action but... PinmemberMatt U.5-Aug-13 9:10 
GeneralRe: Undoubtedly this is my own ignorance in glorious action but... PinmemberAndy Bantly5-Aug-13 10:22 
GeneralRe: Undoubtedly this is my own ignorance in glorious action but... PinmemberMatt U.5-Aug-13 11:02 
GeneralRe: Undoubtedly this is my own ignorance in glorious action but... PinmemberAndy Bantly6-Aug-13 11:54 
GeneralSo you think you know what double.Parse does? Pinmemberharold aptroot3-Aug-13 0:27 
I thought I knew, but I was wrong.
double x0 = 1 / 0.0;
double x1 = 1 / -0.0;
double x2 = 1 / double.Parse("0.0");
double x3 = 1 / double.Parse("-0.0");
Obviously these are all going to be some sort of infinity (yes you can divide by zero[^], and the result is infinity). One might reasonably expect both x1 and x3 to be Negative Infinity .. however, only x1 is Negative Infinity. x3 is Positive Infinity, which is about as wrong as any answer could possibly be.
This implies that double.Parse blatantly ignores the sign of zero.
GeneralRe: So you think you know what double.Parse does? PinprofessionalPIEBALDconsult3-Aug-13 6:31 
GeneralRe: So you think you know what double.Parse does? PinprofessionalGrimlock4-Aug-13 9:25 
GeneralRe: So you think you know what double.Parse does? [modified] Pinmemberharold aptroot4-Aug-13 10:07 
GeneralRe: So you think you know what double.Parse does? PinprofessionalGrimlock7-Aug-13 8:38 
GeneralRe: So you think you know what double.Parse does? Pinmemberharold aptroot7-Aug-13 8:51 
GeneralRe: So you think you know what double.Parse does? PinmemberRob Grainger15-Aug-13 1:18 
GeneralRe: So you think you know what double.Parse does? PinmemberAmitosh S.M.4-Aug-13 21:50 
GeneralRe: So you think you know what double.Parse does? PinmemberJacek Gajek6-Aug-13 11:56 
GeneralRe: So you think you know what double.Parse does? Pinmemberharold aptroot6-Aug-13 11:59 
GeneralRe: So you think you know what double.Parse does? PinmemberJacek Gajek6-Aug-13 12:15 
GeneralRe: So you think you know what double.Parse does? PingroupExcellentOrg21-Aug-13 1:07 
GeneralFace, meet palm... PinmvpDave Kreskowiak2-Aug-13 10:45 
GeneralRe: Face, meet palm... Pinmemberlewax002-Aug-13 11:22 
GeneralBest Function Ever PinmemberLNogueira2-Aug-13 7:20 
GeneralRe: Best Function Ever PinmemberSentenryu2-Aug-13 7:44 
GeneralRe: Best Function Ever PinprofessionalRavi Bhavnani2-Aug-13 8:08 
GeneralRe: Best Function Ever Pinmemberryanb312-Aug-13 9:03 
GeneralRe: Best Function Ever PinmentorPaul Watt2-Aug-13 8:58 
GeneralRe: Best Function Ever PinmemberAndy Bantly5-Aug-13 8:56 
GeneralRe: Best Function Ever PinprofessionalMohibur Rashid19-Aug-13 18:37 
GeneralRe: Best Function Ever Pinmemberryanb312-Aug-13 9:05 
GeneralRe: Best Function Ever PinmemberMladen Janković2-Aug-13 11:31 
GeneralRe: Best Function Ever PinmentorPaul Watt5-Aug-13 19:11 
GeneralRe: Best Function Ever PinmemberJacek Gajek14-Aug-13 1:09 
GeneralRe: Best Function Ever PinmemberMarkTJohnson6-Aug-13 7:51 
GeneralRe: Best Function Ever PinprofessionalPIEBALDconsult9-Aug-13 9:03 
GeneralRe: Best Function Ever PinmemberBCantor13-Aug-13 6:25 
GeneralRe: Best Function Ever PingroupExcellentOrg21-Aug-13 1:10 
GeneralRe: Best Function Ever PinmemberSuper Lloyd7-Aug-13 4:02 
GeneralRe: Best Function Ever PingroupExcellentOrg21-Aug-13 1:08 
GeneralThe return a detailed error string but ignore its contents and assume it's only ever the failure case you expected to occur but couldn't be bothered to handle properly pattern PinmemberDan Neely2-Aug-13 5:42 
GeneralRe: The return a detailed error string but ignore its contents and assume it's only ever the failure case you expected to occur but couldn't be bothered to handle properly pattern Pinmemberryanb312-Aug-13 5:54 
GeneralRe: The return a detailed error string but ignore its contents and assume it's only ever the failure case you expected to occur but couldn't be bothered to handle properly pattern PinprotectorOriginalGriff2-Aug-13 6:38 
GeneralRe: The return a detailed error string but ignore its contents and assume it's only ever the failure case you expected to occur but couldn't be bothered to handle properly pattern Pinmemberryanb312-Aug-13 6:49 
GeneralRe: The return a detailed error string but ignore its contents and assume it's only ever the failure case you expected to occur but couldn't be bothered to handle properly pattern PinprotectorOriginalGriff2-Aug-13 7:03 
GeneralRe: The return a detailed error string but ignore its contents and assume it's only ever the failure case you expected to occur but couldn't be bothered to handle properly pattern PinprotectorOriginalGriff2-Aug-13 6:38 

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.150414.5 | Last Updated 25 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid