I need an answer from a math or technology genius

Page 1 of 1 [ 5 posts ] 

Joe90
Veteran
Veteran

User avatar

Joined: 23 Feb 2010
Gender: Female
Posts: 26,492
Location: UK

02 Oct 2013, 12:56 pm

I don't mean ''genius'' literally, I'm just saying.

Lately I seem to have a bit of a fascination on listening to familiar songs and being reminded of a certain time in my life depending on what song it is. It kind of gives me an emotion, like I can really go back and remember a certain time of my life, like thinking ''oh my God, this song reminds me of when I was 12 when I went on holiday....'' or something like that. Anyway I thought I'd make a ''timeline'' on itunes on my computer, by creating a new playlist and putting the songs that bring back earlier memories first then later memories and so forth. I done that by putting a number in one of the columns for each song, so that they would go in that order. But it wouldn't go in the order I want it to. It went something like

1
10
11
12
2
3
4
5
6
7
8
9

It was really annoying, and got me into a confused muddle (since I'm not very good with logical problem-solving). Why does it go in the order of the first digit? Instead of 10 being the tenth one, it is the second one, because it begins in a 1. Can anyone explain this to me, in quite a simple way? Thanks. :D


_________________
Female


Fnord
Veteran
Veteran

Joined: 6 May 2008
Gender: Male
Posts: 60,939
Location:      

02 Oct 2013, 1:15 pm

Use leading zeros:

00
01
02
03
04
05
06
07
08
09
10
11
12
.
.
.
97
98
99



eric76
Veteran
Veteran

User avatar

Joined: 31 Aug 2012
Gender: Male
Posts: 10,660
Location: In the heart of the dust bowl

02 Oct 2013, 2:49 pm

Joe90 wrote:
Why does it go in the order of the first digit? Instead of 10 being the tenth one, it is the second one, because it begins in a 1. Can anyone explain this to me, in quite a simple way? Thanks. :D


It is likely sorting alphabetically instead of numerically. Alphabetically, the sort is from left to right and that one might have more characters or digits than the other doesn't matter. For example "ant" comes after "aardvark".

Numerically, "1000" comes after "20", but alphabetically, "1000" comes before "20" because "1" comes before "2".

As Fnord suggested, putting 0 in front of the single digits would solve the problem. If there is any possibility that the list could exceed 99 items, you might want to pad them with one or two 0's on the left, as the case may be so you don't have to do so later.



sliqua-jcooter
Veteran
Veteran

User avatar

Joined: 25 Jan 2010
Age: 37
Gender: Male
Posts: 1,488
Location: Burke, Virginia, USA

02 Oct 2013, 2:56 pm

If you turn off sorting by title in the playlist, iTunes will order the playlist in the order you add the songs to the playlist. You can also move them up and down at-will.


_________________
Nothing posted here should be construed as the opinion or position of my company, or an official position of WrongPlanet in any way, unless specifically mentioned.


Joe90
Veteran
Veteran

User avatar

Joined: 23 Feb 2010
Gender: Female
Posts: 26,492
Location: UK

02 Oct 2013, 3:34 pm

I get it now. Thanks so much for the helpful replies. :)


_________________
Female