Arnt Gulbrandsen
About meAbout this blog

On being right

My favourite Stack Overflow answer is for a deleted question. The question was off-topic by the site's rules, which steer away from opinions and possible controversy and towards the purely factual, so deleting it was right. But.

The question (this one, visible only if you have ten thousand internet points) was what real life good habits has programming given you? and the answer I so appreciate was by Robert Rossney, who wrote:

I no longer equate thinking I'm right about something with actually being right about it.

It's now very easy for me to entertain the thought that I may be wrong even when I feel pretty strongly that I'm right. Even if I've been quite forceful about something I believe, I'm able to back down very quickly in the face of contradicting evidence. I have no embarrassment about admitting that I was wrong about something.

That all came from decades of working in a discipline that mercilessly proves you to be mistaken a dozen times a day, but that also requires you to believe you're right if you're going to make any progress at all.

How to use Plusxome

Plusxome is a rewrite of loathxsome, which in turn is a rewrite of blosxom, which also spawned other rewrites, of which pybloxsom is/was the best known. The original purpose of my rewrite was to play around with C++11. I appear to have been running it in production for many years now, which implies that it's solid enough to warrant a user guide. The number of likely users suggests that a very short one is sufficient. But one should exist, because I do not approve of undocumented software.

Plusxome is the kind of program that's user-friendly and choosy about who its users are. This program is only for people who host their own blogs on linux, are happy compiling C++ and can write HTML.

First, git clone the source and build it. Second, write a template, or several. One of my templates is quoted below. Third, write some HTML that'll turn into a blog posting. Again, an example is below. […More…]

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…]