New project: the GNUstep developer guide

I discovered by searching the interwebs that a significant number of people who try out GNUstep get stuck at the “I wanted to do Objective-C on my Linux so I installed GNUstep…now what?” stage. There are some tutorials for GNUstep around, but they’re not necessarily easy to find, and not necessarily pitched at beginners. Otherwise, you’re told to look at the Cocoa documentation, and as Xcode’s user interface turned into a combine harvester, Apple moved to Swift, and other changes happened, the relevance of Apple’s documentation to GNUstep has been on the wane for years.

Therefore today I’m launching the GNUstep Developer Guide. It’s not yet pretty, it’s not yet complete, but it is a place to look for GNUstep documentation written for GNUstep programmers. The first guide is up: the introduction to ProjectCenter and GORM.

Let me know if you find it useful!

The reality is not the abstraction

Remember that the abstractions you built to help you think about problems are there to help. They are not reality, and when you think of them as such they stop helping you, and they hold you back.

You see this problem in the context of software. A programmer creates a software model of a problem, implements a solution in that model, then releases the solution to the modeled problem as a solution to the original problem. Pretty soon, an aspect of the original problem is uncovered that isn’t in the model. Rather than remodeling the problem to encapsulate the new information, though, us programmers will call that an “edge case” that needs special treatment. The solution is now a solution to the model problem, with a little nub expressed as a conditional statement for handling this other case. You do not have to have been working on a project for long before it’s all nubs and no model.

You also see this problem in the context of the development process. Consider the story point, an abstraction that allows comparison of the relative sizes of problems and size of a team in terms of its problem-solving capacity. If you’re like me, you’ve met people who want you deliver more points. You’ve met people who set objectives featuring the number of points delivered. You’ve met people who want to see the earned points accrue on a burn-down. They have allowed the story point to become their reality. It’s not, it’s an abstraction. Stop delivering points, and start solving problems.

Minimum Viable Controller

The book “NeXTstep Programming Step One: Object-Oriented Applications” by Garfinkel and Mahoney said this about Controllers in 1993:

A good rule of thumb is to place as little code in your controller as necessary. If it is possible to create a second controller that is only used for a particular function, do so – the less complicated you make your application’s objects, the easier they are to debug.

Later, on the same page (p131):

Before you start coding, it’s a good idea to sit down and think about your problem.

Both of these pieces of advice still apply. Neither has been universally internalised 24 years later.

2017: the year of configuring Linux (or Windows, or OS X, or…) on the desktop

I’m going to FOSDEM next month, maybe I’ll see some of you there. This gives me motivation to solve one of the outstanding problems on my laptop: I currently, as has been mentioned here multiple times, use Windows 10 as a bootloader for my GNU/Linux installation. I would rather boot straight into Linux. So I can set myself a milestone: I would prefer, by the time I get to St. Pancras International train station on Friday 3rd Feb, not to have Windows on this laptop any more.

The laptop is a Alienware 15 R3, although weirdly the processor my laptop contains (Core i7-6820HK) is not one of the CPU options listed on the Dell website, so maybe they changed the configuration without updating the model, or had a spare old CPU knocking around when they built my laptop and decided to use that. Anyway, this is computering, so this is fine. You’re not expected to know or care that you don’t have the correct bits in the computer, just that it’s “Late 2016” (even though they still sold the R2 in late 2016, too).

The problems I have seem to fit into one of two categories: either the wi-fi (a Qualcomm Atheros chipset) doesn’t work, or the CPU/motherboard chipset (see above) isn’t supported and all hell breaks loose.

The wireless situation is that the wireless should be fully supported: Qualcomm Atheros integrated the driver into the Linux kernel back in version 3.11-rc1, in July 2013, and supply the firmware binaries. And so it doesn’t work in modern Linux kernels (or doesn’t reliably work, or fails for different reasons).

The chipset situation is that Intel integrated the driver into the Linux kernel back in version 4.3, in November 2015. So it doesn’t reliably work in modern Linux kernels.

I could go into the specific problems I’ve seen and the specific things I’ve tried to work around them, but I won’t. I won’t because well-meaning but unengaged people will ask me infuriatingly basic and irrelevant questions (yes, I have already turned Secure Boot off; no, it doesn’t change the fact that the ath10k module hasn’t loaded), or suggest unjustifiable solutions. The most common is the Distro Pimp: you should try [Debian/Debian testing/Arch/Ubuntu/openSuSE/Fedora/Mint/wait, which one did you say you’d already tried?]. Well that’s nice, but the distribution I tried (that didn’t work) is made of GNU and Linux 4.8, and the distribution you’re suggesting is made of GNU and Linux 4.8, so what specifically is it about your distribution that makes you think it works where this other one doesn’t? Oh, they focus on [stability/cutting edge/purple desktops/compiz effects/bible-reading software] do they? And how does that solve my problem where the kernel doesn’t work, despite being newer than all of the bits I need to have a working kernel?

This is the reality of Linux on the Desktop, the one that computerists say the world is ready for. Of course, it’s also the reality of everything else on the desktop. Something that occasionally happens in my Windows 10 bootloader is that it reboots while I’m using it to install some updates, because I stopped moving the mouse for a couple of minutes between 6pm and 9am (you know, the time when I’m at home, using my home computer). Some colleagues at work use Windows as an actual operating environment, and have things like Skype (made by Microsoft) popping up a notification when they’re presenting in PowerPoint (made by Microsoft). Something that apparently happens to people that have Macs is that the built-in PDF software doesn’t work well and they have to buy somebody else’s PDF software, except that they have to check whether that other PDF software is based on the built-in stuff or is something written by somebody else only they can’t because without the Four Freedoms they don’t have the freedom to study how the program works, and even if they could fix the problem they’re not allowed because they lack the freedom to redistribute and make copies to help their neighbours, or to improve the program so the whole community benefits.

This is fine.

The problem with not-Apple

I’ve read a few articles over the last week or so that point to the Mac having lost its shine among developers. There was a time when the first things you did when you wanted to be a developer on the Free Software platform Ruby on Rails were that you bought an Apple PowerBook and the proprietary TextMate editor. There was a time when even Sun’s employees programmed Java on Macs. But now, I read things like this:

Right now, the only real option Apple has offered [vocal developer supporters] is the iMacs, which seems to be their answer for high end machines. That may work for some, even thought it won’t be their first preference for many. It’s clearly left many disgruntled and some thinking of jumping ship to other manufacturers, either running Linux or Windows. Source: Apple’s 2016 in review

Apple’s review process for [Safari browser] extensions is disorganized, arduous and quite frankly insulting Source: What Apple gives you for $100 as a Safari Extension Developer

the current state of the Mac has me considering whether it’s still the right platform for me. Source: Finding an Alternative to Mac OS X

It seems like Apple has either lost its way, that it has lost touch with what (some of) its customers want, or that it simply doesn’t care about those customers. Developers are a captive audience, and creative professionals can switch to Windows, I guess. Apple no longer considers them core. Source: New MacBook Pros and the State of the Mac

For me the sheen was long-gone back in November 2014, and in January 2015 I posted about switching (back) to Linux. That was around the last time the blogosphere was telling us all that Apple had lost their way – funny how these badly-run companies manage to sell more of their shit than their competitors for years on end, non? Anyway, it was the popularity of the meme that led me to post, but my story about falling out of love with their treatment of Free Software and the make-work associated with being in their developer programs which you can read about in that post is personal to me.

There’s a problem, though, and that problem is consistency. NeXTSTEP, more or less, can be summarised as “let’s make an Alto, but compromise on using technology that already exists”. So you get your Alto technology like OOP and ethernet and laser printers, but you also get the compromises – Display PostScript, UNIX, GNU, and C. There’s one system to learn (Objective-C and the various object “kits”), and then a few subsystems (UNIX and GNU, Mach, NetInfo, DPS) that make themselves known if you dig in.

Mac OS X is less of a NeXTSTEP than NeXTSTEP, but the romance of consistency still exists. I can tell myself, partly because it’s true but also because I invested over a decade of my life in working around the flaws in the model, that OS X is still Objective-C and kits with a wider selection of kits (Core Data, GameKit, PDFKit etc) and a few more compromises.

You definitely can’t say that of Linux, particularly as a developer. The application my group works on now is written in Qt, which is itself a nice framework (Qt with its meta-object compiler is to C++ as Objective-C is to C, in a way that GTK+ is not), that for the most part just sits on top of Linux (and other platforms) as a Qt application. The problem is, when you want to do something that isn’t in Qt’s equivalent of the app kit, you may not only have to choose one of a few different alternative technologies but actually choose all of them if your users might not all have chosen the same one.

Even on my own laptop that’s true. It is…well, for reasons that I just haven’t put the effort into solving, it’s actually running Ubuntu 16.10 in VirtualBox in Windows 10 (whomp!), but what I see is that it’s running Ubuntu 16.04. Now I could, and do, use GNUstep as an application development environment, and get my Objective-C and kits running on something like Unix just as I’m used to. But that inconsistency is always there, always at the forefront, always chipping away. Because the window manager does not use the Objective-C runtime, and uses weird X things to communicate with processes rather than Objective-C messages. The browser is Firefox, because while there is a GNUstep browser, it’s not very good (mostly because its WebKit is not up to date, but then WebKit is itself not Objective-C either). My Linux uses systemd to start processes, your Linux uses rc files/init files/upstart. My GNUstep is drawing with Cairo, yours is drawing with X intrinsics.

There’s a problem with that problem, though, and it’s that the consistency of Mac OS X is a fiction.

Are Dashboard widgets made out of JavaScript because of a compromise, or an aborted change of direction? Is the lack of consistency between the same API’s names for things in Swift and in Objective-C a cognitive overload that’s worth carrying around? Do I ignore the funky dialect of C++ that drivers are written in (I have written IOKit drivers and edited a book on the technology, so this isn’t a hypothetical concern)? While some ObjC APIs use message-sending and others use block callbacks, am I right to call them both the same thing? Does this process communicate with that process using XPC, Mach IPC, UNIX pipes, sockets, signals, or distributed notifications?

The romance turns out to be based on a lie, but on a powerful and compelling lie that’s easy to believe, and easy to miss even if you’re unsure whether it ever existed.

Resolution: Subscribe Self

I have, at least temporarily, stopped using the social media to find news. I publish an RSS feed here, and your other favourite sites probably do too, so we can all discover the things we want to read without having to wade through a morass of things we don’t.

Soon, I’ll collect some recommended feeds together. What are yours? Which are the high-quality, low-volume feeds you make sure to catch every post on?