Archive for October 18, 2013

Friday, October 18, 2013

Fighting a 30-year-old Software Bug

Ovid (via Kyle Sluder):

Remember how Lotus 1-2-3 considered 1900 a leap year and how that was faithfully copied to Excel? Because it adds an extra day to 1900, many date calculation functions relying on this can easily be off by a day. That means that 39082 might be January 1st, 2011 (on Macs), or it might be December 31st, 2006 (on Windows). If my “year parser” extracts 2011 from the formatted value, well, that’s great. But since the Excel parser doesn’t know whether it’s a 1900 or 1904 date system, it defaults to the common 1900 date system, returns 2006 as the year, my software sees that the years are five years apart assumes an error, logs it, and returns the unformatted value.

Modern Receipt Validation

Apple’s sample code for Mac App Store receipt validation still uses OpenSSL, which as of Mac OS X 10.7 we are not supposed to dynamically link against. You can statically link with OpenSSL, but Satoshi Numata has posted some more modern code that uses only the built-in libraries (via Craig Hockenberry).


Masters of Doom

Jeff Atwood reviews the 2003 book Masters of Doom, about the history of Id Software:

It’s unusual to find a book about a contentious, complex friendship and business relationship that both parties sign off on – and even a decade later, regularly recommend to people interested in their personal back stories. But it is a testament to just how right Kushner got this story that both Romero and Carmack do. This is exactly the sort of meticulously researched, multiple viewpoint biography that you’d want to read about important people in your industry. In that sense, it’s kind of the opposite of the Jobs biography, which I liked well enough, but it presented one viewpoint, and often in a very incomplete, sloppily researched way. I would kill to read a book this good about Jobs.

Code Signing and Mavericks

Craig Hockenberry:

Very simply put, you can no longer sign a bundle (like your .app) if any nested bundle in that package is unsigned. These nested bundles are things like helper executables, embedded frameworks, plug-ins and XPC services.

The result is that you’ll need to update your Xcode projects as soon as you start building on 10.9. It’s taken me several days to understand what these changes are, and with the help of Perry Kiehtreiber on the developer forums, I’d like to share what I’ve learned.

Apple has been asking developers to update their apps for Mavericks, but the process for doing so is fragile and poorly understood.

Update (2013-12-20): The storeagent problem is still not fixed. It seems to be impossible to build an app for the Mac App Store unless you are using Mac OS X 10.8 and Xcode pre-5.

Update (2013-12-28): My customers are also having problems with 10.9 storeagent installing the version of my app that was built using 10.8.