More iTunes Math
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)."
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?
Cyric Zndovzny at your service.
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?
Cyric Zndovzny at your service.
Well, it's obviously a bug, but... Slashdot-worthy?
This just seems like something I'd quietly forward to their developers.
It's better to vote for what you want and not get it than to vote for what you don't want and get it.
- E. Debs
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.
/dev/kmem? I wouldn't say so.
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 Linux kernel really be considered buggy if somebody were to start entering random values into kernel memory via
Cyric Zndovzny at your service.
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?
Modesty is one of life's greatest attributes
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.
AccountKiller
"This shows the beauty of scripting systems like AppleScript. They allow you a level of interaction with a system that is hardly seen on Windows, and only vaguely available on UNIX."
This shows the level of brainwashing only possibly seen in apple zealots.
Slashdot can now link to past duplications. It's really quite funny because I scrolled down and they linked directly back to the same story. In related news the same story we will now provide the same story slightly edited..
Ooo man the floppy drive is broken. No wait. The computer is just upside down.
Goodness, just how many top-level comments can you post in a single discussion in rapid succession? It *is* possible to write more than one sentence in a comment, y'know. :)
quidquid latine dictum sit altum videtur.
- Jax
[Fuck Beta]
o0t!
AppleScript really isn't a particularly great language. My understanding is that any OSA language can use AppleEvents, so all you need is something like this to talk to applications in something you are more used to:
0 1-August/004064.html
http://mail.python.org/pipermail/pythonmac-sig/20
-- If it aint broke, fix it till it is. --
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).
Care about electronic freedom? Consider donating to the EFF!
Erm, that's completely false. Just try using dcop with amarok, or basically anything KDE. The scripting facility is definitely there, and you can use it with any language you like.
I am trolling
How can something be vaguely available? Isn't it available or not?
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...
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.
AccountKiller
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?
m0nstr42.blogspot.com
iTunes? Is anyone still using that old thing? I now exclusively use Songbird, even though it's still alpha.
Tsk, and I thought this was Slashdot... bleeding edge, people!
Yes, not every program has it, but that's a far cry from "only vaguely available". It's your choice as a user, like everything in linux, but you can perfectly well use an environment where everything has a nice scripting interface - I know everything I use does.
I am trolling
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.
Cyric Zndovzny at your service.
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.
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.
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.
Cyric Zndovzny at your service.
On the other hand, even I think this is too boring to tell other people.
"The White House is not an intelligence-gathering agency," -- Scott McClellan, Whitehouse spokesman.
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.
He's obviously written an aapple sctipt to comment for him.
PS: I kid, I kid. And I love my mac.
News for Nerds. Stuff that matters.
Were you not able to infere from the tagline that this is not your everyman's newssite about "important stories"?
Oh wait - you were trying to be funny. Don't quit your day job.
"All you have to do is be fragile and grateful. So stay the underdog." Chuck Palahniuk, Choke
What sound do people on rollercoasters make? Hint: it's not Xbox 360.
And you'll note all of those posts contain something like "Apple really understands how to do integrated systems right" or "iTunes is realy what we should be looking at as a shining example of desktop consumer software." I would buy an Apple if only I didn't have to become one of them.
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.
/didnt rtfa
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.
Why troll? He's damn right. Why how iTunes calculates ratings is considered a story? Why is it presented as "math", like it's advanced calculus? And why the hell is this on the science section?
Somebody has too much time on their hands...eh?
But 'science'??
my password really is 'stinkypants'
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 backdoor found in Windows". Math wise I'd expect something about a newer, better way to find prime numbers, or a new encryption algorithm. Not how cool it is that instead of 0-5, they use 0-100!!! And you can specify half a star. BAD ASS!
Just my useless, anonymous two cents.
No matter how many times I see this, I still laugh.
You can do half star ratings in iTunes for Windows as well. Works exactly the same way.
g rammery/
Scripts to do it can be found here: http://ottodestruct.com/blog/category/geekery/pro
- Give a man a fire and he's warm for a day, but set him on fire and he's warm for the rest of his life.
That sounds like something Apple would do: write high-quality software that even resists unexpected tampering.
Do you even lift?
These aren't the 'roids you're looking for.
"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?
Move Sig.
47 really really IS the WEIRDEST number... Really. There's even a group dedicated to it:
The 47 Society
So TFA comes as no surprise...
RS
Shoes for Industry. Shoes for the Dead.
If your song gets a rating of 42, you can expect to hear only that song while you ponder the meaning of life.
Proof by very large bribes. QED.
{
FTFA:
"I remember when I first discovered MP3 files back in the early 1990s..."
I call BS. From wikipedia:
--"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 minor and really has nothing to do with the article but i just hate it when you show someone some cool neat thing you found and they're all like "ya i discovered that back in forever ago" especially when it didnt even exist yet .
} //END RANT
mod me up or down i dont care i bleed karma
my karma will be here long after I'm gone
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 . . .
Can I get an eye poke?
Dog House Forum
If you read my article on the Rating Systems 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.
He's bitching because he had to reach into wikipedia to back up his assertion, instead of citing anything from personal experience. In other words, he was likely listening to Barney sing back in the early 90's.
Is it an 'AppleEvent' when you stick a music CD into your Mac and have to bring it to a repair shop to get the CD to eject?
I ask, because:
1. I am not up on the latest Apple-Lingo.
2. For some reason this article isn't in apple.slashdot.org where it belongs.
No, that's a Sony event.
Lars T.
To the guy who modded me down from perfect to terrible Karma - Apple haters still suck
Twice as many sentences, certainly not more content. 1/2 Star for you.
Lars T.
To the guy who modded me down from perfect to terrible Karma - Apple haters still suck
Georg
Well, you can buy a Mac and stay the same (f)lamer you are.
Lars T.
To the guy who modded me down from perfect to terrible Karma - Apple haters still suck
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 my music player telling me where to buy music.
3) If you're going on the web to look at media, going on the web with a media player makes some sense. Reading music blogs with Songbird feels a lot more sensible, you can stream recommended mp3s through a different pane, without leaving the page. It feels a lot more natural. Granted, this is one miniscule fraction of the things we do online, it probably wouldn't make a lot of sense to use Songbird to check your Gmail account... except whatever advantages are achieved from not having to open a separate program if you're listening to music and just want to jump online to check something really fast.
4) It's still just a proof of concept. It's not finished, and there are no extensions for it yet. So the fact it doesn't stack up to iTunes yet is a non-starter. You want less bugs? Wait until it's even in beta. You want ratings? Maybe they'll be incorporated, maybe they'll be an extension. You want a smarter shuffle, one that shuffles by artist rather than by track, or one that "sticks" to a genre or tempo? Extensions. You want it to automatically download the mp3s off your favorite music blogs every day? Extensions. You want anything new in iTunes? Go whine about it to your preacher, because I've sent in my complaints to Apple, and Apple's not listening.
Yep, as an apple fanboy myself, I'm not big in to applescript. I've used it a couple of times with AppleScript Studio to write, in the space of about 15 minutes, gui apps that do things like randomize a list of names an email addresses to assign secret santas and send out emails with those assignments. It's real use is easy to write, easy to read, easy to edit scripts that someone whose never written a perl script can use and tweak. It is neither efficient nor elegant, but it's not supposed to be - it's just supposed to be easy.
The secret to creativity is knowing how to hide your sources. - Albert Einstein
I hate it when someone finds something cool neat thing and then someone else attacks them on something totally irrelevant. You feel big now? Hope it helped your self esteem to reveal the dark fact that he in fact DIDN'T listen to mp3's in the early 1990's. I think you will successfully convince the jury with that one. Lets break out the torches and pitchforks and lay siege to his house. Or we could just be impressed with a pretty cool analysis of a software program and over look his poor estimation of when he started listening to MP3s.
I have to say that while the aim of the article is quite admirable, the author does a horrible job of analyzing the data he collects, and he completely misses an anomaly of interest.
His conclusion that "only for tracks rated 1-19" do ratings of finer granularity matter is bogus. Ignore figure 5 and look at every other figure in the article. It's not linear from 1-19 either. It shows the same step behavior as the rest of the graph. He mistook an anomalous edge case for some sort of liner relationship. The *actual* interesting piece of information that can be taken from the data collected is that, whether intentionally or not, the algorithm Apple uses has an odd (again, I don't say erroneous since it's possible that it's intentional) edge case. The play count difference between two songs where one has a rating one star higher is around 2000-2500. However, between no stars and one star, the rating difference is 3700. Without more information (and a Mac of my own to investigate myself), it's not clear what's going on. The author states that the 0-100 rating gets integer-divided by 20, which makes sense except that that's not what the data in the graph reflects since a rating of 0 yields a significantly different playcount from a rating of 1. In fact, neither a strict ceiling or floor explains the data generated, especially since the rating is discretized to a five-star rating.
Here's my point in summary. If iTunes integrally divides or floors the rating, then where does the extra step when the rating is between 1 and 19 incluseive come from?
You don't. Seriously. We're not all that bad. Black sheep and all that, you know...
No trespassing. Violators will be shot. Survivors will be shot again.