getifaddrs returns truncated sockaddr_in’s for AF_INET ifa_netmasks

Apple “Feedback” #12149675. Some netmasks returned by getifaddrs have family of AF_INET yet a length less than sizeof(sockaddr_in), e.g. 5, 6, 7, or 8. On macOS Ventura 13.3.1, at least. It looks like it’s actually allocating only eight bytes for the ifa_netmask (not the 16 that is the size of sockaddr_in per MacOSX13.3.sdk/usr/include/netinet/in.h), as it… Read more

Performing a delayed and/or repeating operation in a Swift Actor

Say you want to perform some operation after a delay, and/or at regular intervals, inside a Swift actor – maybe your actor represents a weather station and you want to periodically fetch the latest weather information, automatically. How do you do that? You could punt the problem to some other code, outside the actor –… Read more

Evil Pacman

Pie chart showing a black pie with a 20% wedge carved out in green on the right-hand side, overall resembling a colour-inverted Pacman

Google had (has?) a tongue-in-cheek achievement system built into the employee directory. Anyone can define a new achievement and award it to whomever, provided they can create (or pirate) a neat little icon for it. Lots of people have over the years – there must be thousands of distinct achievements possible, at this point. It’s… Read more

Attention trumps experience

It’s always bemused me that I did better in electronic engineering than computer science. I studied them simultaneously, receiving degrees in both after five years (some classes counted towards both, thus why it wasn’t seven or eight years). I grew up playing on, dabbling with, and programming computers. From BASIC II to Hypercard to RealBasic… Read more

People vs Products

I’ve experienced an interesting arc over my twenty or so years (thus far) of software development. I started out as a one-person shop, doing my own things, selling shareware. I had no manager nor technical lead. I had to make all my own decisions, in all aspects, without guidance or assistance. Subsequently, during my four… Read more

Better is the enemy of best

A vintage Mechanical Horse Patent Drawing From 1893 on Dark grunge background.

You might have heard the aphorism “Perfect is the enemy of good“.  If you’re in a technical field, you’ve probably used it, or had it used against you, to shut down a conversation.  It’s an effective way to do so because it insinuates that the target is thinking impractically, not focused on the problem at… Read more