Charles Petzold



Sorting Without Spaces

December 13, 2007
Roscoe, N.Y.

Jeff Atwood's blog about sorting now has a response from Ian Griffiths.

Both of them ignore one of my pet peeves. For centuries, people alphabetized words and phrases by ignoring spaces and punctuation. For example, "Newark" would come before "New York." Computers changed all that, and I think for the worse. The problem is that the ASCII space code x20 comes before every other printable ASCII character, so spaces have a very high sorting priority. You would think that the extensive use of camel-case in the computer industry would have convinced us to go back to the old system of ignoring spaces (and other punctuation) while alphabetizing, but that's not so. Windows Explorer sorts in this order:

Now doesn't that just seem plain wrong?

At any rate, we should all be happy we're not still dealing with EBCDIC.