Hacker News new | past | comments | ask | show | jobs | submit login

S?he probably listened to the keyup event instead.




Thank you, that is much better than

    /S?he|\w+kin|.*/
This irrational regular expression is an attempt at comedy.

On a serious note, I was looking for that word, but failed to remember it[0].

[0] https://news.ycombinator.com/item?id=15490542


You'd have to listen to both, right? Otherwise it'd be the same issue when the user tabs into the password input rather than out of.


No.

You could listen for the keydown, but you wouldn't hear it, so you may as well ignore what you can't hear.


You should get a key down event when moving into the password field since you're coming from a field which is not secure.


Yes you're right. I made a variable that tracked the current state of keyup keydown and could detect this special case.


His name is Dan ...


- I did not read their username.

- I did not click through to their profile.

The cause for both of these is that my mobile HN experience is horrible for me (a lazy person).

I spent a few seconds looking for a word to replace "She/He", when none came to mind I fell back to a regular expression[1]. As iaml pointed out[2] (along with others) https://en.wikipedia.org/wiki/Singular_they is the proper solution to this issue, and I will try to remember that in the future.

---

[1] as we so often do in our daily lives.

[2] https://news.ycombinator.com/item?id=15489652

---

In my second attempt at comedy today, Trying to perform the error-prone art of interpreting genders based on usernames, the best I came up with for you is

    /^\0_$/
Feedback welcome, this is my first attempt at matching null in a regular expression.

I'll explain the joke, so that no-one feels left out: I interpret name "Void" as gender "null", then carry the underscore over, using artistic license, to make the regex more interesting.


People don't first go to the user profile to look for a name. dangero seems like a random nick


dangero . . . us?


Dan could be short for Danielle or Danika or…


People always assume I’m “Jen”, female, which is often enlightening. They’re my initials.


Still not a reason to assume things here.


Should just default to the singular they then.


My fault. I'm more comfortable with regular expressions than the English language.


Is it just me or is none of this a big deal?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: