As you might guess from the scores I mentioned when I described the conbadge drinking game, I’ve scored all of the badge names I’ve handled over the years.
I wasn’t about to review all 6500+ names by hand. I programmed something to score things. After all, I had time to kill as the badges printed.
The pattern matching got interesting. I need to check for any spelling variations people might use. Think for a moment on how many ways someone might spell “wolf” on a badge.
In a lot of programming languages, you use a pattern matching shorthand called a “regular expression” to describe the text you are looking for. This is the regular expression my scoring program uses for “wolf”:
/wh?[ouy]+(l?f|lv|l?ph)+(i?e)?([ei]n)?(e?y)?/i
It was quick and dirty code, so it looks a bit unreadable. However, in my badge name list, it matches all of the following spellings:
wholf
whuff
wofie
wolf
wolfe
wolff
wolffe
wolffin
wolfie
wolfy
wolph
wolphy
wolve
woof
woofe
woofie
woulf
wuff
wuffie
wuffy
wulf
wulfe
wulff
wulfy
wulve
wylfin
I need to go back and make sure this code has good coverage. Maybe I should put up a web page where you can score your badge name.
[ Published from
Notes and accidentals. You can comment here or
there. ]