57 minutes ago · Tech · hide

“Human sorting” is sorting strings (usually file names) so that any numbers in the names come out in the right order. For example, “file10.txt” should come after “file2.txt”, but regular sorting will put them in the wrong order. I’ve written twice before about the function to do this (Human sorting and Human sorting improved), but there’s more to say about it.One effect of AI these days is bug reports for obscure edge cases. As a maintainer, it’s been a challenge first to read through them all, and then to decide which ones deserve a fix. It’s tempting to fix every little thing no matter how unlikely it is to happen in the real world. But every fix costs time, energy and focus. Every fix comes with risks in the form of new bugs or changed behavior. So some long-tail issues should be marked as “won’t fix.”But this one intrigued me: if a file name includes a numeric component with 4301 digits, then the human sorting function fails. Buh?Before we get to the current problem, here’s the…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town