Living In Linux
May 21, 2018

Back in February, I mentioned that I was pondering which platform(s) to work on.

Having been a Mac developer for most of the last 30 years, I was starting to feel that it might be time to at least experiment with other things, and also starting to feel a little frustrated with the hardware options available to me if I stuck with buying from Apple.

A few weeks ago I finally got round to doing something about this. I specced out a PC, bought the components, and put it all together.

As part of this process, I obviously had to decide what systems to install on it.

System Choices

The main choices being:

When compiling the parts list, I made sure that I bought components known to work with Hackintoshing, so continuing to use macOS was definitely an option. It’s one that I’m still holding in reserve, but for now, I haven’t gone that way.

When it comes to Windows, I’m not a fan, but sadly the state of the gaming world is such that if you want to play certain games, you have to use Windows. So I did decide to install that.

I don’t really want to live in Windows though. I’ll reboot into it to play games, but that’s as far as I really want to go.

The main reasons that I’m considering moving away a bit from Apple are related to platform lock-in, and the general corporatisation (is that a word?) of computing. All the same problems apply to Windows too, and in addition to them, I find the usability level to be a lot lower than macOS (admittedly, that may be because of my overwhelming familiarity with the Mac).

So that leaves Linux. I decided to install Ubuntu 18.04, and see how long I could survive in it before I potentially gave up and went back to the Mac.

So far, it’s been a few weeks, and I’m still going!

There are undoubtedly some wrinkles, but mostly I’ve been pleasantly surprised at how easy it is to do all the same things.

Work Tools

On the Mac, I spend most of my time in Xcode, Safari, SourceTree, Atom, or the Terminal.

On Linux, Atom and the Terminal are no problem.

Instead of Safari, I initially switched to Firefox. I picked this in preference to Chrome for the same reasons that I’m using Linux rather than macOS… corporate stuff. Subsequently I’ve also discovered Epiphany (based on WebKit), so the jury is out a little as to which one I’ll settle on.

I haven’t really found a good substitute for SourceTree yet, but I’ve realised that the Atom git/git+/github packages, which I already had installed, do pretty much everything I need. For the rest, I’m also comfortable using git on the command line.

So really that just leaves Xcode. I say “just”, but that’s quite a big hole to fill.

Xcode Schmexcode

I’d already been using Atom for a lot of things elsewhere, including as my text-editor of choice. Two of the things I spent a lot of time working on for the last couple of years with Sketch were the build tools (written in Python), and the plugin system (based on Javascript).

I found Xcode not to be a great environment for this sort of work, so I used Atom.

Most of the coding I’m doing right now is in Swift, and not UI related, so I don’t need things like Interface Builder, Code Signing, or in fact a lot of what Xcode does.

What I do need from an Xcode substitute are:

There are lots of Atom packages out there, and some of them purport to add Swift support, so it seemed like it might be a viable route.

Sadly it turns out that many of these packages are out of date, or don’t work on Linux

However, I’d also already been getting interested in actually working on the Swift compiler / package manager a bit, or at least getting familiar with the tools at a pretty low level. Also, in writing some Atom plugins.

You can probably see where I’m going with this. Right now, my Xcode substitute is Atom, plus some Swift-support packages for Atom, some of which I’m writing myself :)

This is the build-it-all-from-scratch approach! I’d normally dismiss this approach as being bound to lead to endless Yak-shaving, a bit self-indulgent, and an enourmous waste of time! In fact, I still can’t really deny any of that, but this year for me is all about a combination of having fun, exploring new horizons, and generally just following my interests and seeing where they lead me. Right now, trying to turn Atom into a half-decent environment for working with Swift ticks these boxes.

I’m planning to write more about my Atom/Swift work in a later blog post. In the meantime, if you’re curious, have a rummage on github.

(Incidentally, I considered VisualStudio Code too, but their Swift support seems equally non-functional on Linux, and their model for building things like auto-completion appears to be more complex.)

Other Apps For Fun And Profit

Clearly I do need some other applications. I don’t know much about the Linux world. There’s a lot of stuff out there, and from my limited experience, a lot of it is crap!

One thing that has been invaluable is Epiphany’s ability to bundle up individual websites as application (like Fluid does on the Mac).

This has really dug me out of a hole.

Here are some of my other (current) solutions:

Is That All?

Ok, this is where I have to admit to cheating a little. Or maybe a lot.

I really only use productivity apps like Pages/Word, Numbers/Excel, etc for the occasional business-related thing. From time to time I use graphics editors like Acorn and Sketch, but again, not very often.

I could go down the route of installing Open Office, Gimp, Inkscape, etc, but… I still have a Mac laptop :)

The truth is that I need to work with this sort of document rarely enough that the laptop is perfectly adequate. If I want to do it sitting at my desk, I have VNC. Alternatively, it’s a perfect excuse to relocate to a cafe…

General Look & Feel

So what about the general look & feel?

So far, I’m actually fairly ok with it.

I’ve done a few tweaks and brought a few things like fonts across from the Mac, to make things a little more familiar. I’ve hacked the keyboard layout a bit so that I can use the expected shortcuts for some things, because: muscle-memory. I’ve tried a few Mac-OS Gnome themes, but currently I’m using something else. The one thing I miss is the Mac/Unity-style menubar, but I can live without it.

There are undoubltedly some rough edges in the Linux desktop experience. There was a time when I would have found them just too grating. I think what’s happened since then is a combination of some of those edges being smoothed, and a certain amount of pragmatism developing on my part.

I’ve spent quite a lot of my working life doing cross-platform development of one sort of another.

I’ve never been a big fan of cross-platform UIs. They tend to look ok on the platform that the developer knows, and shit everywhere else. They also tend not to be well integrated with the coolest/most-useful system features on any platform, since those are often the features that are unique to one platform and hard to generalise.

Hence I’ve never been a fan of Electron-based apps, for example.

The reason I’m starting to revise my opinion, however, is all tied up with the long-term direction of travel of the various OSes, and perhaps of my own experiences as a user.

In a world where I’m not sure I want to be forever tied to Apple’s platform (or Microsoft’s, or Google’s), the ability to use open source tools built on open source platforms is becoming a political choice that I’m willing to make sacrifices for.

The ability to integrate deeply into (say) Apple’s killer features also becomes less attractive when using them involves an inescapable tie-in to their ecosystem. Incidentally, it’s also a lot less attractive in a world where the software quality has diminished, and “it just works” is no longer true.

In a world where I’m also switching between platforms(Mac laptop, Linux desktop, Windows for games), consistency also takes on a different meaning. Instead of it being annoying that a Twitter app I use doesn’t support some standard feature of the Mac, and is therefore inconsistent on that platform, it now becomes annoying if the app I use for Twitter has to be different depending on what computer I’m on, and is therefore inconsistent across platforms.

If an Electron app can work across all of them, I’m increasingly ok with that.

It sucks that it doesn’t know about the clever keyboard expansions that I told macOS/iOS about - but maybe I should find another macro expansion system that works everywhere?

I also think that if the ecosystem of things like Electron itself continues to expand, it may start to become the platform. I don’t know if Electron yet supports the concept of add-ons or extensions that you install once and then show up on any Electron-based app, but if it doesn’t yet, it probably will soon (and probably should). Then I have the option of writing one of these which does what I want across all platforms, or writing one of them for each platform, to give myself a consistent experience whilst using different back-ends to achieve it.

How Long Will It Last?

It depends a bit on what I end up doing next, I suspect.

Whilst I’m working with Swift, and the package manager, and low-level things that don’t require Interface Builder, I’m pretty happy where I am. Knee-deep in Yak hair though that may be.

If I start to build a desktop application from scratch, I will have to seriously consider whether I want to try to do with something like Electron. On the other hand, I’m enjoying working with Swift, so I don’t know that I’d want to give that up.

If I get back to the game I’m working on (as a background task - it’s a slow-burner), I’ll have a similar decision to make. Right now it’s tied to a few Apple technologies, but that was mostly to get up and running quickly, and so that I could use Swift. I could disentagle it from those technologies without too much work. I could switch to Unity, if I’m prepared to ditch Swift. I could stick with Swift and just roll my own for the GameKit/SpriteKit stuff I’m using. Etc. Choices, choices.

Fun times! Watch this space…

« More Build Adventures Testing Swift With Travis CI »
Got a comment on this post? Let me know at @samdeane@mastodon.org.uk.