The curious case of the disappearing Polish S (2015)
medium.engineering
medium.engineering
1. windows installing both programmers' and typists' Polish keyboard layouts by default + shortcut to change between them (I think it was alt+shift+space or even alt+space ?). Most people had no idea there even are 2 layouts and if they randomly pressed this shortcut and logged out - the next time they tried to log in - Z and Y are switched and if they had Z or Y in their password - they can't log in. This one caused millions of support calls.
2. corporate computers with English and Polish layout installed - if you happen to have layout switched to English and try to write an email in outlook - you will likely start with "cześć" ("hi") and when you press alt+s for "ś" it will send the "cze" as the full email. "cze" is very casual "hi" like writing a business email: "yo".
3. same as above but in eclipse with some version control plugins alt+s committed the code. Especially frustrating in cvs/svn.
4. python2 code often breaks if you have Polish letters embedded in code as string literals. It depends on the default system coding page vs default python coding page and other stuff, for some reason it's not utf-8 by default in python2. The solution is to use python3 or mess up with the default settings.
The curious case of disappearing Polish S - https://news.ycombinator.com/item?id=8986920 - Feb 2015 (117 comments)
Second interesting fact: it is very popular for software and online apps, especially not developed in Europe to ignore diacritics. Not only polish ones, but also french, german etc. You get weird characters instead or can not write properly altogether. I hope the article will put a highlight on the issue.
More to the article's point: there were countless times where I accidentaly sent unfinished email by trying to type "ś".
For example, a customer of my e-shop gave his street as "Skretova".
So, is it "Škrétova" (named after a famous Baroque painter) or "Skřetova" (Goblin's street?)
Of course, most Czech cities do not honor goblins in their street plan...
Normalizer.normalize(text, Normalizer.Form.NFD).replaceAll("\\p{M}", "");
(I hope I got this right—I adapted it from some code which actually strips out some other bits of text to turn, e.g., F. Janaček into FJanacek.)In the past people could naturally stop using diacritics or make letter substitutions. Over time the language might eliminate their use. That seems less likely now.
Similarly introducing a new letter seems rather difficult in the computer age.
It's really no different from people in English shortening "you" to "u" in texting as well, or "lol". Everybody saves keystrokes wherever they can.
2. laske mi robisz
--
1. you are (not really, pejorative) doing me a favor
2. you are doing me a blowjob
...must be one of better ones.
e.metaKey || (e.ctrlKey && !e.altKey)
seems to me like an exceptionally strange choice. Why not an exclusive-or? The thing they want to avoid is a false-positive on both being pressed, so test for that directly.Also, Javascript doesn't have a logical xor operator, so trying to do that would potentially reduce readability.
I also didn't know about any operator to logically xor two boolean variables (thought about (ab)using JavaScript's implicit type conversion mechanisms: `x ^ y`), and then I learnt that `!=` works fine as a logical xor for booleans. Tada!
I don't know how much readability is reduced by this.
x != y
Even replacing the OR with XOR is not obviously an improvement as it is not clear that we know what the correct behavior would be in the edge case where a keyboard event is emitted with both the control and command flags set.