Order logic of films incorrect

  • 2
  • Question
  • Updated 1 year ago
  • Answered
  • (Edited)
The ordering of films by title is incorrect at times. An example:  the film 'RV' comes at the head of my list of films with titles beginning 'R', ie before Rampart, Ransom, etc. Why is it not placed in its correct position ie after 'Running Scared'? The letter 'V' does not precede 'a', it follows the letter 'u'!
Photo of Peter

Peter

  • 41 Posts
  • 25 Reply Likes

Posted 1 year ago

  • 2
Photo of ACT_1

ACT_1

  • 3720 Posts
  • 3589 Reply Likes

Order logic of films incorrect
the film 'RV' comes at the head of my list of films
with titles beginning 'R', ie before Rampart, Ransom, etc
by Jim Bloggs
Joined on December 31, 2017
https://getsatisfaction.com/imdb/people/jim_bloggs
- - -

ASCII sort "V" is before "a"


https://en.wikipedia.org/wiki/ASCII
abbreviated from American Standard Code for Information Interchange,
is a character encoding standard for electronic communication.
ASCII codes represent text
in computers, telecommunications equipment, and other devices

Printable characters:
Binary ......  Oct .. Dec. Hex Glyph
101 0010 .. 122 .. 82 .. 52 .. R
101 0110 .. 126 .. 86 .. 56 .. V 
101 1010 .. 132 .. 90 .. 5A .. Z 

110 0001 .. 141 .. 97 .. 61 .. a 
110 0010 .. 142 .. 98 .. 62 .. b 
110 0011 .. 143 .. 99 .. 63 .. c 

.

Photo of Peter

Peter

  • 41 Posts
  • 25 Reply Likes
It's not clear all the numbers, but ASCII or not, common sense says any translation of English language by whichever method, binary, digital, blah, blah, that 'V' comes a long time after 'a'.
Whoever invented or controls ASCII needs to use a bit of plain common sense.
How is it logical then that if I create a text document in Word or Pages (which presumably is all in ASCII code behind the scene), V will come in its correct place ie after U and before W?
(Edited)
Photo of Jeorj Euler

Jeorj Euler

  • 7277 Posts
  • 9503 Reply Likes
Sometimes coders make the sensible effort of adapting the comparison operation part of the sorting algorithm to ensure an indifference to the the casing of letters, but such an approach is not always adopted.

So, using JavaScript as an example of coding, you could say that IMDb's approach would be...
arrayOfPhrases.sort();
...which short for...
arrayOfPhrases.sort(function(x,y){
  return x<y
});
Whereas Word's approach would be...
arrayOfPhrases.sort(function(x,y){
  return x.toLowerCase()<y.toLowerCase()
});
Photo of Claire

Claire, Official Rep

  • 1713 Posts
  • 1157 Reply Likes
Hi Jim,

What ACT_1 was attempting to explain is that the capital letters in a title are sorted before the lowercase letters in a title; this causes "RV" to be sorted before "Rampart". Another example, "JFK" is sorted before "James and the Giant Peach":


Let us know if we can offer any further help.
Photo of Peter

Peter

  • 41 Posts
  • 25 Reply Likes
Thank you Claire for your explanation. However, I still maintain that whoever coded ASCII was not a part of the real world. The idea of using text (ie writing) has rules, ie the alphabet. Letters follow one another in a pre-designated order, A B C etc. This logic defines the whole basis of the alphabet and its inherent order. Whoever decided that capital letters, because of their status of being uppercase, should precede lower case letters which in the alphabet occur BEFORE the capital letter clearly had an alcoholic drink too many...

It simply doesn't make sense! There is no rhyme or reason that this should be the way it is. Other than some stupid, lazy logic of programmers who decided on this perverse notion.
(Edited)
Photo of Jeorj Euler

Jeorj Euler

  • 7277 Posts
  • 9503 Reply Likes
It does make sense, but just not in an intuitive context.
Photo of Jeorj Euler

Jeorj Euler

  • 7277 Posts
  • 9503 Reply Likes
Everything in digital computer systems is represented by a number. In ASCII, an uppercase "Z" precedes a lowercase "a", since the former's number is 90 and the latter's number is 97.
Photo of Peter

Peter

  • 41 Posts
  • 25 Reply Likes
Yes, ok, but that is where the fault lies surely. Whoever coded ASCII got it wrong! Or perhaps, seeing as ASCII is already entrenched in all things computer, the fault lies with the sorting algorithm used by iMDb, instead of using ASCII as the determinant for alphabetical ordering, a different algorithm should be created (or ipused if one is easily available), which compares capital 'Z' and 'a' and elects to place 'a' ahead of 'Z'. Should be easy enough to do, by not simply looking at the numerical (binary?) ASCII value of a letter, but the meaning of the code, ie the actual letter, and then determine order priority.
(Edited)
Photo of Vincent Fournols

Vincent Fournols

  • 2901 Posts
  • 4891 Reply Likes
Jim,

there is no use in blaming ASCII which have been a worldwide standard for several decades with its own rules and reasons.
You can blame the IMDb developers who have not coded the site in order to display sortings in a more intuitive way for its users.
Photo of Peter

Peter

  • 41 Posts
  • 25 Reply Likes
Good comment Vincent! At last, some agreement!!!