Arnt Gulbrandsen
About meAbout this blog

Jelly 2

The Unihertz Jelly was small and fine, and I did like it but I had to give it up. The battery wasn't good enough for my use when travelling, and now that my eyes are fifty years old I admit I found the screen too small.

At the time I wrote that a smartphone should be small and light, have a large screen and battery, be fast enough, and not have too many bugs. Obviously there's a conflict between overall size and screen/­battery size. Now that Unihertz has shipped a slightly larger Jelly 2 I decided to buy one to try (after worrying for a while about whether the screen was a large enough part of the phone's front). I've used it for a while now.

The phone isn't elegant, chic, stylish or pretty. I want it to stay in my pocket, out of sight, so logically speaking I shouldn't mind its looks. I really shouldn't. On the other hand, it's well-built and feels solid. It lies well in the hand.

There's a visible Torx screw (that does nothing?).

The apps I want to run work, even though they clearly are designed for bigger screens. The battery and screen are OK. A very small screen is a very small strain on the battery, but the screen is big enough for my eyes and I can enter text.

Like its predecessor, the Jelly 2 is not fun. That's a good thing in my opinion. This phone can be used to call, it can speak in my ear and tell me to turn right at the next intersection, it can be used for 2FA and my other apps, and it isn't a timewaste magnet. Browsing Instagram, Twitter and so on is possible, but that kind of thing isn't attractive on this phone's display. This is perhaps one reason that I don't worry about the battery. I charge it I notice it's low and don't worry. If I charge it in the morning, I always have >50% battery left in the evening.

It fits in every pocket I have, even in my tightest jeans, it runs the apps I need, and if it makes me spend less time on Twitter, that's fine.

My office suffers from COVID-19

I have a purpose-built office at home. We bought the neighbouring apartment and I cancelled the lease on my former office. So in the morning, after my 60cm morning commute, I sit down to work, and then…

Ten minutes pass, or twenty, I start to focus. One child interrupts. I help with whatever. I try again, half an hour passes. Another interruption — a child perhaps, or my wife wants to discuss food for next week or wonders whether it's time for an espresso, or the DHL chap who knows very well that I'm there and can pass parcels to the neighbours. Hi Arnt he says, I have a parcel for a <name>, can you…? Later the neighbour will ring the doorbell too, but that's usually after the end of my working day. Usually.

After the third interruption it's really difficult to gain focus at all. The corona virus has turned my lovely office into almost a regular one.

Cruise ships in the Venetian lagoon

I go there sometimes, it's a magic place. Even the densest throngs are quiet compared to many city streets elsewhere, and there's always beauty around the corner.

Last summer I biked along the lagoon from Chioggia to Venice and saw this sign. GPL refers to ocean-going passenger ships, grand passenger liner if you will. I quite agree with it. Banish the GPL, build a port for them in the deep water outside the lagoon, let the passengers cross the (1m deep) lagoon in shallow-draft boats and arrive in Venice properly. […More…]

Compatibility break number two (of n?)

A while ago I spent a day and a half fretting over a missing checkcast in a Java/JDK file before I finally solved it. Before I finally mostly solved it.

It didn't take long until checkcast returned to hit me again from another angle.

The Java List<E> includes a method called toArray(), which returns the contents of the list as an array. toArray() is older than Java's generics, so it returns Object[] rather than an E[]. This isn't a problem on its own, because implementations of List<E> are free to return an E[]. […More…]

Merging and deploying the Brexit PR

Ten more months pass, the British still… do. This is awful. (I've moaned about it before, yes.)

Experience, review, discussion and routine should all guard against mistakes, so how can such a large country as Britain carry out something quite so badly? Despite all its newspapers, the BBC, the well-established political parties and NGOs, despite the think tanks and the excellent civil service at Whitehall? I suppose I ought to feel bad for all the expats whose future health insurance status is a bit Schrödingers-cattish, for all the people who work in companies with cross-border supply chains, and so on and so forth, but I actually do feel bad that these are the same techniques we use to ensure quality in software: Experience, review, discussion and routine. And they're not working.

There's a failure here that that warrants study.

Update: On a surface level, the problem is that they're ignoring problems. A time-honoured tradition. A confident assertion that prospective customers will do so-and-so can carry a meeting, right? Even if the actual prospects don't feel obliged to behave as predicted. What worries me is that these assertions are working so well, on so many people, for so long.

I break compatibility

What is java? In a way, my compiler defines java as the language used to write the twenty thousand classes in the JDK library, Jsoup or whatever else gradle fetches to build a test. While I do read the specification, test-driven development is called test-driven for a reason.

A test drove me into a problem yesterday and my head hurts. I've encountered that problem before but escaped for various reasons, this time I have to confront it. The problem involves a one-line function that just accepts an argument, casts it to a subclass and returns it. Javac has compiled that as aload_1; areturn, which means push the first argument onto the stack and then return it. Javac would ordinarily include a checkcast to make sure that that first argument actually has the function's return type, but didn't in this particular case.

Taken together, this tiny function and its callers convert an Object to more-specific class without type checking. The caller gets an arbitrary Object from a call that returns String, and this is legal java. I'll skip the details of why this is legal, they just make me sad and angry. […More…]