How common is my name?
It turns out it’s pretty common, actually. But the interesting part is how I know that.
11/18/2026

Photo by Tim Mossholder on Unsplash
I love it when federal agencies open up their data for public consumption. Last year, for example, IBGE (Brazilian Institute of Geography and Statistics) published a site that compiles the frequency of first and last names based on the latest census, conducted in 2022. That tool (deservedly) got a lot of news attention and made it possible to answer the question that opens this post.
So, well, how common is my name? Luís is the 16th most common name in Brazil, while Fernando is the 38th. My surname, Bittencourt, ranks 516th. However, there’s an interesting fact about Luís and Bittencourt: they’re not the most common spellings. Luiz, with the Z, is the 10th most common name. Bitencourt, without a double T, ranks 444th. That got me thinking: how different would those names rank if we considered all their spellings?
I could answer that question by making a list of all spellings and searching the site one by one, but 1) that’s not how software engineers behave and 2) I happened to have built a tool that does exactly that: String Expansion.
Lexers, parsers and genealogy
Some years ago, I was really into genealogical research. Back then, there was a very useful site that helped me to find vital records such as birth, marriage, and death certificates, which are paramount for genealogy. There was a caveat, though: the site only allowed me to search by exact names, which is not always easy in the context of Brazilian families.
Imagine, for example, a person of German descent named Henrique Schmidt, married to Maria da Silva, who had a baby called João Francisco. To find their vital records, we’d have to search not only the Brazilian versions of their names, but also the German ones: Henrique/Heinrich, João/Johann, Francisco/Franz. We’d also have to consider that particles such as da in da Silva vanish and reappear arbitrarily across generations. Finally, we’d have to think about possible misspellings as well, because names were dictated by common, often illiterate folks, and records were written by hand, making the whole thing very prone to mistakes.
I started by listing every spelling I could imagine and checking them one by one. After a few days, I did what any software engineer would do: automate it. The main idea was to express the name spellings in a regex-like pattern and use that to generate all the possible combinations. If we were searching for João Francisco’s vital records, for example, we could use the following pattern:
(++Jo(ão|hann)|Fran(cisco|z))( (da )?Silva)? Schmi(t|d)(t|z)?That single pattern produces 144 different variations and embodies all the nuances discussed above: Brazilian/German variations, different combinations of first and second name, optional mother’s surname (because, you know, patriarchy), optional particle, and different ways of spelling Schmidt. Combining that with automated API requests worked like a charm and allowed me to find a lot of documents in a fraction of the time it would take to do the same by hand.
In 2024, I decided to extract the language parts into a separate package, and that’s how String Expansion was born. I came up with the grammar and implemented the first version using Chevrotain. Earlier this year, relying on extensive unit tests, I used Claude Code to make it zero-dependency.
So, finally, how common is my name?
After all the history and the nerd stuff, let’s see how we can get all spellings of my first and last names:
import expand from 'string-expansion';
console.log(expand('Lui(s|z)'));
console.log(expand('Bitt?enc(+o|u)rt?'));As you can see, the language was clearly inspired by regular expressions:
(s|z)generatessandz- A question mark
?makes what comes before (char or group) optional - A plus sign
+at the start of a group generates all group alternatives plus all of them concatenated. In the example above,(+o|u)generateso,uandou. We can achieve the same with(o|u|ou)but hey, we’re engineers. Why not get fancy when we have the chance?
And, finally, here are the results:
| Spelling | People | Rank |
|---|---|---|
| Luiz | 1,335,098 | 10th |
| Luis | 838,237 | 16th |
| Combined | 2,173,335 | 6th |
| Spelling | People | Rank |
|---|---|---|
| Fernando | 502,065 | 38th |
| Spelling | People | Rank |
|---|---|---|
| Bitencourt | 49,611 | 444th |
| Bittencourt | 38,067 | 516th |
| Bitencurt | 12,897 | 1,106th |
| Bitencur | 5,455 | 2,115th |
| Bittencurt | 3,814 | 2,811th |
| Bitencort | 2,139 | 4,598th |
| Bitencour | 1,947 | 4,985th |
| Bittencort | 817 | 11,082nd |
| Bittencour | 582 | 14,838th |
| Bittencur | 469 | 18,054th |
| Bitencor | 356 | 22,916th |
| Bittencor | 51 | 103,379th |
| Combined | 116,205 | 253rd |
As you can see, Luís jumps to the 6th position, while Bittencourt goes from 516th to 253rd. In other words, both are more common than one might think by looking at a single spelling. Also, it stands out that even the rarest spellings, such as Bittencor, have records. I probably wouldn’t have thought of them if I hadn’t used a combinatorial tool like String Expansion.
It was bliss to finally find a problem worth creating a language of my own, especially because compilers, to me, were one of those Computer Science topics that didn’t catch my attention at college, only to find myself studying them on my own some years later.
It’s always nice to use coding skills to solve a problem, even if it only matters to me (or isn’t a problem at all).