The today standard way of sorting is well defined, unambiguous, and natural. Lexographic has its place, but user facing interfaces ain't it.
The today standard way of sorting is well defined, unambiguous, and natural. Lexographic has its place, but user facing interfaces ain't it.
For context, while NTSC program selections were typically indexed by channel ("ABC here is channel 4, NBC is channel 6"), ATSC uses "subchannels" like "12.1" or "21.5". I had assumed these could be safely stored as a decimal type.
Then one of the broadcasters here introduced both "42.1" and "42.10" and it broke the key model in the underlying SQLite database I kept the channel info in.
Just no
User interfaces that try to be cleaver are a pita.
Keep it simple, and avoid the confusion with corner cases that otherwise will baffle users. Like this
For user-facing presentation, having 5.9.xxx before 5.10.xxx is simpler; the corner case that baffles users is having 5.1 and 5.10 before 5.2.
> Keep it simple
What's simple? Good defaults make things simple, which means putting 9 before 10 in case, for the reason explained by parent.