August 2006 Archives

SONOS and mime-types

| | Comments (0)
Sonos Controller I ran across a fairly obscure problem with the Sonos music system related to mime-types, file extensions and dynamically generated playlists. This is fair warning that this post will get a tad technical.

The Sonos music system supports Internet radio stations and is capable of parsing remote M3U playlists. My plan was to write a simple script that retrieves the latest This American Life archives page, parses the HTML to extract the set of show URLs and returns a dynamically generated playlist with the desired show URL.

Sonos didn't like my dynamically generated playlist and it took me a while to figure out exactly why. In the end it seems the Sonos ignores Content-Type HTTP header and instead relies solely on the file extension in the URL it is accessing. In this case the file extension was .cgi and since Sonos doesn't know what .cgi means it ignored the contents of the response.

The workaround I found was to enable the execution of CGI scripts with a .m3u file extension but only in a single directory. This is the contents of the Apache-style .htaccess file I used:
Options +ExecCGI
AddHandler cgi-script m3u
AddType audio/x-mpegurl .m3u
Then I renamed my script.cgi to script.m3u and Sonos no longer complained about corrupt contents and treated it like a regular playlist. Dynamically generated This American Life playlists streaming through my Sonos. Wonderful.

I've contacted Sonos and explained the issue so hopefully they'll fix it in a future firmware update and others can avoid the headaches.

JustBlogIt 0.3.1

| | Comments (0)
A minor update of the JustBlogIt firefox extension has been released. This update fixes a problem with blogging from within Bloglines and includes updates to work in Firefox 2.0b1.

Losing Weight

| | Comments (0)
Bathroom Scale Between Jeremy Zawodny losing 50 pounds over the past year and Aaron Swartz having success with the Shangri-La Diet I decided a month ago to (again) make a serious concerted effort to lose some weight. The discovery of The Daily Plate website has been extremely helpful with this effort. It combines a calorie search engine with easy meal recording and daily weight monitoring all in a simple interface. Do a search for what you ate, click 'I Ate This' and it gets added to your daily record. Specify some information about yourself along with your weight goals and the site will provide guidelines on how many calories you should eat each day to achieve those goals. Record your weight each day and a nice graph is generated to give you visual feedback of your progress.

Losing weight is really quite simple in principle -- eat less than your body needs and your body will burn fat reserves to make up the difference -- but it was a surprise just how little I need on a daily basis and how easy it is to go over that limit. I'm trying to lose 2 pounds a week and at my age, height and current weight this means I should be eating around 1400 calories a day. Did you know that 1 tbsp of mayonnaise has 100 calories in it? It suddenly makes you think twice about how much you smear on that sandwich when it is going to consume so much of your quota for such little payoff. I'm hardly aware of the flavour anyway. Take a look at a tablespoon. It really isn't that much.

After a few days of keen awareness of each item I put into my mouth I seemed to naturally migrate towards items that satisfy my hunger with minimal calories. To eat something greasy or sugary seems like just such a waste of my daily caloric budget. Something like a donut will taste great in the short term but ultimately will make it difficult to not over-eat by the end of the day. When you have all the information the choice is actually quite simple.

During previous weight loss attempts I would down-play the need and effectiveness of exercise. I would compare the amount of exercise needed to work off, say, a piece of cake and would argue that not eating the piece of cake is much easier. That may be true, but tasty cake eating aside, doing some exercise and being able to increase your caloric intake by even a hundred calories is a very nice incentive. Once I fully grasped how quickly 1400 calories can be reached I was suddenly very interested in exercising as it gave me the ability to replenish my daily budget. A good brisk walk means a guilt-free beer with dinner. An hour of Squash or Badminton and, depending on your exertion level, you are looking at an additional meal.

I started at 188 lbs four weeks ago and am now down to 180 lbs. I love how the process is deterministic and predictable. Follow A and get B as a result. It isn't easy but it also isn't mysterious. Whether you are trying to lose weight, gain weight or just stay the same I would definitely suggest checking out The Daily Plate to get some perspective on what you consume everyday.

Fluffy Soapy Mouse

| | Comments (0)

Andrew Wilson and Patrick Baudisch of Microsoft Research have produced an excellent tutorial on creating a mouse-like pointing device that works in mid-air. I saw the video on YouTube and was seriously impressed.

Essentially the electronics of a wireless, optical mouse are re-housed in a smooth soap-like plastic container and then placed into a fluffy fabric tube. Similar to a tactile stress-reducing ball you can manipulate the fabric in various ways over the soap-like container and the optical sensor tracks the movement of the fabric and converts the actions into movement on the screen.

For fine cursor movement you slide the fabric around with your thumb. For faster movements you rotate the fabric around the container while the container stays still. And for still faster movements you can hold the fabric stationary while rotating the container just like you would a bar of soap. Check out the video for some visuals.

I was so intrigued by the video that I went out and bought a new mouse to convert and have a partially functional model to play with. The interface is very comfortable and the ability to move the cursor quickly and then do fine pixel-level adjustments requires almost no learning curve. It just comes naturally. I foresee this style of interaction becoming quite popular in the next few years.

My digital camera is inaccessible at the moment otherwise I'd post some photos of my hacky prototype. Because the mouse interaction is inverted (dragging something over the optical sensor vs vice versa) then either the up-down or left-right is reversed. I've yet been unable to find a simple mouse utility that lets me reverse one axis so for now this is an interesting prototype rather than something I can use on a daily basis.

Site Metrics

| | Comments (0)
From small-time bloggers to large-scale corporations, everybody with a website at some point wonders how their website traffic is doing. It may be for personal interest, desire to improve the site or to provide accurate numbers to advertisers defining how much you'll get paid. Straight hit-counts are meaningless. Individual page view numbers are better but not ideal. Unique user counts are pretty much the best we have right now but in Pageviews are Obsolete Evan Williams explains how RSS, AJAX and widgets are making even unique user counts a metric that isn't showing the whole story.

Steal This Film

| | Comments (0)
Regardless of how you feel about the legality or ethics of filesharing of copyrighted media, you should check out Steal This Film for a straight-forward, human-scale viewpoint on where filesharing is today from the perspective of people that actively share files and the people that operate the popular Pirate Bay BitTorrent tracking site.

A low quality version of the film is available on Google Video or you can download a higher quality .mov via BitTorrent. To download a BitTorrent file I recommend one of these fine clients: uTorrent, Azureus, BitComet.

It is also interesting to look at the latest anti-piracy productions like this anti-piracy ad from Australia, and this Jackie Chan / Arnold Schwarzenegger team-up and this video titled The Global Avalanche of Piracy found in the anti-piracy section of the MPAA's website.

Test from Windows Live Writer

| | Comments (0)

Tap. Tap. Tap. Is this thing on? Testing the Windows Live Writer. Allowing me to post to my blog through via an XML-RPC interface all from a purty wysiwyg UI.

You can check out the Windows Live Writer blog, or download your own free copy.

Nifty. Setup wasn't difficult and the app feels quite polished.

About this Archive

This page is an archive of entries from August 2006 listed from newest to oldest.

December 2005 is the previous archive.

May 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.