Thoughts 1

published 2016-09-16

Thoughts

I have not found the motivation to write here for a while, so I will be trying something new. This is the first of a series of posts which will be composed of a few smaller unrelated snippets, mostly things I would usually post in a smaller form on Twitter. They will relate to anything I will have found interesting recently. Some will be practical and some will just be reflections about a give topic.

MSYS2

If, like me, you are mostly a Linux user but sometimes have to work on a Windows machine, have a look at MSYS2. It allows you to quickly get a decent environment set up, with Bash and a package manager, (pacman), which you can use to install things like Git.

Sailfish

I have had my Jolla C for two months now. I have not spent as much time as I would like playing with it, but so far I am pretty happy with Sailfish. Like WebOS, it relies heavily on gestures, which makes most of the features of the phone usable with the thumb of a single hand. There are not many applications in the store so far but the default applications are good in general and most Android applications work well, I could run Lima on it without any problem for instance.

From a programmer's point of view, it is all I hoped for. I went from zero to Hello World on the device in less than an hour. Coding happens in QT Creator and the UI of the application is described with QML. The SDK ships with an emulator that runs in VirtualBox, but also with a second virtual machine which is used to compile code, which means you don't have to install a cross-compiler on your local machine. Applications, which are technically RPM packages, can be deployed to hardware devices via USB or SSH over WiFi.

It also has to be noted that the native terminal application is very good, much better than anything I saw on Android. A SSH client is included so it can occasionally be used to log into a server.

The main reason I have not made that device my main phone yet is that its battery life is much worse than that of my Android phone, but hopefully that is something that can be solved.

The fractal dimension of software

I stumbled upon an insightful tweet about software development time estimation. The larger the tasks we try to estimate, the more wrong we will be. Maybe an estimate as a single number representing time is not enough; maybe we should also try to figure out the fractal dimension of the job to be done.

Distributed systems are a UX problem

Everyday I grow more convinced that this is true. Not only of failure conditions, but even more so of things like reconciliation strategies in case of causally concurrent events, for instance how to represent data with CRDTs.

It is a problem, because people doing distributed systems often either do not want to do UX, do not have the competence to do it, or just do not have the permission. We tend to be at the bottom of the stack, and some people think it would be a disaster to let us work on anything user-facing. On the other hand, most people actively doing UX do not understand or care for distributed systems issues.

The result of this is that, if we design without taking technical constraints into account, we end up with systems that cannot be implemented without relying on central authority. Add to that the fact that it is almost always much easier to implement something in a centralized way, and you have one reason why the Cloud is winning and distributed alternatives to popular services never seem to take off.

Palm

I stumbled upon two fantastic documents related to Palm recently. The first is a series of blog posts called A History of Palm. Very interesting, even though I disagree with the conclusion of the fifth post. What killed the Pre line at HP was not that WebOS did not take off; they never let it a chance to. I have been using a Pre 3 for a long time (I had pre-ordered it so I was one of the lucky few to have it in France) and it was a fantastic device, extremely influential on future evolutions of both iOS and Android (after all, the interface was the brainchild of Mathias Duarte). What ended Palm's legacy was the eviction of Mark Hurd and his replacement with Léo Apotheker, who hates hardware. Probably one of the worst mistakes the HP board ever made.

The second document is the Zen of Palm, a design guide for Palm OS from 2003 which is still pretty relevant today in some ways.

Is preemption the root of all evil?

Two decades years ago cooperative scheduling was more frequent than preemptive scheduling. Windows 3.1 was completely cooperatively scheduled, which means that all applications had to yield to the system scheduler, or they would block the whole system. In Mac OS 9, the threading API was cooperative as well within a process, even though different applications would be scheduled preemptively by the kernel.

Modern OSs do not make much distinction between a thread and a process anymore, threads are basically processes which share memory, and they are scheduled preemptively. I have come to think that this design results in code of lower quality, and which is harder to reason about. Of course, it is still possible to use event loops or programming languages which do their own preemptive scheduling (like Lua)...