this post was submitted on 07 Jul 2023
438 points (98.7% liked)
Programmer Humor
19710 readers
114 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Use stringly-typed everything, and always padStart your numbers.
Saves running into issues with numbers outside the 52-bit integer range.
And padding start means you don't have to worry about pesky sort functions.
Just don't do maths. Simple.
Maybe you could do a manual sort.
Provide a "captcha" prompt, and ask which comes first in the list... You know, to make sure the user is a human! And you get free sorting.
Turn JavaScript into Bash with these easy steps...