Evolving Software and Breaking Things

In Lagrange v1.1 and v1.1.1 there are a couple of bug fixes that may cause adverse side effects when upgrading. Nothing too serious, but this gives me a feeling of unease regardless.

Generally speaking, software is a living thing in that if it doesn't evolve and change, it is dead β€” unless you're running a frozen ecosystem on a locked-down device. Evolving software will eventually have to break backwards compatibility or risk being hindered by the ever-growing burden of bringing all your unwise, misinformed, or outdated choices with you.

When it comes to upgrading, it is usually possible to mitigate issues by migrating user data from the old version to the new one. Unless of course, the old data is partially invalid like the case was with the history in v1.1. Then one needs to consider if it's better to forget the data or migrate only the valid parts. For the history I chose the former option because it isn't critical information.

Setting up migrations takes time, and they introduce new failure points in the system. One must weigh if the added complexity and development time is worth it. How many people would benefit from the migration? Would some people be negatively affected? How long should the migration be kept around before it is entirely obsolete? Is there something else I could work on that would benefit more users? Without actual usage metrics these decisions have no solid foundation and must be done based on intuition. (Lagrange does not record any information about the user.)

In version 1.1.1 there is perhaps a more dangerous situation because the location of the user's files may change on Linux/BSD/*nix systems.

It is certainly a negative experience if you launch the app and all your data β€” bookmarks, feeds, identities β€” appears to be gone. I'm currently applying no migrations here, although it would likely be safe to copy over the contents of "~/.config" to the configured XDG_CONFIG_HOME if it doesn't already exist. The risk is that if there is a bug in some part of this, the user's latest data may get overwritten.

Leaving migrations to the user does carry its own risks. Communicating the need for migration is the first hurdle. Also, if you leave Lagrange running, move the data over, and then quit Lagrange, the data will get overwritten as the app rewrites its files at shutdown.

All things considered, it is best to keep things as simple as possible to avoid having to deal with this kind of things. Bugs happen, though, and it is a very unfortunate situation if there is inertia against fixing them due to breaking changes.

Such is the life of a software developer!

I will attempt to refrain from introducing breaking changes too often in the future.

πŸ“… 2021-02-04

🏷 Lagrange, Programming

CC-BY-SA 4.0

The original Gemtext version of this page can be accessed with a Gemini client: gemini://skyjake.fi/gemlog/2021-02_evolving-software-and-breaking-things.gmi