Better HN
topnewbestaskshowjobs
Log inSign up

dsjoblom

13 karma · joined Jun 9, 2022 (4y ago) · 3 submissions

Submissions

comment 4y ago · link · parent

Or just allow both versions (01 or 1). Edit: this works best if the form is validated client-side, otherwise you still get people wondering what is allowed in the field because there is no immediate response to input.

comment 4y ago · link · parent

Have you tried this in practice? It is extremely awkward to pick a date of birth using a regular date picker. It is worse than all the options mentioned in the article. It is only appropriate for picking dates close to the current date.

comment 4y ago · link · parent

The “missing integer” example is awkward, because what’s interesting here is not whether you can solve the problem with xor or plus, but whether you need two loops or just one. Edit: I guess overflow is one consideration, as mentioned in the article.