Apfelstrudel for developers

When a beta software for the developers is not working for them, you know something is fundamentally wrong. This is exactly the situation with the current developer's beta releases of Mac OS (El Capitan), iOS 9, and Xcode (Apple's IDE).

As many others, I was super happy with the first beta releases of OS X 10.11 and iOS 9. They had this magical touch of stability that I do not remember seeing for many years. But then the things got badly wrong. Any combination of OS X 10.11 (beta 5 and 6) and Xcode 7 (beta 4 and 5) did not work for me. Besides frequent Xcode crashes (something I do not complain, when working with beta software), it was absolutely impossible to open any Interface Builder file for iOS (XIB, Storyboard) - and this is definitely no go! After all, how am I expected to beta test software, that I cannot write?

There were sporadic reports that some lucky developers got it running, but no magic command line gibberish could solve my pains. So I collected different suggested "workarounds" by fellow developers and tried to analyse what's going wrong. At the end I solved my most urgent problems by doing the following:

  • I removed any trace of Xcode from the disk. This includes Xcode 6 and 7 in /Applications, any Xcode related files in /Developer, as well as multiple applications of chlorine containing detergents in my home ~/Library
  • From App Store I installed the official Xcode 6.4 version. After installing it, I opened it to perform any post-installation magic. Then I closed it (at that point the IB was still broken).
  • As suggested by lucky fellow developers, I ran in the terminal the following: 
gtupar$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
gtupar$ sudo mv dyld_sim dyld_sim.orig
  • At this point, Xcode was able to open IB files again
  • Installed the latest Xcode beta (beta 5). Without any terminal massaging, IB was working. Without executing the commands above and by just installing Xcode 7/5, IB was still broken. I did not try to install only the latest Xcode 7 beta (without Xcode 6) and run the above commands.

So, I am happy again. But here is my question to Apple: are  your QA procedures completely broken?

I started using Apple related development environments since 1990 - long before Apple acquired NeXT, and at times when Xcode was non-existent, and the dev tools were IB and TextEdit. (Later came the PB - ProjectBuilder, which was a glorified UI around Unix Makefile). Since then I had the chance to install every early beta software on my computer - even WebObjects v. 0.71 was happily working on my HP workstation at the time. If my memory serves me well, for all these 25 years I never had to deal with such badly broken (for the developers) beta release.

What Apple delivered this time to us - the developers, is a mess. At best it is something like an Austrian Apfelstrudel (apple pie), where one can find few tasty pieces of apple or raisins, but nothing consistent. I was very happy when Apple announced few years ago their efforts for better integration and communication between different groups. At the moment, I am unable see how two groups could work together and create such major havoc.

One fina note: around 1993 on NeXTstep 3.x I was able to install (and often uninstall) new apps and app plugins without stopping the execution of any app, or for that matter - rebooting. It was possible to install and load a dynamic bundle for a running app (yes, I know the security arguments, thank you). In 2015 I am unable to install Xcode without stopping iTunes. Is this a sign of progress?

My very personal rendezvous with accessibilities, NeXT, Steve Jobs, antidotes, vision...

I was born with a serious heart defect. If it was not for modern medicine, I would not be able to write these lines, neither to have a normal life, a family, a child, travel around the world, climb mountains, go for skiing, write many lines of computer programs, enjoy my hobbies (astronomy, music, ...), work on research projects (muscular dystrophy, bionics, molecular pathways, parallel computing, bio-informatics...). I was lucky to belong to the first generation of kids, who had the chance to have an open-heart surgery and walk away from the hospital as a completely normal and healthy person. So, to start with, to all those folks, who will suggest not to visit the doctor, never to allow my child to be vaccinated, or to drink grass-tea against cancer - you belong to the darkest part of the Middle Ages, and please stay there - thank you!

The next stop of my accessibility journey. I was working at the European Molecular Biology Lab in Heidelberg. An almost completely blind lady started working at the lab next-door. At that time the first braille displays were hitting the market, but they worked almost exclusively with PC's. Our labs were full of SUN stations, NeXT computers (mostly because of the magneto-optical drives, but this is a story for another blogpost), SGI's, VAX, and a few Macs to run Word and to print our scientific papers, but no PC's. So, one day I gathered all my courage and wrote an email to Steve Jobs, asking him whether it was possible to write a braille driver for the NeXTSTEP operating system. Three days later I got a typical one-word 'Steve' reply: "Yes". That was all. What followed was a call by an interim engineer, who told me Steve had asked him to help me. A month later the first braille driver was born, and two German manufacturers of braille displays could claim their hardware works with PCs and NeXT Stations. What followed was a long and prolific friendship with NeXT and later - Apple engineers that has grown around many gallons of beer and accessibility related chats. The fact that I had the privilege to be invited by Steve for a two hour lunch I guess, will be the topic of a yet another blogpost.

Writing the braille display driver had another profound effect - I was welcomed in the visually impaired community. There I met many very intelligent and thoughtful people, who helped me to see the world from a completely different point of view. The lessons I learned there I am able to apply almost every day - no matter whether I write computer programs, or think about the accessibility of the labels of our bio-products. Another side-effect was that I started observing the world around me not only visually, but also with my other senses - to take notice of the sounds (or their absence) around me, to relate smells with the surroundings. The most profound change however was how I started observing the world with my tactile senses. It turned out that the hand is the best sensor for quality. It immediately distinguishes between a quality product and cheap crap. The trained hand "feels" the thoughts of the engineer who designed the smooth, but elegant edges, or the careless lack of such thoughts. The hand "feels" the quality of materials, their durability, the quality of the casts used, the final polish. The hand feels the thermal conductivity and the electrical properties, and a trained hand could even feel the electrolytic properties of the material and therefore its corrosive properties. It is an amazing mobile lab, that we always carry with us. Pity most of us lost the ability to use this super sensitive device.

During my research years in Heidelberg I also developed a very fast method to compare protein structures. A research visitor from Brazil discovered that one can use my method to identify where small poisonous polypeptides, often found in plant toxins and animal venom, are attached to essential enzymes. (An example is a poison, that blocks the production of mRNA in cells and leads to almost immediate death.) This method is used as part of software packages to discover antidotes. To be able to save human lives (even if very indirectly, by writing about 50,000 lines of C source code) is a feeling I cannot describe, but wish everyone could experience. Finally, all these molecular "games" lead me to my almost life long interest in muscular dystrophies and related conditions. LGMD 2A (or Calpainopathy) is something that keeps my brain busy every other day. I have this strange feeling, or intuition, that it is one of the key components in understanding complex molecular pathways and how they relate to cell-clocks. And also how diseases like MD, Alzheimer, and Diabetes are evolutionary related.

Many biology students in Heidelberg worked in hospitals to mitigate the permanent need for more nurses and lab personal. I worked too - in the orthopaedic hospital. It was during the Gulf War I, when the hospital were full of badly injured soldiers. There I learned yet another aspect of assistive technologies - assistive mobility. When we talk about accessibility on iOS or Mac OS, we normally think of VoiceOver. Unfortunately, no operating system pays any close attention to people in wheelchairs, or experiencing conditions like Cerebral Palsy, Parkinson, Muscular Dystrophy, Friedreich's ataxia, Multiple sclerosis, etc. I am not sure, but the number of people with such conditions by far exceeds the number of severely visually impaired (or completely blind). There are thousands of ways a computer device could help people with such disabilities. "Smart" wheelchairs, assistive household robots, specialised maps (with wheelchair accessible roads, information about wheelchair accessible transport, shopping malls, public toilets, restaurants, ATMs), computer aid communication, "smart" homes, remote monitoring, etc. These are just a few technologies that should be build into any mobile device or computer (as VoiceOver is), but are inexplicably and unfortunately missing.

For most of us working in order to pay the bills is perhaps all we experience in our professional career. I was blessed to spend a few unforgettable years in research, and later, in my own company to work on extremely challenging projects, that normally could be only handled by large teams working in large corporate environments. We had also the chance to occasionally work on a few cutting edge research projects that kept my imagination and that of my colleagues alive. Paying the bills, of course, is important. But to change people's lives for better, to push the boundaries of technology, to transform sci-fi into reality, these are the things I live for (and I hope many others too). My goals for the coming years is together with my colleagues to push the boundaries of assistive computer technologies even further. KenColour and KenWorld are just the first few steps we are willing to take. We have far reaching plans for the future to explore places in the wide accessibility prairie - not only related to visual impairment, but also to assistive mobility. Teaching disabled people to make use of modern technologies and developers and device engineers to construct accessible products is another goal of mine. A textbook on mobile accessibility is already slowly taking shape. Oh, and returning to fully blown research projects is something I will never stop looking for.

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! 

OS X 10.9 -> 10.10 upgrade headaches

Last month we moved the last production and test severs to Yosemite. (Yes, I know most of the readers of this blog made the transition many months ago, but I am talking about production servers that run financial and mobile operator software, not about bleeding edge developer computers). Some of these server (mostly older models Mac minis and Mac Pros used in the test environment) had problem upgrading.

Symptom: 
During upgrade from Mac OS 10.9 to 10.10 the upgrade process may hang for indefinite time but the server may remain accessible via ssh.


Solution: 
Install all the latest updates of 10.9 and then clean the nvram. In case the machine is hanging already a restart will return into the old 10.9 system. The command for cleaning nvram:

   sudo nvram -c
After cleaning the nvram, restart the machine again and then try upgrading the operating system


Note that after the nvram cleanup one may need to restore some settings there, for example the VM compression:
   sudo nvram boot-args="vm_compressor=1"
After this (and probably other nvram settings) the machine will need a reboot again.

Thanks to our Sys Admin (Georgi Karageorgiev) for finding the solution.