Jonny Chaos

Epoch Fail

May 16, 2008 on 2:23 pm | In Uncategorized | | Jonny Chaos

I’m really unimpressed with .NET

The webservices handler is a disgusting clusterfuck. not only does it not handle chunked encoding for incoming soap envelopes (good god, its an HTTP1.1 standard: you freaks.) but due to the oddity of .NET “value” types, you cant make dates optional: System.DateTime is not nullable, so when it deserialises from the soap XML, it NEEDS a value: automatically assigned minOccurs=”1″ in the WSDL. this is silly because you dont actually have a way to check if date data is unassigned. same with numeric types. it also makes SQL mappings horribly dangerous: if you load an INT field from SQL thats null, how do you handle that? make it 0 - but that leads to some serious issues, 0 is different to “not there”. With dates one can conceivably use the beginning of the epoch, but thats a dangerous game too… you check that in a different system, and it has a different epoch: you end up interpreting a date wrong, imagine, invoices dated to 01/01/0001 when you dont actually have a date…

on that note, microsoft are freaking weird and cant pick a single epoch…

  1. December 31, 1899 - Microsoft Excel
  2. January 1, 1601 - Windows’ Win32 file time-stamp
  3. January 1, 1980 - MS DOS
  4. January 1, 1 - Microsoft .NET’s DateTime


so that looks really weird to the unix/Mac OS X/Java epoch which is the good old 1/1/1970.


one neat exception is the Mac OS 9 epoch

January 1, 1904, was chosen as the base for the Macintosh clock because it was the first leap year of the twentieth century. [...] This means that by starting with 1904, Macintosh system programmers could save a half dozen instructions in their leap-year checking code.

cute huh?

as for microsoft: cunts, do some proper design work for once… seriously, 4 epochs? you dumb fucks, one of them thinks that feb 29 1900 is a real date! whats next in this trend of assigning fantasies to variables?

int i = SPELLS_AND_FAIRIES_AND_JUSTICE

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^