Jump to content
Banner by ~ Ice Princess Silky

Episode 39 - When Computers Can't Count


Justin_Case001

662 views

OMG, this one's the worst.

Y'know what really grinds my gears?  When some computers and devices can't count properly.  Okay, so if you're titling a bunch of files, and you number them, and then you sort by name, you'd expect them to appear in numerical order, right?  I mean, that's how it works.  Like, if you're using Windows, and you have a folder full of pictures from your camping trip, you can select all of them, and retitle the first one "Camp", and then it will automatically retitle all of them in the following fashion: Camp (1), Camp (2), Camp (3), Camp (4), etc, for as many as you have.  And guess, what?  They are listed in numerical order.  Duh, right?  What else would you expect?  That's because Windows knows how to count.

Now, try putting that list of pictures on certain devices (Xbox 360, for instance), or opening it with some mobile apps, and what do you see?  Let's say you have 120 pictures.  They will be listed as follows: Camp (1), Camp (10), Camp (100), Camp (101), Camp (102), Camp (103), then when reaches 120, and only then, will go to Camp (2), and then Camp (20).

What.

THE.

ASS.

Are you f*cking kidding me??!!  So, do realize what's going on, here?  Devices or apps that do this check the numbers this way: they check the ones digit first.  They know that 1 comes before 2, so they place every single number where 1 is in the one's place before 2!  Then it checks the tens places and continues in the same fashion.  It tries to order numbers the same way as you would letters, which would make 1 billion come before 2!  OMFG, dude.  When you order things alphabetically, the bloody program is supposed to know to put numbers in f*ckin' numerical order.  Knowing how numbers work is the most basic thing a computer can possibly do.  What kind of bat-sh*t insane programmers thought it was okay to not bother to tell the app how to count?

So, if you encounter a device or app like this, and there's no other way to order the files, you know what you have to do to make them appear in the order you want?  You have to manually retitle each file in the following manner: 1A, 1B, 1C, 1D, all the way to 1Z, and then 2A, 2B, 2C through to 2Z, and then 3A, 3B, and so on.  Isn't that the f*ckest thing you've ever heard?  Are you actually f*cking kidding me?!  You have to trick it.  Ridiculous.  And f*cking god help you if you have more than 234 (26x9) files.  I don't even know what you'd do then.  Or, I guess you could start with 0 and have 260.  I don't even know offhand how you could title things after that to make it work.  Maybe something like 1A1, or 1AA?  I dunno.  Not sure what it would do with that.  I'd have to think about it.

The point is, it's total bullsh*t.  It's beyond bullsh*t.  It's BBS.  How could they make apps that don't know how fricking numbers work?

My head a splode.  My f*ckin' head literally a splode.

*EDIT*  It's been a couple of years since I wrote this entry, and I kinda cringe at it now.  I've learned more about lexicographic ordering, and now I feel kinda silly for writing this one.  I still think every device should be able to do "natural" ordering, but now that I understand lexicographic, it doesn't really annoy me so much anymore.  See?  When I'm wrong about something, I go back and fix it!  That gets me... like... brownie points or something, right?  :ButtercupLaugh:

Edited by Justin_Case001

  • Brohoof 1

3 Comments


Recommended Comments

I suppose that's the entertainingly illogical result of following a logical process (character-wise ordering.) I suspect that it's a lot easier to do when you have a string of unknown length that could be composed of letters, integers or both.

As to how you would solve that for n files (for n arbitrarily large), so long as you knew how many files you had you could put in an ordering block at the start of the name that would force it to go in the correct order (so generate the blocks in such a way that they will be ordered correctly - e.g. 0000, 0001, 0002... 9997, 9998, 9999 should be ordered sequentially, I think, for n < 10,000)

It's discussed more here  - apparently it's called 'lexicographic ordering', and I agree with one of the posters there that it's highly predictable (nothing worse than not being quite sure what an ordering function will do when you're trying to spit out a list in a specific order.)

  • Brohoof 2
Link to comment

Lexicographic ordering is logical. It would be more work, and ambiguous, for the computer to have to figure out whether you want your files sorted one way or the other. How is the computer supposed to know when a digit is part of a list, or just part of a word? For example, C3PO is supposed to be sorted differently than 124? Why have different rules for different contexts? It is easier for you to learn how a computer counts than vice versa. Adding leading 0s works. 001, 002, ...

What gets me is when people label files by date, and then spell the month instead of use the number. I download a list of pod casts and I want to list them chronologically. But apr-2.mp3 comes before mar-3.mp3 Why the hell can't a person look at that and realise it would work if they wrote 04-03.mp3 and 03-03.mp3 And don't forget the leading 0. This is why our society is collapsing.

I have a list of pay stubs in a folder. I label them yyyy-mm-dd THE LOGICAL WAY! Not some jack ass mm-dd-yy crap, where files from different years are out of order.

Edited by 2nd Amendment Brony
  • Brohoof 1
Link to comment
9 hours ago, 2nd Amendment Brony said:

Lexicographic ordering is logical. It would be more work, and ambiguous, for the computer to have to figure out whether you want your files sorted one way or the other. How is the computer supposed to know when a digit is part of a list, or just part of a word? For example, C3PO is supposed to be sorted differently than 124? Why have different rules for different contexts? It is easier for you to learn how a computer counts than vis versa. Adding leading 0s works. 001, 002, ... 

All right, all right, you win.  Heh, I see you've played knifey-spoony before.  Yeah, it is more logical, of course.  But, y'know, just sayin', if Windows can sort numbered things without any muss or fuss, seems like it it shouldn't be that hard for other things to do it.

I definitely learned something today, though.  I didn't know there was a term for it, and I didn't even think of adding leading 0s (because I'm stupid :muffins:)  That's definitely easier than my method.  Thanks.  But you know, one day soon when we invent general AI, the 'puters will know, and it will be easier for them to learn than vice versa.  We'll just be able say, "Hey JARVIS, sort my numbered things in numerical order, you moron!", and it'll say, "Sorry, sir.  Very good, sir."

  • Brohoof 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Join the herd!

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...