Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Math Media Music The Internet

More iTunes Math 167

markmcb writes "OmniNerd once again digs into the math behind iTunes. The 5-star ratings in iTunes are actually stored in a variable allowing values from 0 to 100, with 20 = 1-star, 40 = 2-star, etc. Known to few, if you set a rating to 30 (manually), it will show up as 1 1/2 stars in the program's GUI. Matt Schinckel provides interesting statistical evidence showing that not only do non-whole, non-half values (e.g., 47) not increase the amount a song will play, but neither do the half-star ratings (with the exception of .5 star)."
This discussion has been archived. No new comments can be posted.

More iTunes Math

Comments Filter:
  • Do values outside of the range 0 to 100 cause the program to crash, for instance? Or does it just show zero or five stars, depending on which end of the range is being exceeded?

    • by frostilicus2 ( 889524 ) on Saturday February 11, 2006 @05:39PM (#14696341)
      I've just tried this - If you insert a value outside the range, iTunes assumes the nearest value to 0, 20, 40, 60, 80, and 100 and doesn't crash.
      • That sounds like something Apple would do: write high-quality software that even resists unexpected tampering.

        Indeed, the consumer software world would be far better off if it followed Apple's model. It really makes me wonder how good Windows applications today would be if they had put more effort into developing YellowBox. We might not be faced with a future of slow, resource-intensive .NET applications, but rather small, fast applications written in Objective-C.

        • I'm really suprised that something like this hasn't been built on OpenStep actually. I like Java, but I'd love to be able to write software in Objective C that was capable of being compiled accross all three major platforms.
          • GNUstep [gnustep.org] is a possibility. Licensing issues have been raised, however. Many people have reported difficulties getting it to compile as a usable DLL under Windows, which of course makes it virtually unusable for commercial developments.

            • Yeah and the fact that most OSS development is with gtk or qt. It would be nice if we standardized on a toolkit/library for some things. If it were GNUstep, it would help promote sharing apps with macs which would give apps that much more market share.

              I don't know if its true, but most people online tell me that GNUstep developers are a bit inflexible about enhancements/patches to keep it more in sync with Apple's offerings.
              • It'd be nice if there were some unifying toolkit available, but the current ones available such as wxWidgets, SWT, Swing (both are Java), etc., are all incomplete and usually don't support Qt which in itself is a unifying toolkit (cross-platform and whatnot). Until a unifying toolkit doesn't bias based on esoteric details like licensing, we won't be getting anything good for a while.
        • Um, AFAIK, iTunes isn't written in Objective-C.

          Last time I checked it was indeed a Carbon app.
          • Carbon applications are usually written in Objective C. Carbon and Cocoa are not programming languages, and generally utilize Objective C.
            • by Eccles ( 932 ) on Saturday February 11, 2006 @07:13PM (#14696839) Journal
              Carbon applications are usually written in Objective C.

              No they aren't. I'm a professional programmer for a Mac (and PC) program using the Carbon interface for Macs. As Wikipedia says, "Carbon is more versatile in that it may be accessed using C, C++, Pascal, Ada, or any other language with suitable interface headers, whereas Cocoa exclusively uses Objective C and Java." Most cross-platform apps use Carbon because Objective-C isn't widely used on PCs.
            • Carbon and Cocoa are APIs. Carbon supports C and C++, and Cocoa Objective-C, Objective-C++, and Java, though there are third-party bindings. Of course, you can make Carbon calls from an Objective-C program since it is a strict superset of C. However, most cross-platform programs use Carbon because they don't want to use Objective-C since it is much less popular, and GNUstep isn't as mature for other platforms as Cocoa is for OS X. iTunes, by the way, is a Carbon program, though I don't know if it's written
            • No, actually you're wrong as several other posters have pointed out.

              Carbon and Cocoa are not programming languages, correct. Cocoa is accessed via Objective-C and formerly Java (formerly as its being deprecated). So, if you have a Cocoa app, it's pretty much guaranteed to be written in Objective-C.

              Likewise, the prime languages that are used by Carbon are C and C++. I cannot think of an example of a Carbon program that is written in Objective-C (I'm not saying that they don't exist at all, just that I know o
            • Carbon applications are usually written in Objective C.

              Carbon applications are usually written in languages other than Objective-C. Carbon is the old Macintosh APIs adapted to OS X.

              Cocoa applications are usually written in Objective-C. Cocoa is derived from the NeXTStep libraries.
    • So, 32 of 100 is simply 1.6 stars.

      Formula 32 / 20 = Number of stars.

      Wow. I don't see why this article is on slashdot, what am I missing?
      • by flyingsquid ( 813711 ) on Saturday February 11, 2006 @06:02PM (#14696466)
        Wow. I don't see why this article is on slashdot, what am I missing?

        Whatever it is the editors were smoking.

        • by CyricZ ( 887944 ) on Saturday February 11, 2006 @06:24PM (#14696579)
          I doubt they're smoking anything. And if they are, it's likely a substance that enhances one's journalistic abilities.

          This story has everything to do with what this site stands for. It directly involves Apple, mathematics, software design, software analysis, software realiability, and so forth.

          Remember, one of the traits of the true, traditional hacker was to experiment with systems in order to better understand them. That holds especially true of proprietary software systems, where the source code cannot be easily or readily viewed.

          Indeed, this is a very interesting story that should appeal perfectly to the general Slashdot audience.

          • Yeah, everyone in this thread seems to be in love with it.
          • by nathanh ( 1214 ) on Saturday February 11, 2006 @07:30PM (#14696926) Homepage
            This story has everything to do with what this site stands for. It directly involves Apple, mathematics, software design, software analysis, software realiability, and so forth.

            Indeed, this is a very interesting story that should appeal perfectly to the general Slashdot audience.

            The hacker audience who is interested in such things has been dwindling both in numbers and as a percentage. Now the "general Slashdot audience" prefers to fawn over the latest consumer product from Apple, to complain about Microsoft, or to inexpertly argue their "Rights Online".

            Articles about technology, impressive hacks, homebrew projects, science and mathematics would be extremely welcome. Unfortunately the editors are infatuated with content-free articles that are little more than advertisements for products like the PS3 and Xbox and iPod.

          • If by "general" you mean "user of iTunes that makes use of the rating-star system", then yes. I don't think it's news to most slashdotters that a 30/100 is equivalent to 1.5 stars on a five-star system. I think maybe if it had more of an effect on the actual chance of playing (I'm assuming this is based off of the randomizer or party shuffle or something), people would care more. I dunno about anyone else, but every one of my tracks is rated at 0 stars, simply because I can't be bothered to rate thousand
  • So it seems they developed their algorithm to only deal with the values 0, 20, 40, 60, 80, and 100. Is it really a surprise that it doesn't take into account other values?

    • Well, it's obviously a bug, but... Slashdot-worthy?

      This just seems like something I'd quietly forward to their developers.
      • I wouldn't necessarily consider it a bug outright. First of all, it doesn't appear to crash iTunes. But beyond that, it's an action that is outside of the normal usage scope. It requires one to use AppleScript, at least on Mac OS X, to use the non-standard values.

        One might say that quality software should properly deal with unusual values, and that is quite true. Likewise, it appears to be the case in this particular situation. The rating system still works, even with the unexpected data. Indeed, could the
        • You have to script in order to use it? Huh... If scripting is unsupported, then I obviously didn't read enough and am incorrect, and I apologize. If it is supported, then it's a bug, albeit a very small one. Either way, not really that interesting.
      • Has no ill-effect to the user, looks like 1 part was overdesigned. Overall, looks like one person was in charge of the storage and UI for the rating, and another for the statistical interpretation (makes sense, a UI person and a math person).
    • It's a slow news day. Apparently some guy wasting his time figuring out that iTunes uses integer math when doing song ratings is "news" today.
      • It's quite interesting, as the following quote makes clear:

        So, what does this tell us about iTunes and the way it handles ratings? As a hobbyist coder,21 there is one big surprise for me. I would have thought that the easiest way to code for the 'bias' toward higher rated songs would be to just use the numeric value that is stored as the rating. Clearly, this is not the case, as a 99-rated song plays about as many times as an 80-rated track. Therefore, the algorithm must convert the rating to a number o

        • That's interesting? Speculation based on statistical analysis of iTunes code has to be one of the most boring things I've heard in a long time. Sheesh, if he really wanted to know how it worked he should have just gotten out a decompiler and found the section that deals with ratings.
          • by CyricZ ( 887944 ) on Saturday February 11, 2006 @06:32PM (#14696628)
            Yes, it's interesting. If you find such topics boring, then perhaps you shouldn't be reading Slashdot. I'm sure you'll find reading material more entertaining and suitable for lower intelligence level at Disney.com [disney.com].

            Many people who read this site care about issues like this. We find it interesting to experiment with software systems, especially those which we do not have direct access to the source code of. It's fun to see how a consumer-grade application reacts to unexpected data, for instance.

            He could have decompiled the application. But doing so would likely have been in violation of the licensing agreement he agreed to before using said software. You may question the legality of such agreements, but he may not have wanted to take the risk of publishing his findings. Litigation is expensive, after all.

            Not only that, but it's quite difficult to decompile a program written in C, C++ or Objective-C. That's especially true when you're dealing with an optimized program. It often isn't obvious what a particular chunk of assembly code is doing, and thus is basically useless for such analysis.

            • ...I could announce that in the Palm ebook reader, eReader's PalmReader, you can uncover the markup used to format the text even though it isn't directly visible. You can do this by using the search facility to search for markup tokens from the "Peanut Markup Language" used. Curiously it skips the escape character ('\') and the first letter of each markup symbol, as if the original authors expected all markup symbols to be one character long. The markup also includes the filenames of included images which a

            • He could have decompiled the application. But doing so would likely have been in violation of the licensing agreement he agreed to before using said software. You may question the legality of such agreements, but he may not have wanted to take the risk of publishing his findings. Litigation is expensive, after all.

              Give me a very large break. Even Apple, sue hungry nutjobs that they are, isn't going to sue someone for finding out a trivial part of iTunes. As for the "you don't find this interesting, but us
            • by Anonymous Coward
              introductory algebra is new to you. Sorry, it's not people who think this is boring that should be looking at Disney.com. It's people who think this is interesting that should be posting somewhere that's the Disney equivalent of Slashdot.

              I don't use itunes, and while I realize many people do, this seems pretty mundane. It might be interesting to those who care - obviously there's some of you out there - but this hardly seems worthy of Slashdot. I'd expect something more hackerish along the lines of "NSA
      • But 'science'??
  • by CyricZ ( 887944 ) on Saturday February 11, 2006 @05:30PM (#14696293)
    Has anyone been able to replicate this behavior with the Windows version of iTunes? Is it built upon the same core as the Mac OS version, or does Apple have a separate implementation that may behave differently?

  • Since there are only 11 tracks in this experiment, I can easily include the raw data. Unfortunately, I didn't record for how long the experiment using the data subset ran. Exercise for the reader: Calculate approximately for how long this experiment ran from the data contained within this article.
    Anyone with some spare time wanna tell us the answer?
  • closed source.. (Score:3, Interesting)

    by GrAfFiT ( 802657 ) on Saturday February 11, 2006 @06:04PM (#14696480) Homepage
    Interesting to see that what would just involve reading a few lines of code on open source software takes a whole complicated statistical analysis on closed source software...
  • Any idea why they would pick 100? There doesn't seem to be any obvious reason to do this over 0 to 5. Memory considerations would peg it to 2^n-1 values wouldn't they?
    • by CyricZ ( 887944 ) on Saturday February 11, 2006 @06:20PM (#14696562)
      They could have just been leaving their options open for future expansion of the software. Indeed, it would be better for compatibility to already use the 0 to 100 range.

      Suppose in the future they added support for giving a song a percentage ranking. It's quite easy to do with the system they're using now. Data from the new software could be used with the old, as the old software is already expecting and can cope with a value in the 0 to 100 range, even if it does so slightly differently than the future versions.

    • As above poster, I would assume they put it that way for the option of future expansion to the ratings system without annoying problems.
    • Any idea why they would pick 100? There doesn't seem to be any obvious reason to do this over 0 to 5.

      It's called "percent".

  • Obligatory (Score:5, Funny)

    by Errandboy of Doom ( 917941 ) on Saturday February 11, 2006 @06:08PM (#14696499) Homepage
    iTunes? Is anyone still using that old thing? I now exclusively use Songbird [songbirdnest.com], even though it's still alpha.

    Tsk, and I thought this was Slashdot... bleeding edge, people!
    • by dr.badass ( 25287 ) on Saturday February 11, 2006 @07:58PM (#14697060) Homepage
      iTunes? Is anyone still using that old thing? I now exclusively use Songbird

      I tried to install Songbird, but it just installed a buggy, broken and cluttered version of iTunes that didn't work with my iPod and had a farting bird for an icon. Does anyone know where the real installer is?
      • I installed it and it looked ok... one thing I wonder -- will it work better than iTunes on my laptop?

        My laptop has a fairly small hard drive and I don't intend to keep my entire music collection on it. I rather think of it as an iPod -- my landlocked disk has my real library on it, and some subset lives on the laptop at any one time. When I'm on my home network, I want to have access to my whole library, but when I'm out and about, I would like to easily see what subset is local. I have found that iTune
    • Why would I want to install a clone of iTunes, when I've got the real thing?
      • ...because the UI is black, so it matches your ipod nano and better represents your depressed state as a result of being a Windows user?
    • Yeah, you were modded funny because you're talking about Slashdot and bleeding edge when referring to a product that is currently Windows-only.
    • Hrrm, where are the song ratings?
    • 1) iTunes doesn't play half my collection, because there's no ogg support. Winamp plays ogg, but it's got nothing for library management. Somehow, Songbird managed to pull off ogg support before they were even released, and its shooting for the basic skeleton of features iTunes provides as well.
      2) Songbird helps you buy music from a variety of stores, rather than just one. I think eMusic is better than the iTunes Store, but even if it isn't, I don't want my car telling me where to buy gas; I don't want m
  • why linear? (Score:5, Interesting)

    by kavehkh ( 725943 ) <kavehkhNO@SPAMgmail.com> on Saturday February 11, 2006 @06:30PM (#14696613) Homepage
    Why is the rating system linear instead of exponential. I would like a song that has one more star than another to play TWICE more often.

    • Also: in the interface, a rating of zero means "no rating". Should songs with a rating of 1 really be played more often than unrated songs?

      • Yeah, this is the biggest problem. I am far more likely to run into a song I'm meh on, but don't quite want to delete, and give it a 1-star rating (which I have done) than to go through and rate EVERY song (which I haven't done). So it sucks that these 1-star songs will now be played more than much better songs that I just haven't gotten around to rating.

      • I would think an unrated song should have an implicit 3 star rating: it's not known to be good or bad, but it will still be played.
    • Re:why linear? (Score:3, Insightful)

      Why is the rating system linear instead of exponential. I would like a song that has one more star than another to play TWICE more often.

      Man, do you really want your favorite song to play 32 times for every 0-star rated song you have on your iPod? I don't care how much you love a song, after listening to it that often, you're bound to want to stab your iPod in the face. Or the closest fan of The Cure. Come to think of it, that'd be a win-win situation.

    • Actually you can set this up with a few smart playlists. They have suggestions at http://www.smartplaylists.com/ [smartplaylists.com] that you might be able to use.
    • Re:why linear? (Score:3, Interesting)

      by NeMon'ess ( 160583 )
      I agree that the fixed settings suck. As a user actually comfortable operating a computer, unlike much of the market, I want advanced options that let me adjust how much more and less often I hear songs. So Party Shuffle isn't worth using to me.

      Instead I rate my tracks like I would a movie.
      1-star is probably going to get deleted eventually.
      2-stars play half as much as No-stars.
      No-stars play twice as much as 2-stars.
      3-stars play 3 times as much as 2-stars.
      4-stars play 4 times as much as 2-stars.
      5-stars pla
  • Why did Apple choose multiples of 20? Isn't 0, 1, 2, 3, 4, 5 a lot easier to work with? It certainly makes the most sense.
    • So they could expand to a 100-star rating system in the future!

      Seriously, it's a good question. Statisticians generally use scales of 5 values in surveys for a reason - it provides enough options for people to choose something near what they really want without the hassle of too many options that would have to be collapsed anyway. A 0-100 scale really seems like overkill.
    • In case they ever want to expand the system? Instead of rewriting everything they could add features to the existing base. Percentile, more refined stars, some other thing? The space to store a vale of 1-5 compared to 1-100 is negligable, so you might as well plan for the future.
  • by theurge14 ( 820596 ) * on Saturday February 11, 2006 @07:21PM (#14696876)
    In the current Windows version of iTunes (6.0.2.23), in Preferences there is a tab for Playback. And in there is a section for Smart Shuffle.

    The first control is a 3-setting slider for "more likely, random, less likely". The description below says "Smart shuffle allows you to control how likely you are to hear multiple songs in a row by the same artist or from the same album."

    Below that are three radio boxes, labled Shuffle: ( ) Songs ( ) Albums ( ) Groupings.

    Is it possible that this 100 scale rating system might be more fine grained to take these Smart Shuffle user settings into account? Perhaps that might be why it isn't simply the integers 0-5. /didnt rtfa
  • Somebody has too much time on their hands...eh?
  • "that not only do non-whole, non-half values (e.g., 47) not increase the amount a song will play, but neither do the half-star ratings (with the exception of .5 star)."


    I know this article is about DRM-filled software, but do we really have to be this negative towards it?
  • that not only do non-whole, non-half values (e.g., 47)

    47 really really IS the WEIRDEST number... Really. There's even a group dedicated to it:

    The 47 Society [yahoo.com]

    So TFA comes as no surprise...

    RS

  • //RANT!
    {
    FTFA:
    "I remember when I first discovered MP3 files back in the early 1990s..."

    I call BS. From wikipedia: [wikipedia.org]
    --"July 7, 1994 the Fraunhofer Society released the first software MP3 encoder called l3enc."
    --"In the first half of 1995 through the late 1990s, MP3 files began flourishing on the Internet.

    so basically before mid-1994 there were no mp3s. There were other things (like mp2?) but mp3s really didnt exist since, duh, u kinda needed a encoder in order for mp3s to be created.

    ok so this is

    • so basically before mid-1994 there were no mp3s. There were other things (like mp2?) but mp3s really didnt exist since, duh, u kinda needed a encoder in order for mp3s to be created.

      Dude, he said "...MP3 files back in the early 1990s...". In case you didn't notice, 1994 is part of the early 90's, in that it's before 1995.

      Not sure why you're bitching about this, it doesn't seem to be contradictory at all . . .
  • by ChristopherA ( 519178 ) on Sunday February 12, 2006 @05:56AM (#14699150) Homepage
    If you read my article on the Rating Systems [lifewithalacrity.com] you'll see that 5 point rating systems are a poor way to do ratings. In our analysis, only 10% of raters use the bottom two star in a 5-point scale, and only 2% use the lowest rating of 1 star. The median of the 5-point scale is actually the fourth star, with a neat bell curve arranged around it. In my own personal use of iTunes, I've forced myself to be much more consistent and lower with my ratings. 1 star means that it has been rated, but in general I don't like it and don't play it. 2 stars means average, which means play it some of the time. 3 stars is above average, and play it more often, but I can get bored with these. 4 is good, and can basically listen to these regularly without getting tired. 5 stars are exemplars -- I try to find more songs like these.
    • I think this is because people tend to think of a 5-point rating system as being 5 stars for love it and 0 for hate it -- where as if they hate a song, they probably don't even own it. Even "strongly dislike" which is what most people would figure as 1 or 2 stars, doesn't make the cut to be purchased for my music collection. I like your system, where 5 is exceptionally good and 2 is average; it's much more useful for this type of thing because the music that would typically get rated 0, 1, or 2 isn't even i
    • That's why I use the 5-star rating system in a different way.

      In iTunes there is a boolean (checked/unchecked) that you can use as an extra binary digit.

      Horrible or bad song: I thrash them
      Not that good, but still a keeper (it's in a full album or something): unchecked
      Regular: not rated but checked
      From 1 to 5: from nice to exceptional

      Actually, if a song is nice enough for me to take the seconds to perform the rating means it is worthy.

      There goes your gaussian... yeah, I know my values would probably be classi

Outside of a dog, a book is man's best friend. Inside of a dog, it is too dark to read.

Working...