Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

Recently asked a question of a colleague:

Are you sorting this list by acronym?

He responded:

Yes, I’m sorting on acronym (ascending).

Emphasis mine in each case.

Is one correct and not the other? Or does it depend on what is being sorted?

share|improve this question
    
@Carlo_R actually it was an e-mail conversation. But I'm more confused as to why there are already three close votes for the reason that this isn't a real question. What should I have done differently so that it would be a good question? –  John Oct 22 '12 at 21:17
    
John, I got a lot of questions closed as "not real", but it is always difficult to say how them can be improved. In this specific case I would suggest you to delete the first part of the body, leaving only the last sentence. Doing that, I presume that the question could be answered. Good look! –  user19148 Oct 22 '12 at 21:39
    
You are asking, "Does one make more sense applied to databases, and the other to groups of objects ('I am sorting the socks by color.')?" I would remove that part, and make the question less subjective by avoiding to use preferred. –  kiamlaluno Oct 22 '12 at 21:54
    
Hello @kiamlaluno, yes, I agree. The question would be perfectly improved deleting also that part; but we, generally, do not accept question without body! –  user19148 Oct 22 '12 at 22:07
    
@Carlo_R. Avoiding to use preferred doesn't mean to delete all the question text. In fact, John edited out preferred without removing the rest of the question. –  kiamlaluno Oct 22 '12 at 22:10

2 Answers 2

"Sorting on" is restricted to the name of the data field. You can sort on acronym, antonym, homonym, or another one or more fields.

"Sorting by" is less restricted. Not only can you sort by acronym, you can sort by length, size, color, columns, or rows. To illustrate, "sort on" would not have worked in the preceding sentence.

share|improve this answer
    
+1 I'm a computer science guy and agree with this distinction. –  Fuhrmanator Nov 1 '12 at 5:08

I think this is yet another example where versitile, two-letter prepositions have overlapping meanings, and therefore either one could be used.

In the context of sorting, both are found in the literature; here are some with on:

  • In this exercise you will sort on the Last Name and First Name fields.1
  • For example, if you have a name field containing both the first name and surname then, when you sort, the program will sort on the first character of the field which may not be the surname.2
  • This command will sort on ORG in ascending sequence, and for the same ORG, it will sort on SALARY in descending sequence.3

and here are some examples with by:

  • Instead, it will sort by the leftmost column first, through to the rightmost column, for any number of columns up to 256.4
  • If the user clicks on the heading Items Worked, the area will sort by that item.5
  • If, however, more than one row is returned per company name, then we will sort by the contact's last name.6

Given that each of these prepositions has well over a dozen meanings 7, and that some of these definitions are rather vague and general-purpose, it should hardly be surprising to run across contexts where either word could be used. For example, here are some definitions from Collins that would indicate these words can sometimes be used interchangeably:

on: with regard to; concerning

by: with respect to

By the way, neither sentence in the original question struck me as "off" in any way.

R E F E R E N C E S    &    N O T E S
1 I. Murphy, No Stress Tech Guide to Microsoft Works 8 & 8.5, 2006.
2 D. Weale, Excel 2000: Basic Skills, 2001.
3 K. D. Bharucha, dBase III plus: A Comprehensive User's Manual, 1987.
4 D. & R. Rawley, Excel Hacks: Tips & Tools for Streamlining Your Spreadsheets, 2007.
5 G. Knight, Analyzing Business Data with Excel, 2006.
6 P.J. Horwood, Power++ Developer's Professional Reference, 1997.
7 Collins, for example, lists 26 meanings for by, and 48 for on.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.