6 ms·
Maybe it's just because I've spent too long with computers, but I thought the everyday meaning of "sorting" was ordering, not categorizing. (Though now that I
by outsidetheparty 8y ago
Maybe it's just because I've spent too long with computers, but I thought the everyday meaning of "sorting" was ordering, not categorizing.
(Though now that I think about it, it's both: if I handed a random non-coder a deck of cards and asked them to sort them, I'd expect them to group by suit and then order by value. I wouldn't expect four stacks by suit in random order, or a deck of all the cards in numerical order regardless of suit...)
That nitpick aside, it was a good excuse to get into the interesting pre-digital computing history stuff.
- adamzochowski 8y agoThere are phrases using word sort as a category: "this sort of people" , "sort of liked".
- o_nate 8y agoI had the same initial reaction, but the dictionary supports the idea that the everyday usage of sort means to group by category, not to order. I've probably just been coding too long as well.
- outsidetheparty 8y agoYou’re right, it does! I wonder if the definition is going to drift towards “ordering” as computing becomes ever more ubiquitous, or if we’re just in a linguistic cul de sac by virtue of our profession...
- alanbernstein 8y agoAre you referring to a dictionary of word definitions? The kind that is structured as a list of words, ordered lexicographically? Where is the categorization in that?
- mort96 8y agoWhat do you mean? I agree that dictionaries are ordered and not categorized, but do dictionaries claim to be sorted?
- alanbernstein 8y agoI thought parent was using "the sortedness of dictionaries" as his argument, I now realize he meant "the dictionary definition of 'sort'".
- outsidetheparty 8y agoHe's referring to the dictionary definition of the word "sort". Dictionary.com has it as "to arrange according to sort, kind, or class; separate into sorts; classify". I looked it up in the OED too -- mostly because we have one and I don't get enough excuses to use its nifty little magnifying glass -- and it also supports the notion that it means by category, not by order. The general verb definition is "to arrange things according to kind or quality", and there's a separate definition for software: "sort: Computers: the action of arranging items of data in a prescribed sequence".
- irrational 8y agoThe example that comes to my mind is a pile of wooden blocks. If I was asked to sort them I sort them by shape (i.e., by category). Here is a pile of the square ones, here are the circle ones, etc. If I was sorting lego blocks I don't know if I would do it first by color and then by size/shape (here are all the 2x8s, here are all the 1x4s, etc.), but it would definitely be by category.
- jfoutz 8y agolego is funny, if you have a pile of red 'stuff' it's hard to pick out the 2x8. however, if you have a pile of 2x8s, it's really easy to pick out the red one. size/shape is far more useful.
- bena 8y agoYes, color looks nicer, but shape is more useful.
- jayd16 8y agoHmm, when playing with lego, I usually don't know what shapes I need but I often know what color I want.
- gowld 8y agoYes, but you don't need to sort them by color, because you can easily see which pieces are the color you want.
- tomgp 8y agoThis is a well known idea in data visualisation -- first articulated by Jaques Bertin back in the 60s (I think). Colour is known as a selective visual variable; selective variables are better used to represent categorical data as they "enable us to immediately isolate all correspondences belonging to the same category". i.e. sort your lego by bricks type rather than colour, though sorting by colour will lead to more instagram likes :)
- too-soon-ago 8y agoThe meanings are the same. In one case you're sorting a set of items which are all unique, whereas in the other there are some duplicates under the sorting key. If you sort by just the suit of the cards, you have clusters that are of the same suit. It's only in the very-precise world of programming that a set versus a set of sets makes much of a difference.
- tomgp 8y agono, its more like a set of sets vs an ordered set of sets
- josephv 8y agoI think this is a valid critique of the title. Sorting means whatever it means in a specific context (dewey decimal system, post addresses, etc...). Most languages are context sensitives, but generalized computing is fundamentally defined by a context free language in which a processing transition can execute and not care was previous states were. This gets blurry with recursion and generics and other syntactic sugar, but fundamentally state changes are still defined by the operation and instantaneous state and not the language itself. So in our context-free language of generalized computers, sorting and ordering are the same.
- dan-robertson 8y agoI can’t really tell what you mean but I suspect that it doesn’t make any sense. What on Earth do you mean when you say “generalized computing is fundamentally defined by a context free language in which a processing transition can execute and not care was previous states were”? Perhaps you are just writing context free/sensitive when you mean something different from “the set of words that may be formed by starting with some nonterminal symbol S, following rules of the form A -> xy where A is any nonterminal and x and y are either terminal or nonterminal symbols, repeating until there are no nonterminals left.” If you really mean something about all computations being expressible in a context free language then I suppose I would have to agree but I put it to you that a regular language would be sufficient. The other thing I can’t understand is what this has to do with either the parent or the article?
- deleted 8y ago[deleted]
- SilasX 8y agoI definitely think it's reasonable that someone might say e.g. "sort these coats by color" and expect them to be bucketed like-with-like, but not imply any kind of ordering (either within or across buckets).
- Double_a_92 8y agoWhat if the coats all had different but similar colors? The process would be the same, just that you have to split them into arbitrary "buckets" at the end.
- kolderman 8y ago> but I thought the everyday meaning of "sorting" was ordering, not categorizing Go ask your wife how she sorts the laundry.
- dspillett 8y ago> but I thought the everyday meaning of "sorting" was ordering, not categorizing I think I've always thought of ordering as a subset of sorting, not something different, both in computing and in "real life" language use. When sorting washed laundry I categorise by type and order by a fairly arbitrary mix of target position (undies in the top left draw, socks top right, daily t-shirts the draw below, "better" t-shirts the draw below that, then trousers, ...), hue/pattern/subject, and a few other properties. As with your cards example there are both grouping and ordering operations present in the sorting operation (in the cards example there might be two orderings: one for the suits if you want them to be in a specific order and one by the value of the cards within the suit). Sorting numbers in a computer seem quite different: each category has at most one item and the are ordered by the same property they are categorised by, but the process is similar enough. And sorting in computing is not always simply ordering. There are many examples where it is categorising (just by some variety of ordinal value). Some sorting algorithms explicitly categorise the input data as a divide-and-conquer process. Sometimes you don't care about the precise ordering (but it is done precisely anyway because a fuzzy sort would be no more performant). The only examples that immediately jumps to mind where there is a definite distinction made are data management languages where there is a distinction between ordering and grouping (quite explicitly seen in SQL's "order by" and "group by" clauses), and even there I know that internally ordering/grouping/both are performed by what I would identify as a sort operation. Sorting doesn't mean something different in computing really, people just tend to pick out a more specific definition in that context.