Archive for January, 2007

S3 Backup Resolution

This post from Jason Bock reminded me that I never followed up on my Amazon S3 backup plan.

In my last post, I mentioned that I was ditching JungleDisk to use S3Drive because it didn’t cache the files locally, and it mirrored my file structure with no encryption which makes it convenient to use.

After trying to backup my files with S3 Drive, I’ve now made the switch back to JungleDisk, primarily because the file transfer speeds with S3Drive were horrendous (~2k/sec).  At those speeds doing a backup of all our pictures would have taken days upon days.

JungleDisk has also had a couple releases since then and made some improvements.  I also turned the cache down to 100MB, so while its still caching files, its not going to eat away my hard drive while I’m backing stuff up, and they’ve said they are considering an option to turn off the cache completely.

And, while the encryption of my files is less convenient in the sense that I now need JungleDisk to read my S3 files, its not a bad trade off to make considering that my files are more secure.

So my setup is: JungleDisk to interface with S3 account and Robocopy to actually manage the backup process.  Heres my robocopy command line setup too, with some options that work best for me:

set defaults=/MIR /XD “My Music” /XA:H /R:1 /W:2 /Z /V /XO /SEC /COPY:D /XX

robocopy.exe “PATH_TO_BACKUP” “DESTINATION_OF_BACKUP” %defaults% /LOG:LOG_FILE_PATH

/MIR - This tells Robocopy to mirror the file structure
/XD “My Music” - Excludes the “My Music” directory
/XA:H - Excludes hidden files
/R:1 - Allows for 1 retry of failed transfers
/W:2 - When retrying, wait for 2 seconds before starting again
/Z - Copy files in restartable mode to account for network glitches
/V - Turn on verbose logging
/XO - Excludes “older” files, so files that haven’t changed since the last backup won’t be transferred.
/SEC - Copy files with security
/COPY:D - Copy only file data, not other attributes
/XX - Excludes “extras”, this will delete files from S3 if they don’t exist locally

You can find a great list of all robocopy parameters here.

Ratings Systems

Way back when Netflix released a huge dataset for their competition, I got to thinking about ratings systems like the one Netflix has for movies that you rent.

You can log into Netflix and begin browsing movies and rate movies that that you like or dislike. For instance, I gave “The ‘Burbs” four out of five stars. Based on your ratings, netflix can better recommend movies that you might like.

A similar ratings system exists on the Yahoo Music player. As songs are playing you can rate them 1-4 stars or click on the “no smoking” sign which indicates that the song sucks really bad and you never want to hear it again (of course, there are ways that Yahoo will queue it up for you again, as I’ve heard “drops of jupiter” several times even though it makes my ears bleed).

I like the idea of these ratings systems because I’ve found a lot of music/movies that I like based on the recommendations of Yahoo and Netflix. What I don’t like about these ratings systems  is that they have too many options.

I nearly always end up rating songs at 3 out of 4 stars on Yahoo (if I rate it at all), and I think this is my thought process:

  1. I like this song, what should I rate it?
  2. Well, its not the BEST song ever, so its not a 4
  3. On the other hand, I like the song, and a 2 seems like a bad rating
  4. I’ll go with a 3

At least to me, theres no reason to have any other option besides “Thumbs Up” or “Thumbs Down”, either I like the movie/song or I don’t. Digg got this part right on their site, you either “digg” a story, or you don’t, simple as that.  I would think that simplifying the ratings system would make the recommendation engine a little easier too, since they don’t have to account for different “levels” of how much you like something.

As an aside, when I first started using the Yahoo music engine, I found that there was some way to change the rating system from a 4 star to a 0 - 100 system. 0 - 100??!?!  “Gosh, I don’t know, is this song a 33 or a 34?”. Give me a break.

It finally got cold

I saw this headline come through my rss reader yesterday, its from a local news channel’s web site:

“Mpls. Workers Brave Frigid Cold, Some With Coats” (link to story)

This seems a little disconcerting.

Only SOME people were wearing coats? With temperatures below zero, I would guess that EVERYONE who went outside had a coat.  And, I’m willing to bet there was a high percentage of people with hats and gloves or mittens too, you just wouldn’t know it from the headline.

It did mention that some people also drank warm liquids to fight the cold, which is comforting to know. We get this insightful quote about the benefits of hot drinks:

It works. It helps.

So there you have it - if you’re cold, try a hot drink, it will work, it will help.

Streaming Netflix

So I saw today on Slashdot that Netflix is offering streaming movies. It looks pretty cool because you don’t have to pay anything extra to get 18 hours of streaming content a month. You can watch whatever you want, whenever you want, until you hit 18 hours. I’m not sure if you can pay more to get more monthly hours or not, I’m sure that will be an option eventually.

This has, more than anything else, made me want to get some device (Apple TV, Xbox, etc) that will allow me to stream movies from my computer to the TV, preferably over a wireless connection. In the past (before today), I wasn’t all that interested in these solutions because I don’t have a huge library of movies, nor do I want to maintain a huge collection. Now that Netflix can host my collection for me, connecting my TV to my computer makes a lot more sense.

A couple questions still remain though.

  • Is it possible to stream a netflix movie from my computer to the TV?  There is a special movie player that you have to use and I don’t know enough about streaming content from the computer to the TV to answer this.
  • What’s the maximum quality we can achieve?  DVD?  HD?  It says that Netflix will detect your connection speed to determine the quality it can give you, but I would be willing to wait 10 - 15 minutes to buffer a higher quality movie.
  • What’s the selection like?  The screencast above mentions that Netflix currently has ~1000 titles available.  I’m assuming that will continue to grow.

So we’ll see what happens, I’m not sure what it would cost to get a decent streaming solution from my computer to my TV, but hopefully I can get something eventually.

VS SP1 Installer

This is a pretty pessimistic outlook on an install - I suppose it is nice to see that they aren’t beating around the bush either - “….several minutes to several hours….”, yikes.

vs sp1 install msg

Arbitrary sorting in MySql

I recently needed to do a sql query in MySql that selected a bunch of items by their ID, the query was something like this:

SELECT * FROM Customer
WHERE CustomerID IN (502, 506, 398)

I just wanted some customers (more like 50, not just 3), but I also wanted them sorted in the exact order that I specified their ID’s by, so I wanted customer 502, then 506, and then 398, in that order.

It turns out theres a feature in MySql that allows you to specify an arbitrary sort order in a query, it looks like this:

SELECT * FROM Customer
WHERE CustomerID IN (502, 506, 398)
ORDER BY FIELD(CustomerID, 502, 506, 398)

You simply specify the field that you want to sort on, and then give the sort order of the items you want to use. You don’t even have to be selecting on the field that you order by, so this would also work:

SELECT FirstName, LastName FROM Customer
WHERE CustomerID IN (502, 506, 398)
ORDER BY FIELD(CustomerID, 502, 506, 398)

Here, I’m not including CustomerID in the results, but I can still use it in my custom sort.