Live data from Hacker News

When I say “alphabetical order”, I mean “alphabetical order”

sebastiano.tronto.net

81–90 of 385 posts

Re: When I say “alphabetical order”, I mean “alphabetical order”

#81
Sorting so "foo9" is before "foo10" is called natural sort. I found out about natural sort a week ago and I am thrilled that my programs now print their output in a sensible order. Give natural sort a try and see if it improves your life too :-)

I found the magic two lines of Python to do a natural sort here, by the way: https://stackoverflow.com/questions/11150239/natural-sorting...

Re: When I say “alphabetical order”, I mean “alphabetical order”

#82
post #22

I almost always want the version-sorting that's being presented in this article, rather than an "alphabetical" sort. But on the other hand, it absolutely seems like a valid bug that this is presented as an "alphabetical" sort, rather than something like "alphabetic/numeric" or similar. In other words, a problem of labeling rather than one of sorting.

Yeah, exactly. The behavior described is actually very useful. The problem is imposing it on the user with no warning or option to turn it off.

> The problem is imposing it on the user with no warning or option to turn it off.

You can say that about every single design decision made about every product.

The gripe about this particular feature seems misplaced because almost all users will want the sort that's offered and the actual alphabetical sort is likely the desire of a more advanced user who, in fact, is offered a choice through registry editing and/or using a more advanced cli option for the occasion they might need an alternative sort.

This is a sensible default.

Re: When I say “alphabetical order”, I mean “alphabetical order”

#83
post #44
post #36

Earlier quoted context omitted.

To change it per user, set it in the user's hive instead of in the local machine hive (e.g. HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE)

TIL they are called "hives". Windows Registry is an interesting thing. Even casual users have to interactive with it once or twice w/o fully understand it. https://learn.microsoft.com/en-us/windows/win32/sysinfo/regi...

Raymond Chen explained why a registry file is called a “hive”:

Because one of the original developers of Windows NT hated bees. So the developer who was responsible for the registry snuck in as many bee references as he could. A registry file is called a “hive”, and registry data are stored in “cells”, which is what honeycombs are made of.

https://devblogs.microsoft.com/oldnewthing/20030808-00/?p=42...

Re: When I say “alphabetical order”, I mean “alphabetical order”

#84

This is reminding me of the whole "Worse is better" essay and debate: https://news.ycombinator.com/item?id=27916370 The author wants the "worse" sort, one based on ASCII/Unicode codepoints, without any intelligence for numbers that 99% of GUI users want. For their purposes, they've assumed something about the implementation, to the point that a convenience feature is actually a misfeature for them. But the author her…

> The author wants the "worse" sort, one based on ASCII/Unicode codepoints, without any intelligence for numbers that 99% of GUI users want. I want the author's opinion on how caplital and lowercase letters should be sorted. Do they follow strict ASCII/Unicode codepoints, or do they normalize into actual alphabetical order and sort upper/lower within each letter?

Asciibetical sorting

Re: When I say “alphabetical order”, I mean “alphabetical order”

#85
post #71

Earlier quoted context omitted.

> and the situation where someone wants "10" to be before "9" is far more common. I guess you mean "after"? Otherwise it seems to me you're agreeing with OP. > desktops don't label this sorting "alphabetical" (E: and it would really be "lexicographic"*), they label it "by name" (an informal criteria), so technically they're not lying. FYI the more formal name for the "by name" order is "natural sort order".

> I guess you mean "after"? Otherwise it seems to me you're agreeing with OP. Depends on which direction you're sorting in, no?

> Depends on which direction you're sorting in, no?

In a vacuum: yes. In this particular case: no, because we have the article's context clarifying that we're talking about ascending order.

Re: When I say “alphabetical order”, I mean “alphabetical order”

#86
post #22

Earlier quoted context omitted.

Yeah, exactly. The behavior described is actually very useful. The problem is imposing it on the user with no warning or option to turn it off.

> The problem is imposing it on the user with no warning or option to turn it off. You can say that about every single design decision made about every product. The gripe about this particular feature seems misplaced because almost all users will want the sort that's offered and the actual alphabetical sort is likely the desire of a more advanced user who, in fact, is offered a choice through registry editing and/or…

> You can say that about every single design decision made about every product.

No, that's not true. Many aspects of my computer's UI are user-configurable.

Re: When I say “alphabetical order”, I mean “alphabetical order”

#88
post #20

That’s why I don’t even bother with the file name for photos. 1. Sync all equipments to the same clock. 2. Sort by Date Taken, if unavailable, sort by Date Created.

Yes, sounds to me like the user really wanted to sort by time created. And got used to sorting alphabetically as a poor proxy for that.

Re: When I say “alphabetical order”, I mean “alphabetical order”

#89

This is reminding me of the whole "Worse is better" essay and debate: https://news.ycombinator.com/item?id=27916370 The author wants the "worse" sort, one based on ASCII/Unicode codepoints, without any intelligence for numbers that 99% of GUI users want. For their purposes, they've assumed something about the implementation, to the point that a convenience feature is actually a misfeature for them. But the author her…

> The author wants the "worse" sort, one based on ASCII/Unicode codepoints, without any intelligence for numbers that 99% of GUI users want. I want the author's opinion on how caplital and lowercase letters should be sorted. Do they follow strict ASCII/Unicode codepoints, or do they normalize into actual alphabetical order and sort upper/lower within each letter?

And where do you sort the letter ä? (After a is correct in German, but I think Swedish does it differently.)

Re: When I say “alphabetical order”, I mean “alphabetical order”

#90
post #79
post #60

Earlier quoted context omitted.

I'm not sure I agree. I think I could be convinced if there was a unique and universal representation for numeric values using characters. But we have so many textual representations of numeric values that I'm assuming the "mind-reading" goodness only works for a small subset. And the subset will be somewhat intuitive for developers but unlikely to be so for non-technical people. For example, does the order handle nu…

Ah, the classic filenames with decimal points and scientific notation in them, so common...

Here's a different scenario: filenames with dates in them. Consider September Budget and October Budget. September is the equivalent of 9, October of 10. Which comes first for natural sorting? Remember, the file modify date may not be useful here since you may have wrapped up the September budget on October 1st while the prior edit to the October budget may have been on September 20th.

The problem is that there is no such thing as natural, and it is quite hard to determine what is more common. (Quite often more common is culturally dependent or, worse, contex dependent).

Post reply on HN