Last Week on my Mac: Try turning it off and back on again

Most days, we try to walk on the Downs, if for no better reason than to look from our little Isle of Wight to the mainland, and rejoice that we are not over in that dystopian world. Over there it seems to have been another week of teetering on the brink of several different abysses, but over here I have been able to enjoy some fine autumn weather, and make a bit of progress on my Mac.

Perhaps progress is the wrong word, because I am hastily trying to undo the most serious regression in macOS Sierra, and restore access to past entries in the logs. This may seem unimportant, but few days go past that I do not have to deal with a user problem in which I dearly wish to be able to look at logs, as we have been able to for the best part of 16 years.

My current problem concerns a probable bug in recent versions of iTunes which is preventing a user from ripping audio CDs. The error message shown is unhelpful, and his log contains the key to the solution, if only I could see some excerpts.

I’ve been keeping a watchful eye for someone else who has been sufficiently motivated to produce a replacement for the near-useless Console 1.0, but there’s still no sign. I had hoped that the Sierra 10.12.1 update might have brought good news, but Console remains as non-functional. So the only answer is to get writing some code myself.

It’s a long time since I wrote a full-blown app for the Mac, and OS X has always felt vast, horrendously complex, and hard work for something which should be quite lightweight. I was spoiled in Classic Mac development, as I used Apple’s MacApp class library, which made writing polished, native apps supremely efficient, and very clean.

AppleScript is an excellent tool for rapid application development (RAD) so long as you don’t want much of a human interface – an absurd contradiction which has prevented it from becoming popular. Mark Alldritt, who now makes the superb Script Debugger, used to offer FaceSpan, one of the best RAD environments I have ever used, but that never really made the leap to Mac OS X, and Mark was forced to abandon it in 2009.

Apart from its lack of ready access to a human interface, AppleScript sometimes makes the simplest of things really opaque. A good example is getting the current date in numeric format, as 2016-11-06, for instance. It’s actually simpler to do this by obtaining it from a shell command than using AppleScript’s own features.

For an app that is mainly front-end, with a bit of simple processing behind it, having to write an AppleScriptObjC app is serious overkill. I don’t need a custom super-combo-radio pop-up emoji tool, just good, basic interface elements that have been around for decades. With some precious exceptions, like Shane Stanley’s invaluable Dialog Toolkit, there is nothing to support RAD.

Ultimately, what is now LogLogger will have to go into Xcode and be written in Swift. Even here there is the contradiction that Apple is pushing Swift Playgrounds – a modern concept of RAD – but the moment that you want to knock together a simple app, it all gets terribly Byzantine.

The truth of modern computer programming came back to me when Mihalis Tsoukalos tweeted an image of the Mandelbrot set. I remember publishing the source code of one of the first apps to plot colour Mandelbrots in Personal Computer World in the mid 1980s. It was short enough to print on a handful of pages, and our implementations on demonstration parallel processing systems were even more concise. Where vendors should have invested in the development of core high-level libraries, they have flooded their SDKs with sprawling, intricate interfaces to all the extras. Only now are they realising that instead of making coding more popular, most users are terrified of even opening Terminal.

The emasculation of Console is part of this bigger process. Fewer users seem capable of tackling problems when they crop up. Instead, they reach for the support service, where they are guided steadily through a series of scripted steps which keep them well clear of dangerous tools like Terminal and Console.

Without any real knowledge or understanding, users are left with generic solutions, epitomised by the question “have you tried turning it off and back on again?” Apple support generally spares us that admission of failure, but it has its fair share of cop-out solutions, like resetting the NVRAM, and reinstalling macOS. When those prove unsuccessful, or only temporary, many users then launch into email, or ask in an online support forum.

There are encouraging signs, though. Apple’s contribution of Swift Playgrounds is more than just a gesture, and hopefully will inspire and equip a new generation who are not afraid to code and investigate. The runaway success of the Raspberry Pi is another fine example. But the industry needs to consider where their enthusiasts will go once they want to step out of a playground and into more real-world projects. Currently the jump from Swift Playgrounds to full-size Xcode projects is daunting, and from the likes of Raspberry Pi to macOS, iOS, and Windows 10 is just as great.

It comes down to good tools which aid that transition. These need to include RAD environments for programming, and more friendly and powerful utilities such as Console. Otherwise many of those inspired by educational initiatives will become frustrated, and the opportunity will have been wasted.