Software Engineering the Geopolitical Landscape

Every so often, there’s a dust-up in the news about how a location is presented in a dropdown list or map user interface on the web. Today’s website under the microscope belongs to the Japanese National Diet Library, with a “Country of Residence” dropdown list where Taiwan is referred to as “Taiwan, Province of China”.

A lot of the reporting around this that I see here in Taiwan makes it out like somebody in the Diet or the Library is in the tank for the CCP when in reality the considerably more likely explanation is that this question never occurred to anybody in the loop on the website development. More on that in a minute.

But needless to say, there are a lot of opinions in this domain, but I’m going to try and stick to facts and dispassionately treat it as an engineering problem. So let’s do a possible root cause on this sucker and see how “Taiwan, Province of China” might end up on a library website in Japan.

Let’s start with how people build websites in the year 2024. Someone unfamiliar with tech might picture a junior engineer dutifully typing the names of 248 countries and territories into SELECT tag OPTIONs in an .html file using a text editor (most likely vi). If you are the typical reader of my blog posts, you probably know that in reality nobody has built a country dropdown list like that in about 20 years, and what frontend engineers do instead is load a list of country/territory names and display it.

I haven’t done one myself in a long time, and when I thought about it, it occurred to me that I didn’t know where, exactly, I’d get a list like this right now and how I’d hook it up, using, say, React. So I went looking for examples. The first React country dropdown example I found pulled in this npm package “i18n-iso-countries” as a dependency. From there, I hopped over to the source code to have a look, and I found:

“Taiwan, Province of China”

In the parlance of this library, the “official” name for Taiwan is “Taiwan, Province of China”. For the uninitiated, what this means is that any website developer that pulls in this npm library — directly or indirectly — has a high likelihood of surfacing this in their user interface. That’s probably what happened to our library website developer in Japan: They were just trying to get the “Make the country of residence a dropdown list” task off the Jira board as easily as possible.

Well crap, that was almost too easy. But like any good root cause investigation, I didn’t stop here. As you should do any time you see a line of code that raises your eyebrow, I git-blamed it. The most recent change is in this commit, which added “Taiwan” as an “alternative” name, which actually sounds like a step forward.

Let’s go back another commit. This one has the commit message, “Fixed names not in conformity with ISO 3166-1”. Ok, now I feel like we’re getting to the bottom of the design decisions that lead to the “Province of China” terminology. Upon further review, “ISO” is in the name of the library, after all.

What’s the deal with ISO 3166-1, anyway? You can browse the “official” ISO 3166-1 codes here and search for “Taiwan”. But I did that so you don’t have to:

ISO 3661-1 FTW

There you have it: As an engineer, I’d take this to mean that any user interface or library that works with country names in compliance with the ISO standard will use “Taiwan, Province of China”. Don’t blame the hapless engineer in the Japanese National Diet Library IT department. Blame a standards committee.

That said, as an engineering or product leader, you do need to be aware of geopolitical issues and make a mindful decision with the business about how you want to handle them. As far back as I can remember, requirements and design spec templates I’ve worked with have included a section for “Internationalization / Localization Issues”. It’s left blank far too often. I implore you to fill it out, lest your web application ends up being the star of the geopolitical Internet for a day.

I will end by noting that since I’ve lived in Taiwan, I’ve seen some websites use “Taiwan” and some use “Taiwan, Province of China”. But I’ve also seen websites that “solve” this problem by…omitting Taiwan from their lists altogether, to the point that nobody with a Taiwanese address or phone number can do business with them. What’s going through the product manager’s mind when they arrive at that decision?

Previous
Previous

Agile vs. Developer Productivity

Next
Next

Tech Interviews Aren’t “Broken” Per Se