Live data from Hacker News

My last name makes me invisible to Computers (2015)

wired.com

131–140 of 140 posts

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

#131
post #123

Earlier quoted context omitted.

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.

Overloading the plus operator for strings was probably a mistake in the language but that's hardly a condemnation of their type system.

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

#132
post #131
post #123

Earlier quoted context omitted.

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

Overloading the plus operator for strings was probably a mistake in the language but that's hardly a condemnation of their type system.

A lot of languages overload + to mean concatenate. I think that's a mistake, however...

In Python:

    "abc" + None
    TypeError: cannot concatenate 'str' and 'NoneType' objects
    
    "abc".join(None)
    TypeError: can only join an iterable
In Ruby

    "abc" + nil
    TypeError: no implicit conversion of nil into String
In Lua

    = "abc" .. Nil
    attempt to concatenate global 'Nil' (a nil value)
But not Java. Java implicitly tries to coerce the provided value to be a string, which seems out of place in a language that values type safety. That all types might also be null also seems out of place in a language with strong, static typing, but that's been discussed to death. The problem is compounded by the fact that null is actually converted to "null" instead of an empty string.

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

#133
post #132
post #131

Earlier quoted context omitted.

Overloading the plus operator for strings was probably a mistake in the language but that's hardly a condemnation of their type system.

A lot of languages overload + to mean concatenate. I think that's a mistake, however... In Python: "abc" + None TypeError: cannot concatenate 'str' and 'NoneType' objects "abc".join(None) TypeError: can only join an iterable In Ruby "abc" + nil TypeError: no implicit conversion of nil into String In Lua = "abc" .. Nil attempt to concatenate global 'Nil' (a nil value) But not Java. Java implicitly tries to coerce the…

On the other hand, it's easier to get into this situation in Python than Java.

    bar = "bar" 
    foo = "foo"
    foo_bar = foo + baar   # intentional typo (baar will be None)
In Java this would be a compiler error, but python accepts it until the program is being run.

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

#134
post #109
post #90

Earlier quoted context omitted.

Don't get me started on Outlook folders. The actual names are of the folders are localised, not just the way it's presented to the user. The folders are created when you first start Outlook (and not when your account is created). If you happen to be using Windows configured in a foreign language the first time you start Outlook, your inbox, sent mail, etc, folders are named according to that language, and will never…

That's why I take care that my OS doesn't know I'm French. But it's a luxury that most French people can't afford and they have to live with bugs. Ex: Having both a "Download" and a "Téléchargement" folder, with "Download" being sometimes translated.

This is something Apple got right. The underlying folder has a standard name, and the translated name is just a different presentation. If you change language, the names of the translated folders change.

For anyone who doesn't know OSX, this translation happens on the UI level. Typing ls in a terminal gives you the real directory name.

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

#135
post #133
post #132

Earlier quoted context omitted.

A lot of languages overload + to mean concatenate. I think that's a mistake, however... In Python: "abc" + None TypeError: cannot concatenate 'str' and 'NoneType' objects "abc".join(None) TypeError: can only join an iterable In Ruby "abc" + nil TypeError: no implicit conversion of nil into String In Lua = "abc" .. Nil attempt to concatenate global 'Nil' (a nil value) But not Java. Java implicitly tries to coerce the…

On the other hand, it's easier to get into this situation in Python than Java. bar = "bar" foo = "foo" foo_bar = foo + baar # intentional typo (baar will be None) In Java this would be a compiler error, but python accepts it until the program is being run.

That's a NameError in Python: undefined variables don't have a value, not even None. It won't be caught until runtime since there's no AOT compiler in Python, but it's the same kind of error it is in Java.

My claim isn't that Python is safer overall than Java. Instead, it's that Java, a language that is mostly type safe, most of the time should not have these two potentially surprising behaviors:

1. The standard string concatenation operator does implicit coercion rather than rejecting an input that isn't a string. There should be a builtin to make a string from any value no matter what for logging and debugging, but that shouldn't be the standard concatenation operator.

2. This is more controversial, but strongly statically typed languages should not allow arbitrary values to be null. That sabotages one of the major strengths of strong static typing. Instead, there should be an option type to make it explicit. For something familiar to most programmers, SQL does this.

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

#136

I've been programming for over a quarter century, and I feel pretty confident that I've never written anything that could confuse 'null' with NULL. I can't even think of a language that would let you easily do this. If web forms aren't accepting NULL, then somebody probably specifically programmed the word 'null' into a filter of disallowed entries. Probably to stop clerks from entering the word 'null' to mean empty…

SQL abstraction layer at work in PHP special cases the string NULL to search for 'is null' rather than search for the string. So it happens

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

#138
post #37
post #2

I have seen apps that choke on much more common names. Like O'Brian. This post is a classic on various name issues: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-b...

Dutch names (two or three word surnames with spaces) confuse all sorts of systems/people.

Dutch first names confuse systems as well. Gmail doesn't understand the first name of my colleague is "Jan Willem" and not just "Jan", when showing the list of recipients.

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

#139
post #8

Earlier quoted context omitted.

Oh, let me tell you about the saga of Mr Curl trying to update his billing information at a company I used to work for...

I don't understand. Are you agreeing with me or suggesting a string with the contents "curl" will somehow cause the server to execute the curl command?

This happened. I was working tech support for a company with a very old billing database. Customer was attempting to update his billing information with a new credit card and was immediately getting an error - Forbidden.

Turned out it was his last name, Curl, that was causing the issue. The system was throwing an exception because it interpreted the customer's entry as attempting to execute the curl command.

We ended up having him put "JR" at the end of his last name to prevent it.

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

#140

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…

You're not saying the classicists confuse the smooth breathing with the acute accent, right? Only they can't figure out how to typeset them? How do you enter them nowadays by the way? In the early days of the internet before unicode there were special fonts from SIL for example that first of all were using Latin characters (you'd type W and it would look like Ω) and secondly I think had the diacritics as separate cha…

Not smooth breathing and acute, but Unicode has two codepoints for acute accents (sort of). One is the modern Greek tonos, which often looks just like an acute accent but sometimes appears as a dot or straight vertical line, and the other codepoint is the ancient Greek oxia (the ancient term for the acute accent), which appears with all the other marks and their combinations (grave, circumflex, smooth/rough breathing, iota subscript).

Personally I type Greek using a vim keymap file, usually when writing LaTeX. I believe my keymap file is influenced by those older non-Unicode fonts, because I type w for ω and ;h for ή and >~h| for ᾖ. But my fellow students would mostly use Word. I don't know how they would type the letters, but commonly they would mix the tonos letters with everything else. I think what was happening is that Word would automatically substitute fonts that offered those codepoints, so it would end up showing Times for the letters with tonos and Palatino for the others (or something like that). Hence the ransom note effect.

Post reply on HN