Weekly Padgett

No. 0553 min read

whom. Who do I ask about this file, and are they awake?

A file you did not write, a person you need to find. whom ranks contributors from git history and guesses their local time. The guessing is the creepy part, and it says so.

A corkboard covered with pinned index cards and red string, a desk phone below, an empty chair pushed back.
File photoDramatization. No unix was harmed.

There is a file in the repo you did not write, and it is wrong, and you need the person who knows why. git blame[1]Ref. 1git blame git-scm.com gives you a name and an email from three years ago. It does not tell you whether that person still works here, whether they were the one who actually understood it, or whether it is three in the morning where they are.

So I wrote whom[2]Ref. 2whom github.com. Point it at a file or a directory and it ranks the contributors from git history, shows each one's inferred current local time, and cautiously guesses whether they are probably awake.

$ whom src/billing.py
1. alice@corp.com     41%   18 commits   local 14:32  probably awake
2. bob@corp.com       27%   11 commits   local 23:05  probably asleep
3. carol@corp.com     16%    7 commits   local 09:14  probably awake
   Ask alice

Python 3.9+ and git. Standard library only. It runs locally, reads history, changes nothing, sends nothing anywhere.

The ranking

For each commit the score decays with age — 0.5 ** (age_days / 180), so something from six months ago counts half as much as something from today — and grows with the size of the change. Recent, substantial work ranks higher. But the README is blunt about it: lines changed are not expertise. A one-line fix to the heart of the parser outranks a thousand-line reformat, and that is correct, because the reformat told you nothing.

Co-authors[3]Ref. 3Co-authored-by docs.github.com get half credit. Bots are ignored. Identity is grouped by email after mailmap[4]Ref. 4git mailmap git-scm.com normalization, because the same human commits as Alice, alice, and A. Smith and you want them to be one person.

The creepy part, stated plainly

The sleep guess is the feature people will misuse, so the tool argues with itself about it in its own README[5]Ref. 5whom README github.com. It infers sleep from commit timestamps. That is a little creepy. It is an uncertain convenience, not presence detection, and it tells you: do not use this to monitor staff, assess productivity, or decide someone owes you a reply.

Here is how shaky the inference is, honestly. It takes the most common UTC offset[6]Ref. 6UTC offset en.wikipedia.org in someone's twenty newest commits as their current zone — never mapped to a real IANA zone, never predicting daylight saving. It buckets their commit hours and finds the longest run of at least four hours with no commits, and calls that the guessed sleep window. That is it. No gap means it prints commits at all hours, which means no long quiet stretch, not literal round-the-clock activity.

Someone who moved time zones, traveled, shares an account, or commits from a train undermines all of it. A timestamp is not a presence signal. There is a --no-sleep flag that turns the whole inference off and still shows local time, and I would not blame you for leaving it off.

The one detail I like

If the top-ranked person is probably asleep and someone else in the top three is probably awake, it prints an Ask ... line pointing at the awake one. Not because the second person knows more — because the first person is asleep, and the bug is not going to sleep until morning. It is a small thing. It is the reason I built the whole tool.

The README lists the failure modes at length, on purpose. CI bots slip through. Squash merges[7]Ref. 7Squash merge docs.github.com concentrate all the credit and all the timing on whoever hit the button. Copied code and vendored files skew the ranking. Sparse repos offer no useful second person. I would rather the tool tell you where it is wrong than pretend the ranking is a fact.

It is on GitHub[8]Ref. 8whom on GitHub github.com, installable as whom-cli on PyPI (the name whom was taken).

References

  1. git blame git-scm.com ↩
  2. whom github.com ↩
  3. Co-authored-by docs.github.com ↩
  4. git mailmap git-scm.com ↩
  5. whom README github.com ↩
  6. UTC offset en.wikipedia.org ↩
  7. Squash merge docs.github.com ↩
  8. whom on GitHub github.com ↩

More on this beat