Live data from Hacker News

My last name makes me invisible to Computers (2015)

wired.com

121–130 of 140 posts

Re: My last name makes me invisible to Computers (2015)

#121
post #100

Earlier quoted context omitted.

If you really want some fun, try explaining to people the difference between modern Greek tonos (e.g. ή, Unicode 03ae) and ancient Greek oxia (e.g. ή, Unicode 1f75). Or in UTF-8: paul@tal:~$ od --format=x1z tmp/tonos-oxia 0000000 74 6f 6e 6f 73 3a 20 ce ae 0a 6f 78 69 61 3a 20 >tonos: ...oxia: .... It's super fun when you are the only tech person in a Classics grad program and everyone else is turning in papers that…

My kingdom for a good monospaced font and supporting editor to handle these and RTL languages. I've found Setups that work with one or the other, but none seems to do it all just yet.

The combination of Adobe Source Code Pro & emacs works well for me.

Re: My last name makes me invisible to Computers (2015)

#122
post #110
post #79

Earlier quoted context omitted.

ASCII never really supported the idea of a combining character, so it's not surprising that the original intent was subverted.

ASCII supported combining characters. That’s what backspace was for! https://news.ycombinator.com/item?id=11654682

That was very illuminating, thanks. Interesting that the idea was there originally but was later deprecated when they realized video terminals couldn't do it. Today it would be trivial to convert the sequence letter/backspace/accent to its UTF-8 equivalent.

Re: My last name makes me invisible to Computers (2015)

#123
post #94

Earlier quoted context omitted.

That's insane. I've known Java to be a bit verbose, but I thought it was mostly a reasonable language aside from that. I might have expected something like that from Javascript or PHP. Never in my wildest dreams would I have thought that boring old Java would interpret a null cast to a string as a literal string "null" when combining strings. Even Ruby and Python don't do that - they throw type mismatch errors instea…

Ehh, I don't really think this is a huge deal personally. Keep in mind that it is not that `(string)null` gives you the "null" string, or `((string)null).ToString()` gives you the null string. You have to use actual string concatenation to get it (Or as others have pointed out, `String.ToValue(null)`). Point being, it isn't/shouldn't be messing up your regular comparisons (Unless you turn it into a string beforehand)…

It's insane in that Java pretends to have strong, static typing, then does things like that.

Re: My last name makes me invisible to Computers (2015)

#124
post #21

Earlier quoted context omitted.

In java + operator on strings works like this: Object a = null; String s = "foo bar " + a; // s == "foo bar null" So, it's possible to get "null" as a string downstream, when some variable that should be non-nulleable - was null. If you find such a bug and incompetently fix it by checking for "null" downstream instead of checking before turning variables into strings - you have the error from the article. Especially…

> it's possible to get "null" as a string downstream I don't see the problem with that. Strings that contain formatted variables should be used for display only. Besides, when someone inputs his name, the input is already a string, and I don't see how you would dereference string contents.

That's not the problem. Strings saying "null" are not the problem. That's just four lower-case characters. No system chokes on that directly.

The problem is downstream, where some galactic idiot has special-cased the string "null" to turn back into an actual `null`.

Re: My last name makes me invisible to Computers (2015)

#125
post #94
post #21

Earlier quoted context omitted.

In java + operator on strings works like this: Object a = null; String s = "foo bar " + a; // s == "foo bar null" So, it's possible to get "null" as a string downstream, when some variable that should be non-nulleable - was null. If you find such a bug and incompetently fix it by checking for "null" downstream instead of checking before turning variables into strings - you have the error from the article. Especially…

That's insane. I've known Java to be a bit verbose, but I thought it was mostly a reasonable language aside from that. I might have expected something like that from Javascript or PHP. Never in my wildest dreams would I have thought that boring old Java would interpret a null cast to a string as a literal string "null" when combining strings. Even Ruby and Python don't do that - they throw type mismatch errors instea…

>I might have expected something like that from Javascript or PHP.

Javascript does it too, but PHP doesn't.

Re: My last name makes me invisible to Computers (2015)

#126
post #74

Earlier quoted context omitted.

I think this style might come from TeX, based on this comment: https://english.stackexchange.com/questions/17695/any-refere... Manpages aren't written in TeX though (apparently they use something called "roff"), but they also contain things like `read' instead of 'read'... perhaps manpage writers tended to like TeX too?

Probably the other way round: roff/troff/nroff is older than TeX. I guess that on old computer typesetters, ` and ' turned into nicely balanced quotes.

roff was the financial back reason that Unix moved from PDP-7 / assembler to PDP-11 / C.

http://www.read.seas.harvard.edu/~kohler/class/aosref/ritchi...

Re: My last name makes me invisible to Computers (2015)

#127

Earlier quoted context omitted.

Javascript lets you do anything wrong if you use == and not === though, I'm pretty sure the machine apocalypse is going to happen because someone types == instead of === at this point.

At least if the Terminators are running JavaScript they'll be pretty easy to thwart.

Blackhat conference talk we might see in the future: "How I achieved remote code execution on the T-1000 and singlehandedly averted the extinction of the human race"

Re: My last name makes me invisible to Computers (2015)

#128
post #39

I don't get what's happening at the low-level for this to be a problem. It seems like you'd have to do something pretty stupid at the coding level to introduce a problem with "Null" by mistake . I'm sure it happens, but not more of an occasional issue. My best guess is that there are common old databases that did not have a first class null type where it was common practice to use the string "NULL" for that purpose.…

> My best guess is that there are common old databases that did not have a first class null type where it was common practice to use the string "NULL" for that purpose.

It isn't a DB issue. It's more of a front-end or middle tier issue.

In SQL standards - NULL is a "marker"/TYPE. NULL and "NULL" are two separate things. One is a null type and the other is a string type.

Or more specifically, it is a "interface" problem between RDBMs and front-end since languages handle null differently. Many languages didn't have null types and null in certain languages mean different things that "lack of information".

For example, if a database column was a nullable int column and you wanted to bring it out to the java or .net space you would have issues since "int" in java and .net are value types and not reference types. So you could assigned null to the values. Where as a string/text/varchar column you could since string in java and .net are reference types and can be null.

In some languages, checking for null means you have to convert null into a string and then compare "null" == "null".

It's a legacy of lack of Nullable types in many programming languages. With the introduction of Nullable types many of these problems went away.

Re: My last name makes me invisible to Computers (2015)

#129

Earlier quoted context omitted.

Tangentially related (rule 9); my girlfriend's surname contains an 'é'. I have yet to see a year go by without receiving mail having 'é' on the address label where the é should be. Explanation: echo "é" | iconv -t utf8 -f iso8859-15 We're Dutch, and the é is part of our language, and even part of the legacy character encoding standard everyone used before Unicode's widespread adoption. This is just a matter of code…

I feel your pain. My wife has a French first name with an acute accent over the "e" as well. Many forms will outright reject the accent, so I've taken to just not typing it most of the time. Being American, it doesn't really bother her, though. I know in some languages missing accents and other similar markings changes the pronunciation and meaning of words and can be very irritating to some.

> accents and other similar markings changes the pronunciation and meaning of words

Yes. In some languages those are actually not "markings" but denote proper letters, like in German ä,ö,ü and ß. But even if not, like in French, it can alter the meaning of words. E.g la != là. Therefore, for most Europeans and speakers of other languages that depend on more letters than ASCII provides, it is very annoying when that is not supported properly.

However, I have made the experience in a few cases that particularly Americans have a hard time understanding this. The remark about your wife not caring seems to be in this vein, too. Recently, I decided to convert our MySQL DB tables from latin1 to UTF8. (I wasn't even aware that we didn't have some form unicode, as our DB is only few years old, and I thought some unicode is the default nowadays everywhere. But then MySQL...)

Anyway, my CEO (also an American incidentally) was trying to keep me from it because he thought it's not high priority. However, we're about to go live in a French-speaking region, but which also has other indigenous languages (and therefore names), with their own "special" characters (I put "special" in quotes because for those languages, they're not "special" at all -- but I guess you get my gist by now).

Also, in previous jobs I have converted legacy systems to unicode and know what a pain it is down the road. Not to mention all the hard-to-find bugs if you don't do it, because some strings don't compare as they should, or people are just annoyed because their name is not shown correctly.

So I went ahead with the conversion anyway. We may never know for sure, but I'm convinced that I saved us some major customer frustrations, days of bug hunting and weeks of converting everything later, when existing data would need to be migrated.

So please everyone, just use UTF8 or some other unicode variant from the get-go. The few bits you might save otherwise are just not worth it.

Re: My last name makes me invisible to Computers (2015)

#130
post #94

Earlier quoted context omitted.

That's insane. I've known Java to be a bit verbose, but I thought it was mostly a reasonable language aside from that. I might have expected something like that from Javascript or PHP. Never in my wildest dreams would I have thought that boring old Java would interpret a null cast to a string as a literal string "null" when combining strings. Even Ruby and Python don't do that - they throw type mismatch errors instea…

Ehh, I don't really think this is a huge deal personally. Keep in mind that it is not that `(string)null` gives you the "null" string, or `((string)null).ToString()` gives you the null string. You have to use actual string concatenation to get it (Or as others have pointed out, `String.ToValue(null)`). Point being, it isn't/shouldn't be messing up your regular comparisons (Unless you turn it into a string beforehand)…

It's not that it's really that huge of a deal, just that it's so out of character for Java and everything it is seen as.

It's like if a guy you were friends with since college and always knew to be solid and reliable but a little boring, and now many years later, he's happily married with kids, watching sports, working in a large hierarchical organization, doing pretty average stuff but nothing unusual or exciting. If you suddenly found out that guy had secretly been a Furry the whole time, that would be really shocking.

Not that there's anything wrong with being boring and reliable, or being a furry. But the sudden change in how you saw somebody or something is stunning.

I half expect anything written in Java to be littered with AbstractFactoryFactories and giant frameworks using 20 different design patterns to write Hello World. I never would have expected Java to silently convert an actual null to the string "null". I always thought the one thing you can count on Java for was to be strictly strongly typed, and never silently do any weird random conversions that nobody would have expected. Guess I was wrong.

Though poking around in a few other languages, JavaScript does indeed do that also, though I kinda expect JavaScript to do things like that. In Ruby, nil.to_s gives empty string, and adding a nil to a string gives you a type error. In Python, trying to add None to a string also gives you a type error, but str(None) does give you 'None'. That's a bit disappointing, but not shocking to me.

Post reply on HN