Idunworks Issue #01
I can has lingo?

When the archive turns sixteen paddlers into thirty-two people

Idunworks
Author

What this is about. I keep a public archive of Greenlandic kayak competition results going back to 1987. Someone who has competed in it for decades, Dubside, asked for three small things after the grunt of the lists were compiled together into a sortable, searchable list, from loose spreadsheets, coffee-stained paper and what not. The third, an alphabetical list of competitors, turned out to be a thread, and pulling it unravelled rather a lot.

Why. Sorting a list of names from A to Z is the cheapest audit of name data you will ever run. Mine found duplicate people, a rename bug and years of wrong leaderboard totals in an afternoon. Not to mention the O'Briens spelled with a backtick. Another day at the office...

The email

Three requests. More headshots, attached. A name spelled correctly, because I had it wrong. And this:

"Another thing that would be nice is a way to have the name's come up alphabetically and scroll continuously to the end. That way you can get to a name without trying to type it into the 'Athlete' box, especially if you weren't sure of the spelling."

Read that last clause again, because it is the entire engineering brief: especially if you weren't sure of the spelling. The person asking knows what is hard about this archive. I did not, yet.

The alphabet has more than twenty-six letters

Sort names as raw text and Ø lands after Z, because its code point is bigger. So does Æ. So does Å.

We counted. Forty-eight of five hundred and sixty-six names. Close to a tenth of the archive, and precisely the tenth a non-Scandinavian reader is least able to spell. The feature was requested because you cannot spell these names, and the naive version would have parked exactly those names in a clump past Z.

So names get folded to their base letter before sorting, and Søren files between Sor and Sot, where somebody hunting for it will actually look. That is wrong by Danish collation, where Æ Ø Å are their own letters at the end of the alphabet. I chose wrong-but-findable over right-but-unfindable. If this were a Danish phone book I would owe you the other answer.

One paddler, two people

With the names folded, near-identical spellings became neighbours. Three pairs turned up straight away, differing by a letter that needs a Danish keyboard, or by a stray double space.

Typos, I assumed. I asked for the age categories to be checked first, to be sure each pair was one person and not a father and son.

They were one person. And the check found something better.

In every pair, one record held all of that person's results from one discipline and the other held all their results from the other, with no overlap at all. The archive covers two sports, rolling and the rope gymnastics event, and they were reconstructed from separate stacks of paper. So anyone whose name was typed slightly differently on the two stacks became two people in my database.

One of them had nine results on one record and seventeen on the other. Which means their career page showed less than half their record, they appeared twice in the brand new alphabetical list, and their lifetime points, the thing the leaderboard actually ranks on, were split across two rows so that both numbers were wrong.

That is the one that bothers me. Not a cosmetic duplicate. A leaderboard quietly ranking people below where they belonged, for years, in a sport where the archive is the record.

So, how many more? Here is the part I would not have got to on my own...in, like a decade. Searching for similar names finds more duplicates, but it misses the ones that matter. One pair was recorded with initials on one sheet and the full name plus a married name on the other. No string-similarity measure calls those similar, because they are not. They are an abbreviation and an expansion. You search once, the name does not appear and you think "shit list" and move on to Pornhub, Onlyfans or wherever you hang out. I know, I checked your browser history :)

So we stopped matching on spelling and matched on identity: same birth year, same gender, same country, each record exclusive to one discipline, at least one shared name part. Not a clever algo as you would brag about these days. Just the right question.

Seventeen candidates. Thirteen obvious on sight, four coincidences where two genuinely different people shared a first name or a surname. My answer:

"To 99,9% certainty you should merge them."

Five hundred and sixty-seven people became five hundred and fifty, with every result still attached to somebody.

Renaming somebody creates somebody else

Request number two, the misspelled name, I had already fixed in the admin before any of this started. Or I thought I had. What I actually had was two records: the misspelling with no results, and the correct spelling with the single result. Fixing a name had created a new person.

The cause is almost reasonable. The only name field in the admin sits on a result, and it means "whose result is this". The help text says so, honestly: matches an existing athlete by exact name, or creates a new one. Which is right for adding a result, and quietly wrong for editing one. A corrected spelling matches nobody, so it creates somebody.

My reaction at the time:

"oopps. I fixed her name. This is a serious bug."

Especially annoying in an archive whose entire purpose is correcting names transcribed from paper. The main maintenance path was the broken one.

The fix is a separate way to correct a person, not a cleverer result form, and I want to be clear why, because "just make the field do the right thing" is the tempting answer. That field cannot tell "this name is misspelled" from "this result belongs to someone else". They are identical as input. That ambiguity is the bug, and you do not fix an ambiguity with better guessing inside it.

Two more loose threads

While I was in there I finally read my own URLs. A competitor's page lived at a slug built from their name, with everything outside a-z0-9 replaced by a hyphen, so a name containing ø produced something like s-ren-dahl. My own assessment:

"The no-letter one's are just misleading and impossible to remember or guess"

Forty-six of them, now fixed, old URLs allowed to break. Nothing sensible links to a URL nobody can read.

And the headshots. Nineteen more arrived, and two carried the GPS coordinates of where they were taken, because phones do that by default and nobody in the chain had thought about it, me included. And I am supposed to make truly private web platforms... Stripped before upload, then re-downloaded from the live site to check the coordinates were actually gone. The useful part was not the stripping, it was deciding it belongs in the upload step rather than in my good intentions.

What happened, and what else I could have done

What was wrong

The fix

Sorting put 48 of 566 names after Z

Fold accents to the base letter before sorting

16 people existed as 32 records, halving their lifetime totals

Match on identity rather than spelling, confirm by hand, then merge

Correcting a name created a new person

A separate way to correct a person, instead of overloading the field that assigns a result

46 URLs were unreadable and untypeable

Fold in the slug generator too

Two headshots carried GPS from the phones that took them

Strip metadata in the upload step, then verify what the site actually serves

None of these is the only answer.

Instead of

You would gain

It would cost

Folding accents to sort

Proper locale collation, which is genuinely correct for Danish and Greenlandic

Æ Ø Å sort at the end, which is where a reader who cannot spell the name will not look. Correct and unhelpful

A registry keyed on names

Stable identity keys, so spelling can never fork a person

My source material is paper results sheets with no identifiers. Somebody still has to decide two sheets describe one person. Keys move that decision earlier, they do not remove it

Letting the old URLs break

Redirects from old slug to new

A redirect table maintained forever, for URLs that were unreadable anyway. Worth it if they were ever shared; mine were not

Two separate operations

One clever field that infers which you meant

It cannot infer it. Guessing is how I got a duplicate person in the first place

Three things for anyone keeping a list of human beings

  1. Build the alphabetical list early, even if nobody asks. It is the cheapest audit of name data there is.

  2. Never let "rename" and "reassign" share an input. If your edit form can create a new person, it will.

  3. Fold, do not delete. Every problem in this post came from code throwing away a character it did not recognise.

The archive is at Rebel Kayaks, and it now has a list of everyone in it that you can scroll to the end of. If you find a name spelled wrong, I would like to know. That is apparently how this one started.

Log in to like this article, or create an account .
0 reads

Comments

Log in to post comments. Log in
No comments yet. Be the first to comment.