Just as the blog suggests possible posts with similar slugs on the 404 page, I’d find it useful if Beeminder itself did that on the 404 page for (one’s own, at least) goals. e.g. /myusername/goal-sulg would have a link to /myusername/goal-slug, based on some sort of similarity, such as levinstein distance.
This seems not too difficult to implement, and I’d personally find it quite useful. I’d offer to make a PR for it, if there’s room for me in the Beeminder repo, even temporarily.
(I have a firefox bookmark of the form https://www.beeminder.com/username/%s, with the keyword b associated with it. This means that I can navigate to any of my goals by slug via typing b goal-slug into the firefox url bar, using firefox’s bookmark templating feature. This is really convenient. But sometimes, if rarely, I have a typo in the slug I’m typing.)
I’ve kind of nerd-sniped myself here as soon as I started thinking what the best possible version of something like this might be.
I asked Claude to write me a simple website that uses the Beeminder API to redirect you to your goal with the closest matching slug.
It’s available at https://gobee.aeonc.com. Once you log in to connect it to your Beeminder account, it will redirect e.g. https://gobee.aeonc.com/goal-sulg → https://www.beeminder.com/your-usename/goal-slug. You can thus add a bookmark to firefox for https://gobee.aeonc.com/%s and it will automatically correct typos and the like. It’s really flexible. You can also visit https://gobee.aeonc.com directly which lists your most recent redirects, and has a search box in which you can search with this same logic.
Every single line of code for implementing this was written by Claude, with my guidance. (And then I had ChatGPT o1 write a test suite for it.)
Dang, that is nice. But I think it should work more like this:
Namely, it should obey the Anti-Magic and Anti-Robustness Principles and always 404 if you don’t give it an existing goalname. Then all the cleverness can be in producing the Did You Mean list.
Or you could do what the Beeminder SMS bot does and allow anything that’s a unique prefix.
Yeah, I agree that for the actual Beeminder 404 page it shouldn’t try to guess like this or anything, just do some cleverness to come up with a short list of possible slugs to link you to. This was more of an experiment in seeing how far I—or rather Claude—could take it.