Live data from Hacker News

A curated list of falsehoods programmers believe

github.com

21–30 of 128 posts

Re: A curated list of falsehoods programmers believe

#21

> valid email address exactly has one @ character A normal email address exactly has one @ character. There is an infinite number of possible weird things everyone has little though non-zero chance to encounter on every corner of their life. > therefore your implementation should allow this I wouldn't be sure it should. Implementing support for this has direct and indirect, explicit and implicit costs one will have t…

"The only reasonable objective is to make sure it does the job 99.9 % of real-life times."

If you would be writing software for airplanes, or cars, that would mean lots of crashes per day, with millions x 99.9% being still a lot. If it is financial software, people might loose millions regulary.

But if you make a casual game ... who cares (except the person who lost his highscore achievements).

Obviously there are different standards.

Re: A curated list of falsehoods programmers believe

#22
post #12

Earlier quoted context omitted.

All that said, there are a number of really good email validators out there in the wild. One of the oldest can be found at http://isemail.info/about , (along with a test suite to write your own implementation and some sage advice about the basic approaches it's reasonable to take when validating email addresses). Yes, dependencies aren't completely free conceptually, even when they're distributed free of charge, but…

Because I really don't want to accept a string with more (or less) than one @ symbol for an e-mail address. Such an address can be valid theoretically but chances are it is incorrect. If somebody submits such a string for their email, 99 in 100 cases it's a typo and the remaining 1 is a person testing you. Not even one real person in a million will use an e-mail address which doesn't have exactly one @ symbol in it.

People can also incorrectly type in their email in a way that looks fine, so I'm skeptical of intentionally not allowing valid email addresses just to cut out a small fraction of those. The isemail.info site recommends a warning if it doesn't look right, but allowing the user to override and use anyway, which seems sensible to me.

(I say this as the proud owner of a lastname.email domain, where the .email TLD was made explicitly for this 8 years, and I still have problems with bad validation.)

Re: A curated list of falsehoods programmers believe

#23

Better title would be, "list of common simplifying assumptions programmers and designers make." Avoiding all these assumptions will introduce unacceptable complexity for many projects. In many of the listed cases, making the assumption will require a tiny fraction of your addressable market to use a workaround, which they are likely already used to using with other products. So there is a cost-benefit study to be don…

> I do believe that people with fifteen names are capable of leaving out some of the ones in the middle, and it makes my job a lot easier to require them to do so.

Sure, if you handle it gracefully and give them ample space to squeeze their names onto one field and your system not making fuss about it. People that tend to have fiften names also tend to come from areas that may use accented characters, have suffixes and thus spaces in their names and have other weird combinations:

Cristina Fernández de Kirchner, Manuela Maria Lopez Sanchez de Chacon, Juan Carlos Vargas Blanco (given name is Juan Carlos, not Juan), Carla Rodriguez y Calderón (both Rodriguez and Calderón are last names)

In my anecdotal experience from having lots of friends with non-ascii letters in their names there are surprisingly many websites and software that will fail to take into account some or all of those things. And then there are cultures where surname is not necessarily a thing. If you're adamant that users "can leave out" or butcher (because you don't accept Ü or Ł) their names because it's convenient to you then you're creating hard to predict problems for the user. Quite common is to accept all characters but then silently converting them for "convenience" before storing and then use those names next time instead of what the user entered, so that poor Łukasz would have to know to use Lukasz next time without nobody telling him.

Re: A curated list of falsehoods programmers believe

#24
post #12

Earlier quoted context omitted.

All that said, there are a number of really good email validators out there in the wild. One of the oldest can be found at http://isemail.info/about , (along with a test suite to write your own implementation and some sage advice about the basic approaches it's reasonable to take when validating email addresses). Yes, dependencies aren't completely free conceptually, even when they're distributed free of charge, but…

Because I really don't want to accept a string with more (or less) than one @ symbol for an e-mail address. Such an address can be valid theoretically but chances are it is incorrect. If somebody submits such a string for their email, 99 in 100 cases it's a typo and the remaining 1 is a person testing you. Not even one real person in a million will use an e-mail address which doesn't have exactly one @ symbol in it.

If somebody wants to register and use an email address with a bang path, that unix beard is out of luck.

Re: A curated list of falsehoods programmers believe

#25
Is there an easy way to display a diff which shows all the new links since the last time this was on HN? (Sept. 8th, 2020)

Partial list:

Falsehoods about Airline Seat Maps https://duffel.com/blog/falsehoods-about-seat-maps

Falsehoods about Biometrics https://shkspr.mobi/blog/2021/01/falsehoods-programmers-beli...

Falsehoods about Plain Text https://jeremyhussell.blogspot.com/2017/11/falsehoods-progra...

Re: A curated list of falsehoods programmers believe

#26
post #11

The original one about names was about exposing people to different culture's perspective (like how Icelanders have last names based on their father's first name), but this expands into nonsensical territory like "people can change genders multiple times a day"[1]. It just feels like being a rebel for rebellion's sake. [1]: https://medium.com/gender-2-0/falsehoods-programmers-believe...

Who is a programmer to prevent others from being rebels because they enjoy it? There's freedom and creativity in nonsense, and that might be worth preserving, especially when not crucial to fulfilling the task at hand (which gender rarely is).

Re: A curated list of falsehoods programmers believe

#27

I think the lesson to take from these lists is that covering every edge case for many real-world situations becomes asymptotically difficult. You can get 95% with no effort at all, 99% with a bit of thought, 99.9% with some effort, 99.99% with a smart design, some research, and a lot of effort, and anything further requires making it your full-time job indefinitely. It gets thornier when it comes to personal things l…

In regards to your last line, I feel like we do need to give people some leeway and not assume bigoted intent. Most of the things we can gig people for not implementing nowadays are only recently important in our cultural consciousness. English has traditionally shied away from using accents and one can reasonably assume that if a person signs up for my English language website, they won't be using Chinese characters in their name. As for the boolean determining pronouns thing, I can easily see someone thinking that was a clever implementation before people adopted the idea that there are more than two to be cognizant of. I also think using they/them is only recently considered grammatically acceptable. Going forward, we do want to support the things you mentioned.

Re: A curated list of falsehoods programmers believe

#28

> valid email address exactly has one @ character A normal email address exactly has one @ character. There is an infinite number of possible weird things everyone has little though non-zero chance to encounter on every corner of their life. > therefore your implementation should allow this I wouldn't be sure it should. Implementing support for this has direct and indirect, explicit and implicit costs one will have t…

> A normal email address exactly has one @ character

I've been using to respond to people for ages, and this is a completely normal and supported email flow. Who are you to tell other people what is normal? It is not some possible weird thing that other people can use emails that follow the spec and aren't even all that out there.

Re: A curated list of falsehoods programmers believe

#29
post #16

> valid email address exactly has one @ character A normal email address exactly has one @ character. There is an infinite number of possible weird things everyone has little though non-zero chance to encounter on every corner of their life. > therefore your implementation should allow this I wouldn't be sure it should. Implementing support for this has direct and indirect, explicit and implicit costs one will have t…

I have never seen an email address with more than one @. Can you provide us with an example?

shorel@example.com@otherperson.net

Re: A curated list of falsehoods programmers believe

#30
I checked a few random lists and their "falsehoods" weren't very informative when it's just a list without any explanation. Maybe they're just supposed to be amusing or contrarian.

(Following my own advice...) For example: https://chiselapp.com/user/ttmrichter/repository/gng/doc/tru...

> 10× programmers exist.

(i.e. saying they don't exist) Maybe a writing prompt for a blog post, but there's nothing else there about it.

Post reply on HN