Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
<input type=“country” /> (shkspr.mobi)
56 points by jacobr on Nov 7, 2017 | hide | past | favorite | 70 comments


I have my doubts as to whether a generic solution solves this.

The author notes some issues, like using it for place of birth. Now you need a temporal list for "countries that existed in year XYZ".

There are similar issues for shipping. Not everyone ships everywhere. If the list is abstract and unknown to me, how do I whitelist/blacklist? Am I supposed to know that Scotland exists in the list or not? What if it's for a passport input? Does Scotland have it's own passport? How do I deal with Taiwan without pissing off Chinese web site visitors?

Tldr: The list depends on context. I'm skeptical that a centralized list could deal with commonly used contexts.


For shipping too, not just that every shipper ships to every country, but that shippers ship to different countries unequally: costs associated change or they only ship below certain weights or they require three dozen more customs forms to be signed (each in triplicate). Many of the shippers have rather complex APIs for that (give me the country list and shipping cost for this assumed package weight range), how would you try to replicate that in the browser?


Someone on twitter suggested using the OS' own list of countries, working around the problem of the standard having to define what is/isn't a country. I think that's a reasonable solution.


Windows dropped having a list of countries in the 9x era because there were too many international issues and disputes. It's also why they dropped even trying to draw the shapes of time zones because that too was causing international border complaints.


An input list of all current passport issuing countries would be useful. The Scotland problem doesn't arise as they don't issue passports (the UK does).


Sealand issues passports, but they are not recognized by any other country.


Israel issues passports, but people holding an Israeli passport also hold some other country's passport if they want to travel to any other country in the MENA region. Also, recognizing Israel as a country will lead to the most interesting discussions in your software's support fora.


what about taiwan? what about taiwan if you're in china...?


I believe Palestine has a similar issue. They have passports, but few countries recognize them.


According to https://en.wikipedia.org/wiki/Taiwan_passport , the issuing country code is:

TWN, the ISO country code for Republic of China, listed as "Taiwan, Province of China" in ISO 3166-1


My thoughts exactly.

This means Google would be determining whether Taiwan is an independent country or not, making either China, or more probably Taiwan unhappy. Something besides the browser would need to determine what your list of countries is, like the site itself... but a solution like that is much less elegant. Chrome having regional behavior also just sounds like more mess for devs. Some sites will deliberately want to pick sides, and should be able to.

Geographic data will have to come from somewhere, to add countries to this list that "don't exist" in whatever the built-in list of country options is.


And then someone tries to use it for an app where you have to select which national football you play for.


Or anything involving legal system/jurisdiction or company registration (both of which are differ between countries within the UK).

The UK and the Netherlands are both (according to ISO 3166-2 [0]) countries which contain other countries.

[0] https://en.wikipedia.org/wiki/ISO_3166-2


In the case of The Netherlands, this is plain wrong.

The Kingdom of the Netherlands contains four countries, being The Netherlands, Aruba, Curaçao, and Sint Maarten. According to ISO 3166-2, there exists a country "The Netherlands" which contains the other three. Close, but not correct.


Behind every standards dispute is a solution that is simple, elegant and wrong.


There was an excellent article[0] in Smashing Magazine several years ago that dealt with some of the complexities of country selectors.

For someone who lives in the UK, you never know whether a list will have United Kingdom, Great Britain or England in it (I've come across all three), and similar problems exist for countries that are known by more than one name (eg Netherlands vs Holland).

And some sites break sorting by pushing certain countries to the top of the list and breaking sorting completely.

There isn't a completely right answer, a standardised country selector might work in some (most) circumstances for most people, but what if my list needs Czechoslovakia or Zaïre? Then, a "simple" problem becomes much, much, much more complex.

[0] https://www.smashingmagazine.com/2011/11/redesigning-the-cou...


Classic simple problem that's impossible to solve.

The thought that web browsers support could solve this problem speaks volumes about the kind of rate people _think_ software gets updated. You could never trust input=country to be supported much less up to date thus it will always be poly filled by some library. So why the false hope?


this would have to be supported on the network level, something like DNS with temporal querying for 'i was born in yugoslavia' type of forms.


But by the time this happens - there's a huge probability our browsers will no longer be rendering any HTML.


Stopped reading at "mansplainers".


That comment came about because the originator of the idea tweeted the following when alternative suggestions were raised:

> maybe I’m just fed up with dudes explaining basic shit to me every time I tweet.

Frankly I think she was in the wrong in this occasion. She offered an idea which has a number of obvious flaws then gets confrontational when people offer counterarguments (ok the terseness tweets don't help but that's a platform problem due to its limited character count).

However I say the above without knowing any past history of abuse she might have had on Twitter.


Yeah, I even read the Twitter thread looking for it.

Sorry to say, but everyone on the internet loves correcting each other and taking the most uncharitable interpretation of each other's posts.

Look no further than HN.

That they use "she" instead of "he" is actually a credit to the replying users insofar that they actually tried to get the gender correct before they launched into the usual assumption that everyone else on the internet is an idiot.


i didn't but now that you've pointed it out i'm annoyed.


How does this contribute to the discussion?


It was said in the original article, so I'd ask how that quip contributes to their own point beyond inviting this exact conversation. It's a very socially charged statement.

Do you also expect people to overlook a quip about gun control laws while explaining how monads work in Haskell, or is that conversation off the table because you embedded it inside another topic?


I honestly don’t think the writer was trying to ‘invite this discussion’, she made an offhand comment about her experience. I think people are seizing this as an opportunity to talk about their pet peeve.

The comment doesn’t add to the discussion about whether a country field would be useful or how it could be implemented at all.

But anyway did you read the twitter thread? The writer proposed standardizing a common function so everyone wouldn’t have to roll their own.

A number of guys responded with ‘here’s how to roll your own’ as if she wasn’t intelligent enough to do that herself (and completely missing the point of the tweet).

Do you have a better word for that behavior?

It wasn’t an offhand quip like your gun control example, it directly related to the tweet she was talking about.

And yes, I would think most people could read an article without freaking out that the two words ‘gun control’ were in there if they were off topic.

It seems sad to me that seeing one word in an article is enough to derail the entire conversation because some people don’t like it. It’s not like it was a call to violence or something like that.


The better word is "asshole". I've had similar condescending conversations from women when I was at the laundromat because I guess they assumed a guy would only be doing laundry in a direction circumstance. I didn't need to come up with a gender specific word for behavior that any random human is likely to exhibit.

As for this specifically, I doubt they corrected her because she was a woman. Ask any question on stack overflow about a specific edge case and you'll get a few people answering immediately about the general case and not your specific problem.


>Do you have a better word for that behavior?

That's just people on the internet, my friend.

Is it mansplaining when men do it to each other or is it only if it happens to be a receiving woman? And do we call it womansplaining in the reverse direction? Do we pause the discussion until we know the genders involved so that we can use the correct word? Is it always about gender if someone responds to us in a less charitable way on the internet?

Or should everyone just make more charitable interpretations of each other's posts online?

Also, if socially charged topics are supposed to be ignored when embedded in another topic, what other topics are off the table? Can you say anything you want as long as it's tucked away in a small enough footnote? Or do we only walk on egg shells around topics regarding women? Is that the path towards equality in tech -- to only address topics that concern men?

If we have a responsibility to stand up when women are being attacked, then I think we have a responsibility to stand up when people dilute the issues that women face, like pulling the gender card when it happens to be a woman that receives the same sort of banter that we all have to deal with and ignore on the internet.

>It wasn’t an offhand quip like your gun control example, it directly related to the tweet she was talking about.

BTW the author is, as far as I can tell, a man: https://shkspr.mobi/blog/about/. He linked to the tweet and annotated it with the word that ignited this comment thread. The contention here is that many of us disagree.


> Do you have a better word for that behavior?

How about, "internet discussions". It happens to all of us. Male and female. I've also had women "mansplain" things to me whilst completely missing the point I was raising. It's not always done in malice or for egotistical reasons; sometimes people misread comments due to distractions (riding the train, working while tweeting, etc) and sometimes people just have to work a little harder with comprehension (like I do due to dyslexia).

> It seems sad to me that seeing one word in an article is enough to derail the entire conversation because some people don’t like it. It’s not like it was a call to violence or something like that.

Conversations are organic and rarely follow preferred paths. I've seen discussions on HN about typefaces or colour schemes on articles that couldn't be further removed from design. It sometimes sucks to see an interesting topic digress into something so seemingly relevant but the irony is by commenting about how disappointed you are about the tangent you are further contributing to the digression from topic.


The word is sexist. Would you give a technical article any time that started by the male author clearly indicating that they dismiss women's speech based on their gender?


Nice idea, but she outlined more than enough reasons not to do it. Political (Israel-Palestine, China-Taiwan, Ukraine, etc).

In my limited experience with automating international shipping I seem to recall UPS treats Guam, Puerto Rico, and US Virgin islands as countries (and our local CRM treated them as states).

There are so many controls that HTML is missing - date pickers, menus, menu flyouts etc.


Just do longitude and latitude. Show a map of the earth and let them drop a pin.

There is no reasonable way to get the world to agree on a single list. I doubt you could get browser developers to agree on a single list. For example Apple listing Taiwan in Safari could get Apple kicked out of mainland China. There is simply too much politics here to be tenable.


I know what we should do! A dropdown with every possible latitude and longitude combination.


What sort of precision are we talking about, here? If an input is interested in my place of birth, a precision of a square kilometer is typically sufficient. But if someone's asking me where I would like my stuff shipped, I would require a minimum of a square meter.


> But if someone's asking me where I would like my stuff shipped, I would require a minimum of a square meter.

Well, don't forget an altitude combo, since apartments exist :)


I think we can do better. You know those comically bad volume sliders that were all the rage on reddit earlier this year? Let's apply that to entire list of long/lats!


It's an interesting idea - but what about people who live close to a border? You have to zoom in quite far in to adequately find, say, Monaco.


This would be great. For the political reason you've mentionned but also because for some countries there is no real conventions : you have to scan the whole list to select your country : I don't know how many hours of my life I've wasted looking for the various possibilities to name where I live " reunion / reunion island / la reunion / ile de la reunion / france la reunion / dom-tom reunion / french oversea territory reunion" Of course it's a edge case but your solution would be welcomed here.

This is a great idea


You're overestimating the education levels of more people than you realize.


I wonder how many people could find a country on a world map and drop a pin. I bet it's not too many.


It would be much higher given it's their own country.


You might be horrifically surprised.


Depends on the country they are from.

In the EU, for example, I'd bet that everyone above the age of 12 could find their own country on a map


In the US I am not so sure.


Ordered by their product. I kid you not, that is how Fedora/Gnome had ordered resolution selection dropdown - by the total number of pixels.


How do you propose visually impaired users use that interface?



This is roughly why the Linux timezone picker refers to cities instead of countries.


One paragraph into the article:

> while also marvelling at the witless mansplainers

Yeah, let’s make every discussion about gender, shall we?

How about no?


I read that, stopped caring, and closed the tab.


Good discussion, and it is certainly very nuanced.

The trouble of the developer having to create this list themselves is the reason I made http://devdata.io - so you could at least have an easy starting point for all this data that is basically just copy/paste.


timezones are a similar topic in the context of managing them, except there's less politics involved. i don't see how a global solution would look like, but i'm sure china will want a different list than russia and the US will want a different list from both of them, and that's only 3 countries out of 199 or 249 or however many are there at the moment (and then the temporal aspect comes into play.)


Timezones are downright trivial compared to this one, even if the heads-up can be very limited there's a central well-maintained database of them, and they have fairly low context-dependence: some historical context (timezones can "move around") and the socio-political context is limited to changes to timezones.


Regarding the place of birth issue, I have never used the country I was born with when some form asked for birthplace. Always used the present state, i.e. in what country is the place I was born at.

Is that not common? Would you expect someone to write down GDR, USSR, or even Constantinople? Or is it again the same issue that people want to use what they like?


One use-case I can see where this would come up: ancestry/genealogy websites. Someone's grandparents may have been born in the Soviet Union, not in the modern Ukraine, from a cultural-historical standpoint.



It's yet another tangent in this topic, but there's something that bothers me here, and in many things that try to handle multiple languages.

There are 47 lists of countries in French (that's just an example, I guess English and Spanish have as many of those) in the project that provides them [0], including half a dozen or so just for different regions of France.

As far as I can see, almost of them are exactly identical except for the Canadian one (which has "Saint-Vincent-et-les Grenadines" instead of "Saint-Vincent-et-les-Grenadines" among other things).

For English, en_US and en_UK have differences as meaningful as "Wallis and Futuna" vs. "Wallis & Futuna". Arabic has 28 different versions, all strictly identical.

English, French, Spanish and Arabic "version" alone make up 33% of all content in the repo. What purpose does this serve? Who maintains these largely meaningless lists? Who chooses which languages make it to the list, and which regions do?

I'm as puzzled by that as I am by the choices people make about what countries make it to their list of countries in select lists.

[0] https://github.com/umpirsky/country-list


I'm mostly just impressed that HN allows brackets in the title...


Though somehow the submitter replaced the ASCII double-quotes (") in the original title with paired Unicode quotes (“ and ”). Notably the modified title is not valid XML. I wonder if that was necessary to get it past some filter?


I had to edit and replace them with HTML entities, at first they were just stripped.


Okay, now I'm less impressed :).


This post looks funny in the Digg RSS reader: https://i.imgur.com/TNASB3p.png


now tie that to a SaaS that helps you manage those countries


[flagged]


> A puppet state is a metaphor of a state that is supposedly independent but is in fact dependent upon an outside power. It is nominally sovereign but effectively controlled by a foreign or otherwise alien power, for reasons such as financial interests.

Please tell us which European countries are US puppets.


Germany (still occupied by US army today), UK. Most of Eastern Europe.


That's about as reasonable as saying the US is a Canadian puppet because of their troops stationed at NORAD. Do you really consider Poland a puppet because of the 112 US troops there [0]? I hope this is a troll.

[0] https://www.dmdc.osd.mil/appj/dwp/rest/download?fileName=DMD...


Germany would be very interested to know it is a puppet state.

Who's Saudi Arabia a puppet state of?


And what do you do when China shows up and says "We're blocking your download servers unless you take Taiwan out of the `country` input"?

Better to not centralize the failure points that political actors can put pressure on for what gets to be a country or not.


Wouldn't that be a choice of the browser implementation, likely derived from the locale not unlike time zones?


Well, it's not like Google and Apple haven't bowed to China's requests before.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact