Jump to content


Incorrect alphabetical sorting


This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

dllu #1 Posted Oct 31 2011 - 22:43

    Sergeant

  • Players
  • 0 battles
  • 157
  • Member since:
    05-09-2011
One thing that mildly irks me is that the game does not sort alphabetically in the correct sense. At present, in the game, all uppercase letters always come before lowercase letters, so "Z" comes before "a". However, true alphabetical sorting should be case insensitive. So, for example, "a" should come before "B".

Of course, it is easy to fix this.

At the moment I imagine the sorting code to have something that looks like this:

if(a<b )

To make it case insensitive, simply change that to:

if(a%32<b%32)

Or, taking into account the presence of digits or other characters in people's usernames, we can use:

if((a>64?a%32+64:a)<(b>64?b%32+64:b ))

Sample code shown is written in c and assumes that latin characters are stored in the standard ASCII format.

See sample implementation

Mowie #2 Posted Oct 31 2011 - 22:49

    Major

  • Beta Testers
  • 0 battles
  • 2,726
  • Member since:
    09-29-2010
Does it really matter in the whole scheme of things?

dllu #3 Posted Oct 31 2011 - 22:56

    Sergeant

  • Players
  • 0 battles
  • 157
  • Member since:
    05-09-2011

View PostMowie, on Oct 31 2011 - 22:49, said:

Does it really matter in the whole scheme of things?

No. But since it's a 1 minute fix, why not fix it?

It does make it easier to scan through lists of people's names.

Also, since my name starts with a lowercase d, it is very slightly annoying to always get put under people whose names start with a capital letter.

Kirk_Lazarus #4 Posted Oct 31 2011 - 23:02

    Corporal

  • Players
  • 0 battles
  • 79
  • Member since:
    10-17-2011

View Postdllu, on Oct 31 2011 - 22:56, said:

No. But since it's a 1 minute fix, why not fix it?

It does make it easier to scan through lists of people's names.

Also, since my name starts with a lowercase d, it is very slightly annoying to always get put under people whose names start with a capital letter.


You serious?

Gee, if you have a problem with this I would hate to see what other little unimportant things you worry about.

Mewn #5 Posted Oct 31 2011 - 23:02

    Captain

  • Players
  • 0 battles
  • 1,268
  • Member since:
    08-25-2011
There are many programs that sort like this. I know Grabit, the usenet reader I use does it. Since the spam posters are generally illiterates, their posts aren't capitalized, and thus the unnecessary posts are relegated to the bottom.

I find it fitting, that the people who don't comprehend the proper use of capitalization are stuck on the bottom. On the downside, capstards don't get put on the bottom where they belong.

Gotta laugh that you childishly gave Mowie a neg. I gave him a positive to balance it out. Of course now you're gonna rage and give me negs now, haha.

wa_biker #6 Posted Oct 31 2011 - 23:09

    Captain

  • Players
  • 0 battles
  • 1,116
  • Member since:
    08-12-2011
Im thinking if they started out with Cyrillic and had to convert it, then they have done one hell of a job ...Lol

dllu #7 Posted Oct 31 2011 - 23:36

    Sergeant

  • Players
  • 0 battles
  • 157
  • Member since:
    05-09-2011

View PostMewn, on Oct 31 2011 - 23:02, said:

There are many programs that sort like this. I know Grabit, the usenet reader I use does it. Since the spam posters are generally illiterates, their posts aren't capitalized, and thus the unnecessary posts are relegated to the bottom.

I find it fitting, that the people who don't comprehend the proper use of capitalization are stuck on the bottom. On the downside, capstards don't get put on the bottom where they belong.

Gotta laugh that you childishly gave Mowie a neg. I gave him a positive to balance it out. Of course now you're gonna rage and give me negs now, haha.

Who said it was me that gave Mowie a neg?

But anyhow kudos to you for raising a valid point about other programs that sort like this. +1 to you! I like people who make a counterargument rather than saying stuff like "lol ur a stupid person for worrying about inconsequential things".

Although, I don't see how capitalization of usernames has anything to do with literacy.

Kirk_Lazarus said:

You serious?

Gee, if you have a problem with this I would hate to see what other little unimportant things you worry about.

I worry about way too many things :( I think I'm going to die of obsessive compulsion. For example, I am extremely mad that there is a space between "In" and "vader" in the Invader medal. But then I didn't want to make a separate topic about it because I'd probably be laughed at by everyone.

Mowie #8 Posted Nov 01 2011 - 00:01

    Major

  • Beta Testers
  • 0 battles
  • 2,726
  • Member since:
    09-29-2010
Some things get lost in translation when the Dev's translate it into English. It is just a fact and is not intentional.

I am not having a go at you dllu as you seem to have some problems and suggest that you try not to worry about these little things as it obviously is not helping you at all.