Saturday, August 18, 2007

iTunes and remote media via NFS, not SAMBA

Strange that I haven't posted for months ... and that one was about iTunes as well.

Anyway, I've been cursing iTunes for months. I have over 5000 songs in my home library (for the record, almost all ripped by me, a few from artists who supply downloads, links below), and rather than copy them to all the machines in my house and try to keep them all sync'd, I store them all on a terabyte+ RAID server on a linux box. The filesystem is exported through SAMBA and mounted into each of the Windows machines around the house.  Hey, it works.

But it hasn't worked well for a few reasons. One is that it is SLOWWWWWW! It took me ages to figure that it was Samba that was causing, or at least triggering, the problem.  It seems as if iTunes needs to read the files when just scrolling the file list in the iTunes library, which is quite insane.  But what I would see is I'd drag the scrollbar and a full second or more later the window would actually scroll. Ditto if I click for page down or something. It was desperately annoying. And going through SAMBA to read these files, well, it wasn't pretty.

So today I bit the bullet and figured out how to install MS' NFS Client for Windows, and I remounted the linux filesystem through NFS. This is a huge improvement. While still slower that local, the action is almost live now.

Of course, the real culprit is a broken design for iTunes.  Whether single-threaded, or just reading the files when it doesn't need to, simply scrolling the window shouldn't do anything but scroll information already present, either in memory or at worst already in the library file which *is* local.

For those with similar problem, here's how I did it.
  1. stop iTunes 
  2. Download Windows Services for Unix direct from MS
  3. unzip into a local directory (just click the exe in explorer)
  4. install in a cmd window per these instructions 
  5. reboot - the mount command used below wasn't found until rebooting
  6. unmount the samba drive
  7. remount from the command line. I used: mount -o rsize=8 -o wsize=8 -o anon -o nolock \\server\media m:
  8. move the itunes directory under My Documents | My Music to another name. You can delete it later.
  9. start iTunes. In Advanced settings, I set the location of my itunes folder to the remote media folder (in my case, M:\mp3). Make sure "Copy files to iTunes folder" is cleared. The reason I set the library to M:\mp3, rather than keep the library local, is so when I rip more albums they are automatically saved on the server.
  10. File | Add Folder and pick the remote media folder.
  11. go have a beer or two while all the files are indexed, volume and gapless checks are done, etc
That's all it took, and now iTues is almost as responsive as I would like on Windows with all media files remote.


I promised links to some artists who supply downloads of their music. Here are a couple:
  • Children of the CPU supply mp3s of all tracks on their album for download here  
  • SXSW'07, there is a torrent of 739 tracks on this page
  • I love Milla Jojovich, and her site usually has some tracks available, usually demos.

Wednesday, April 11, 2007

iTunes store and country restrictions

Apple has come under attack again recently in the EU regarding restricting the sales of certain content to purchasers connecting from specific countries.

The complaint goes that this is anticompetitive. Apple's response is that they can't sell what they can't get, and their suppliers (the owners of the media IP in question) license specifically by country.

Disclaimer: I'm not a fan of iTunes store. I have never purchased anything from them, and don't plan to do so until my purchase will technically permit what I believe to be my fair-use rights: to copy and enjoy my licensed content on my various players and devices.

That said, I'm siding with Apple on this particular issue. Bemoan country restriction all you want, it isn't the fault of the channel. The fault lies with the content owner, in this case, the record labels. For arguably valid financial model reasons, vendors will sometimes charge different amounts for content destined for different markets. To justify the practice they sometimes (but not always) specialize the product to the market, but that doesn't change the basic picture.  DVD vendors do this with region-encoded discs. We can argue that this practice is self-defeating, that it only encourages illegal cross-region copying, and no doubt makes us grow hair on our hands, but the reality is that the owner the IP should be able to choose when and how to license what they own. Just as it is my choice whether to buy from them. Or, as it says in a restaurant near my home:

We reserve the right to refuse service to anyone. 

EU regulators can take the record labels to task on this one as they will if they want "to open the market so people can shop freely throughout the EU", but they shouldn't harass a store who is stuck with the terms the labels are willing to offer.

Unless of course the complaint is pure harassment.

Sunday, March 25, 2007

Yahoo footer turns a meal (well, email) into spam

Almost an anagram, that.

I started a new job a few months ago, which has taken a real toll on my blogging, and also on wading through my 'probably spam' folder. So surprise, when I was looking for something yesterday I found a raft of emails I receive (or not) from friends sending mail through Yahoo accounts.

Best I can tell, some of the ads Yahoo is injecting into the footer of valid messages from my friends are twigging my trainable filter. I suppose Yahoo footers are old news, but they haven't bit my filters before, perhaps because I stayed on top of things a bit more in the past.

Imagine getting an email with some reasonable text on top, and text like this underneath.
Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.
Here's another one:
Get your own web address. Have a HUGE year through Yahoo! Small Business.
This follows a classic spam pattern in which the spammer is prefacing random sections of real text on a spam message to get it past a filter. Filters are getting pretty good at not falling for this. I especially like the all-caps 'HUGE'.

I gotta say, I'm intrigued that Yahoo is doing this. First, what a stupid thing to do if you want your users' emails actually get to their destinations. If you care. Second, the recipients of the messages haven't opted in to receiving a marketing message from Yahoo. There isn't an opt-out link on this marketing message.  The acceptance of marketing-in-exchange-for-service is a reasonable one, but it is the message senders that have made that deal, not the recipients.

I figure California's anti-spam law didn't go far enough.  It only seems to treat whole messages that are unsolicited - not adding commercial messages to other messages. Imagine if every mail relay the message goes through were to add a header. Such is just as valid as what Yahoo is doing at the origination.  Think about how acceptable similar behavior would be in non-e-life. As I leave my BART train, a barker slaps a sticker on my backpack that advertises BART as I walk around town. When I buy a CD a record store, I find that there is a 10 second ad for the store attached to the end of each song.

For practicality alone, I guess I could whitelist yahoo-originated email in the hopes of actually receiving email from my friends. Not.

To add a dose of irony, here is a Yahoo footer someone else complained about:
All New Yahoo! Mail � Tired of Vi@gr@! come-ons? Let our SpamGuard protect you.
A search on "Yahoo Footer" shows that Yahoo will even extort sell its users a product to take the footers off, so you don't spam your friends by sending them mail. Charming.

Friends don't let friends use Yahoo.

Saturday, March 24, 2007

Nash strategy and public health

A recent article (subscription may be required) in the Economist talks about semi-rational public behavior for vaccine for seasonal (not pandemic) flu. Those choosing the vaccine are those most at risk - mostly the elderly and to a lesser extent those (like me) on a short vector. Which makes sense. This is an example of what I might describe as a Nash behaviour, in which people who can't or won't negotiate will make purely selfish (motivated by personal cost/benefit) decisions.

But the classic vector for flu is to be brought into the home by kids, where the adults then catch it and subsequently spread it in their workplaces.  The Nash vaccination behaviour is calculated to result in 100 times more flu infections than what is called a utilitarian strategy, in which the immunization of at least 77% of kids would roughly eliminate the disease for lack of a vector with which to maintain itself. "When a critical proportion of a group is immune to a disease, too few individuals are susceptible for that disease to be passed from one to another".

This is where the article stops. Going a further step, I wonder at the net national financial impact of Nash vs utilitarian strategy for flu vaccination. What would be the effect of 100x fewer flu infections on productivity, GDP, trade balance, and eventually exchange rate? Qualitatively, would there not be an increase in productivity, causing a small increase in GDP (decrease in health and drug industries, increase in others), and disproportionate increase in trade balance? What would it do to an B$836.1 US trade imbalance?

I'm reminded of a story in Britain a few years ago, about parents who were opting out of universal vaccination for some diseases (smallpox and red measles come to faulty mind) because there was no practical incidence any longer. In essence, a selfish (in the Nash sense, not a value judgment) decision to benefit from the vaccination of others and counting on not enough folks opting out to create a new propagation vector. Not to pick on Britain - I'm sure this happens elsewhere as well, but I encountered the story while living in Britain.

The very odd thought occurs to me that if a group makes a public decision to eradicate a disease by semi-requiring global immunization, but only 70% immunization is required to achieve the goal, who should make the decision about which 70%? Should those excluded be the higher risk, or the more nervous/selfish?
If individuals, how do we incent (reward) private decisions for public goods such as disease prevention and national productivity?