Rockbox mail archive
Subject: Re: how is strnatcmp aka "Interpret numbers while sorting" supposed to sort?
Re: how is strnatcmp aka "Interpret numbers while sorting" supposed to sort?
Linus Nielsen Feltzing wrote:
>
> If it sorts 007 after 6, I fail to see how it would be surprising to
> the user in any way. It is after all a wellknown mathematical rule,
> and a rule that the major file browsers follow. If we claim to sort
> numbers, we should do so, and not change the fundamental rules of
> mathematics.
Just as a counterpoint to this  People don't normally put 0s before a
number. I would expect a lot of people would think "007" is "00 and 7"
not "7" and that leading zeros are "not part of the number." I know an
informal study of "all of my friends online right now" (none of whom are
computers scientists and many of whom are artists or fairly nontechnical
people) as told me that they expect that "04" would come before "2"
because of the zero. It was presented this way "if you had a list 2, 3,
4, 5, and you were to add 04 to it, where would you put it?" so I don't
think my question was presented in a leading way.
The problem is, now you're arguing "mathematical rules." We've already
established people don't think in mathematical rules. I doubt people see
"04" and think "four". They think "ohfour." The zero is not an
insignificant and ignored digit in the way people speak, read, or think
the number. Except in math. But we're talking "normal people" here.
Instead of us trying to think about them, if we're going to base this on
"normal people" let's do a poll. At least this way we're not
extrapolating our opinion on them based on *mathematics*, something few
people think in.
Received on 20090319
Page was last modified "Jan 10 2012" The Rockbox Crew
