Home > Usability > Alphanum algorithm posted to Reddit

Alphanum algorithm posted to Reddit

Between 8:00pm and 9:00pm today, I had received four emails from people about my Alphanum algorithm for sorting mixed strings and numbers in a natural order (i.e., not ASCII). Weird, I usually get Alphanum emails every season or so, not four times in one hour! Something seemed to be afoot.

Turns out that someone had posted link to my page on Reddit (here’s the link). I think that’s the first time a page of mine had ever been blogged without me expecting it – not that I’m complaining, of course. I’m very glad other people are finding value in this!

Here’s my favorite comment thread.

Advertisements
Categories: Usability
  1. Sam
    December 15, 2007 at 10:42 pm

    Wow! I was looking for just this algorithm–one that sorts larger numbers after smaller numbers like a human would, but also alphabetically. So I did some searches on Google and I thought the one you wrote looked the simplest and probably the best. So I copied the file into one of my projects and it works great! Thanks.

    I wonder if you could use an array and look up whether a character is 0-9 in the C# version. I might benchmark and see if I could improve it somehow, but not right now.

    What I was trying to do was sort a list of highways for a traffic monitoring program. I had thought Word or Excel could do this, but I couldn’t make that work.

  2. December 18, 2007 at 5:19 am

    Stumbled upon your blog a week ago and decided to come back. Not for the articles you write, but for how you write them, really amazing stuff you’re doing here, i like how you put information into the articles which makes it much more easier to read and much more interesting of course. Keep up the good work!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: