Apple's fragile source code

This year I did wisely wait until the beta-3 for the new Mac OS before installing on my main computer. As far as my memory serves, El Capitan beta is as stable as only NeXTstep 3.1 beta was (and I believe this was 22 years ago) - marvellous achievement if one considers the level of complexity of a modern operating system. Of course there are bugs, but the two badly broken apps I found so far are the Mail app and iTunes - <sarcasm>what a surprise!</sarcasm>


iTunes does not recognise either of my iPod classic devices. The same happened with Yosemite beta and I believe - with Lion beta. If something breaks again and again with every new release, this is a good sign of a bad smelling source code. Yes, I know, until October this will be fixed and I will have the minor inconvenience of listening only old music in my car for the summer months. Not a big deal.

The Mail app bug is really bizarre though. I was emotionally prepared to have all sorts of trouble with Google's IMAP accounts. Well, IMAP worked surprisingly smooth. What broke badly was the old good POP, and it broke in a very strange way indeed. POP accounts are synchronised perfectly fine, but when one tries to view an email message that comes from a POP account, the app crashes. The stack-trace is even more bizarre:

Exception Name: NSInvalidArgumentException
Description: -[MFPOPAccount hasServerDefinedAllMailMailbox]: unrecognized selector sent to instance 0x7fbfc3c5c4f0

This happens (as far as I can follow the crash log) after some sort of display notification is fired by choosing an email message. In this place I would expect neither the model object (the email message) nor the view (showing the entire message) to care if the email came from POP account or if it was send to me by some divine power.

Anyway, without diving into Object-Oriented design, in both cases I smell a bad and very fragile design. This will be of no surprise to all the folks who for many, many years claim that both iTunes and Mail app must be rewritten from scratch. I think they are all wrong! These two apps must go the way of the dodo, and never show up again!

The big problem with Mail app and iTunes is that they do not deserve existence in a modern computer environment. They present an artificial user interface to services, that should not be interacted with in a centralised way, but delivered seamlessly to all apps that could make a good use of them. I want to see emails that relate to the SDK and developer related iTunes U content bundled in Xcode. I want to have the email I sent to my client last year for her birthday to show up in Contacts (so that I do not repeat the same BS greeting this year), and all the emails related to a project to be directly accessible in OmniFocus or OmniPlan. I want podcasts to be available in Evernote where I can annotate them. The same is true for most other social media. How often did I search for a tweet by a fellow developer suggesting a new app or describing the workaround for a nasty bug! I need this tweet delivered directly into Xcode, now!

Communication, learning, listening of music, access to photographs  and videos - all of these are examples of system-wide services that must be made available to any specialised application that could benefit of them, and not restrained in a vertical standalone applications. On Mac OS, iOS, Windows, or Linux many of the apps that provide user interface to these basic services are badly broken - not because they are written by careless developers, but because their independent existence is obsolete. Obsolete already for the last two decades!