Arnt Gulbrandsen
About me • About this blog

I write a few paragraphs

If you want to know that code works usefully, write about it and edit it until you have an explanation that reads well and matches the implementation. The it you have to edit is usually both the code and the text.

I do that.

People's reactions to my hard work in 1996: Wow, this is documented well!

People's reactions to my hard work in 2006: Wow, this is documented well!

People's reactions to my hard work in 2016: Wow, this is documented well!

People's reactions to my hard work in 2026: Was this written by AI?

NATO writing

Sometimes a rule liberates itself from its original motivation. Expand all acronyms is one of those, and it gets on my nerves. Here's one example among many: eBPF (extended Berkeley Packet Filter) is a powerful in-kernel virtual machine technology…

There are two kinds of readers. Those who know that eBPF is a kind of virtual machine aren't helped by that parenthesis. Those who don't know yet are misled.

The original intention behind the rule may be that readers should understand the acronym better. A laudable goal. However, the jump from that goal to expand all acronyms is a long one. The rule posits that few readers know what NATO is if they see that abbreviation, but it if they see its expansion, North Atlantic Treaty Organisation, they immediately understand.

I'm sure there are acronyms that can be well explained using their expansion. They seem to be a minority, though, and particularly if the expansion includes words like Extensible, Open, Service, Simple or Universal. Abbreviations that were negotiated can be anodyne too, as NATO is.

This not a good rule.

(Sorry for ranting. Had to get that out of the system. I like the treaty, BTW. Not even 30 sentences long and quite readable.)

A small update to vrfy

vrfy, for those few who don't remember nineties email debugging tools, reports on an email address. I run it occasionally and made a git repo ten years ago, github:arnt/vrfy.

Today I converted the code from K&R C and updated the code with support for the most important new RFCs (5321, 6531, 7505, 8200).

Network problem analysis for Android apps

Most apps tell the user to check this and that when there's a network problem, any network problem. The web browsers I've seen offer the same evasive blah-blah for any problem except a failing TLS certificate.

I have an app that's mine alone, though. It shares my values and its behaviour is guided by my pet peeves, including being annoyed by messages that just say can't reach server. So for it I wrote a class to analyse a network problem and offer a less generic message.

My analysis is quick and will offer a diagnosis after at most 2.5 seconds. My reasoning here is that when something takes a little longer than usually, there may or may not be a problem, and it's reasonable to start analysis while continuing to try. After a couple of seconds more, there very likely is a real problem, and the app should offer the user a decent explanation. That gives a couple of seconds from when a problem appears likely until the explanation must be ready.

It's cheap, in particular it doesn't cause a lot of network traffic. It sends and receives packets, but not so many as to slow down existing up/downloads. This is because I want to start the analysis before I'm certain that there is a problem. […More…]

dtrump@tpalace.com

I was searching for something else when a really old mail message caught my eye.

It was a message from dtrump@tpalace.com, with whom I was not previously familiar. That dtrump address sent me two messages in July and August 1997, both about an income opportunity with which I could get rich.

I'm not sure the messages are genuine. They're unsigned, of course, and the chain of Received fields is difficult to analyse reliably at this point. I also don't know to whom tpalace.com belonged at the time (the oldest information I could find is from 2008).

If there existed a host named tpa-us14d4.tpalace.com with IP address 111.243.5.2 in 1997, I would guess that the spam really came from, uh, tpalace, whatever tpalace was.

See.sense Icon3

I buy less and less hardware as time passes. But I couldn't resist the See.sense Icon3 bike rear light. It's really, really bright and has fancy features: It should be able to brighten when a car approaches from behind, answering the car's headlights as it were, without wearing out its battery.

The light charges via USB C, badly. None of my cables can charge it from a USB C port, it only charges from USB A ports using A-C cables. This may be due to faulty use of the CC1 and CC2 lines in the Icon3. My Anker 737 says it charges at 1.1W from USB A.

It shone very nicely when I used it on a transalpine bike trip this summer, and wasn't at all bothered by rain. The car drivers behaved as if they could see me well.

Update: The charging problem is clearly due to a hardware error in in the Icon3. I bought a USB-Chyna adapter and when I use that, the Icon3 charges correctly from all of the USB C chargers I've tested.

UIDONLY implementation notes

I implemented the IMAP UIDONLY extension in Archiveopteryx a while ago. A couple of notes:

It was really simple; two lines of code changed to six lines starting at line 1154, plus a few lines to announce the extension etc.

It didn't bring any any performance improvement, because generating the EXISTS response is mandatory. With UIDONLY Archiveopteryx counts messages in order to report how many there are in an EXISTS response. Without it, Archiveopteryx makes a list of messages. The loop is the same.

It ought to improve performance for the case where a connection opens a large mailbox and another connection already has opened that. This seems rare with Archiveopteryx. It's more important than it seems though: Opening really large mailboxes can take many seconds. I decided to leave the code in.