Uncategorized

The Intersect has Launched

Posted in Uncategorized on October 14th, 2010 by admin – 1 Comment

Many of my faithful readers are aware that I’m quite passionate about giving people different ways to browse through data spaces. Being a Netflix subscriber, one of the things I find frustrating is that I cannot make intersecting queries to find movies I want to see, or to help me remember a movie I vaguely recall a few data points about.

To that end I have created an iPad application, The Intersect for Netflix, which allows users to do exactly that.  Watch the video below to get a taste for what it does for you.  This first version only has movies in it, but version 1.1 (already submitted to the App Store) will have TV shows as well.

This application was developed using the Freebase and Netflix APIs, combined together to provide a richer exploration experience for the user.

It’s not free, but what else are you going to do with a dollar?  Yo-yos are frustrating, band candy is temporary, but this will give you hours of entertainment – and it will just keep getting better!

Version 1.1 is now in the store, including TV shows and the ability to rate movies!

Tracking Fitness

Posted in Uncategorized on August 4th, 2010 by admin – 1 Comment

One of the things I’m doing right now is training for the Las Vegas Triathlon (as well as the Nautica Triathlon the week before). I like to be able to chart my progress with various different technical tools, but I’m finding myself a tiny bit frustrated trying to find something that’ll really work for me. What I want is something that tracks all my workouts with heart rate, time, intensity, and speed. In one place.

I’ll go over my various existing tools here to demonstrate the problem.

For simplicity, I’ll leave out the FitBit, Philips DirectLife and the GoWearFit, as they’re targeted to another type of activity (wandering around during the day when you’re not working out). And I’ll leave out integrated sites like DailyBurn, which try to pull together your workout information with food tracking and a vibrant community. I’ll talk about those another time.

Withings Scale

I have a Withings WiFi enabled scale. I know it sounds really silly, but I love this thing. It tracks my weight and fat percentage and makes charts and graphs, and makes it so much easier to track changes in my weight and body composition. Stand on the scale, wait a bit, and then you’re good – there’s an iPhone app and a website which both allow you to see your progress. I actually started losing weight at 230 pounds so the graph isn’t complete, but it really helps keep me on track (and reminds me that sometimes there are plateaus and that’s ok).

Polar FT60 Heart Rate Monitor


One of the most important tracking and feedback tools you can have while training is a heart rate monitor. Your resting heartrate, your heartrate during a workout, and your average heart rate are all critical pieces of knowledge to optimize the efficacy and safety of your workouts. I got a new Polar watch this year, the FT60. It’s got all the things I like about Polar HRMs, including the “Fitness test” where it has you relax for a few minutes and tells you how fit you are. It’s also got custom training plans for whatever you need – where it tells you what kind of workout you should do, and monitors your heart rate to make sure you’re staying on track. This is a great system for avoiding overtraining, and their website seems like it’s probably a decent place to track activity… although I don’t know how well it integrates with my social stuff (Twitter, etc.) since I haven’t yet purchased the “optional” Polar Flowlink transmitter which is needed to get information from the watch up to their site. The technology for these heart rate monitors has apparently improved to the point where swimming data is reasonably accurate, which makes me happy. If only Polar were more open so I could use the data in other applications.


RunKeeper

For tracking my runs, I like RunKeeper. It’s GPS based, and it will track my runs, my bike rides, my skating, my walking… pretty much everything. The mapping feature is great, and it’s nice to use. However, it’s only good for outside workouts, and my iPhone isn’t fond of the pool, so I can’t track my swims that way. It integrates with several different Polar watches… just not the one I have. It does integrate with my Withings Scale to determine calories, which is great. It might someday integrate with something like DailyBurn or the FitBit, which would be extra cool. I’m hoping that once I figure out how to upload the FT60 stuff to the polar website, I’ll figure out a way to integrate that into RunKeeper – but that may be a ways out.

Nike+ iPod

I’m also fond of Nike+. I’ve used it since I got my old-tyme (Gen 2?) Nano, and use it now on my iPhone. Polar recently came out with a new HRM strap which is supposed to work with Nike+ enabled devices, and I bought one. Turns out it works specifically with the Nike+ armband and the Generation 5 iPod Nano, but nothing else. So I can’t directly integrate it with my iPhone Nike+ runs, which kind of sucks. I’m considering getting a Gen5 Nano just so that I can use it for runs (the iPhone is a little large for using with runs, anyhow), but I don’t know that I want to put out the money. It does have an awful lot of my running history, which is compelling. I also wish it would track other kinds of workouts for me.

Summary

What I want doesn’t seem so outrageous. But here I find myself, with lots of new and old data at Nike+, some upcoming data to be available on the Polar site, an abiding fondness for RunKeeper along with some interest in using something more social like dailyburn.com… and no good way to integrate them all together. Integration is coming along for many of these things, albeit slowly.

I’m probably just going to buy a WearLink so that I can try the Polar site, and track my runs both with Nike+ and RunKeeper for a while. If and when I end up being sad at the lack of sharing of the Polar data, I’ll suck it up and get a refurbished Nano so that I can see how Nike+ integrates the heart rate information. The best possible case would probably be for RunKeeper to consume the polar heart rate data and integrate it with my workouts.

Accessing Amazon’s Product Advertising API with Python

Posted in Uncategorized on February 10th, 2010 by admin – 2 Comments

I’m working on a little hacky toy for our upcoming hack day at work, and one of the pieces requires that I get some info from the Amazon “REST” API. It’s not REST in the least, but that’s not what I’m here to talk about. I’m here to talk about creating a signed request which works with the “Amazon Signature 2″ format needed for the API. There’s a Perl library to do everything with the API, which is great if that’s what you’re looking for, but it wasn’t. I just wanted to sign a simple static request to get information about books for which I had the ISBN. No Python library exists, but fortunately if you’re using Python 2.5+ you’ve got everything you need with very little code. I’m including it here to save you the effort of pulling together the pieces yourself.

# Create a signed request to use Amazon's API
import base64
import hmac
import urllib, urlparse
import time

from hashlib import sha256 as sha256

AWS_ACCESS_KEY_ID = 'XXX'
AWS_SECRET_ACCESS_KEY = 'YYY'
hmac = hmac.new(AWS_SECRET_ACCESS_KEY, digestmod=sha256)

def getSignedUrl(params):
    action = 'GET'
    server = "webservices.amazon.com"
    path = "/onca/xml"

    params['Version'] = '2009-11-02'
    params['AWSAccessKeyId'] = AWS_ACCESS_KEY_ID
    params['Service'] = 'AWSECommerceService'
    params['Timestamp'] = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())

    # Now sort by keys and make the param string
    key_values = [(urllib.quote(k), urllib.quote(v)) for k,v in params.items()]
    key_values.sort()

    # Combine key value pairs into a string.
    paramstring = '&'.join(['%s=%s' % (k, v) for k, v in key_values])
    urlstring = "http://" + server + path + "?" + \
        ('&'.join(['%s=%s' % (k, v) for k, v in key_values]))

    # Add the method and path (always the same, how RESTy!) and get it ready to sign
    hmac.update(action + "\n" + server + "\n" + path + "\n" + paramstring)

    # Sign it up and make the url string
    urlstring = urlstring + "&Signature="+\
        urllib.quote(base64.encodestring(hmac.digest()).strip())

    return urlstring

if __name__ == "__main__":
    params = {'ResponseGroup':'Small,BrowseNodes,Reviews,EditorialReview,AlternateVersions',
                     'AssociateTag':'xxx-20',
                     'Operation':'ItemLookup',
                     'SearchIndex':'Books', 
                     'IdType':'ISBN',
                     'ItemId':'9780385086950'}
    url = getSignedUrl(params)
    print url

The End of a Decade?

Posted in Uncategorized on December 14th, 2009 by admin – Be the first to comment

Ah, here we are in the last month of the last year of the decade. Well, technically we’re really not. We get to spend this delightful month (and the one next year) debating over which one is really “The end of a decade.”

I know that people, in general, start counting at one. And the “first year of our calendar” was “1″, not “0″. So techincally, the decades since the start of our calendar should be considered as “1…0″, in which case we’ve got another year to go before the end of this decade. The more pedantic among us will be happy to make this argument *every single time* we hit “9″ on the terminal year digit. And each and every time it’s a fascinating argument to endure.

However, I have a different perspective. A decade is a series of 10 years. It doesn’t have to be “the 10 years defined as 1..0″. A decade could be every 10 years that ends with a year ending in 5. And the way we refer to our decades (the 50′s, the 60′s, the 90′s) it really makes more sense to think that we’re talking about the tens digit number, not some specific mathematical distance from the beginning of the calendar.

So count it how you like. I think it’s reasonable to say that years that started with 195 were the 1950′s. I think it’s fine to celebrate the new millenium when we change 3 different numbers on the calendar, instead of the next one. Decades can be defined arbitrarily, so despite the fact that I love this debate topic *rolls eyes* I think we can move on to other more ground shaking discussions. You say to-may-to…

Tone Deaf Content Owners

Posted in Uncategorized on December 10th, 2009 by admin – Be the first to comment

Today I learned that Simon and Schuster plans to delay publishing of their e-books for months beyond the hardcover date. How clever! I’m sure they think that we, the consumers, will think this is just dandy and fork over $27 for their hardbound books and they’ll once again be rolling in cash.

I have some bad news for S&S, though. The world has changed. In this economy it is a brave, brave thing to assume that people will spend three times the amount they *want* to spend just to get something right now. We, the consumers, are getting better at stretching our dollars, and we’re unlikely to wholeheartedly accept this kind of reversal.

Let’s take as an example my family. Thanks to Netflix, we are very selective about the DVDs we buy to keep. Two years ago we probably bought over fifty DVDs. This year, we have chosen two phenomenal movies to keep in our house on DVD. We have similarly trimmed down our purchase of books. We use the library heavily (yes, one must be patient, but it’s free), and buy very few books – the ones we do buy are generally from the used book store.

Sometimes we do buy hardbound versions of new books about which we’re particularly excited. But what happens to those books after we read them? Our circle of friends tends to be excited about the same books, so one person buys the hard cover (on sale) and then we pass it around to 8 of our friends, so if we paid $24 for that book, the publisher gets $3 apiece for all those people reading the book. Half of those friends have Kindles. Sometimes the Kindle users (like me) get impatient with the waiting and buy the ebook version (heck, it’s only $10, and I really want to read this book *now*), netting the publisher a few extra dollars. Without the option to purchase an ebook version (which has other advantages for me) I’ll just wait my turn patiently and read the “real book.”

Let’s get real, S&S. Do you not understand that your shrinking hardback sales are because people don’t have as much money to buy your books? There’s a huge advantage for you in the ebook market – in most cases there is only one copy which is tied to a single device. The number of times I’ve shared my Kindle with other people so they could share a book I’d bought? Zero. You’re virtually guaranteed that my $10 matches exactly to one reader and no more. Why would you give this up? Forcing people to buy hardback versions of your book (or wait for the ebook) will not engender good will among your customers.

Besides, four months is long enough that I’m virtually guaranteed of getting it from the library. For free. Or finding it at a used book store. Or borrowing it from a friend.

So, good luck with your attempt at boosting your hardcover book sales. The music industry tried some similar strategies to limit digital delivery, and it didn’t work very well for them. Let me know how it works out for you, ok?

Falling into Autumn

Posted in Uncategorized on September 14th, 2009 by admin – Be the first to comment

I’ve started a new job at Netflix (hurray!), making sure that our partner branded apps get certified quickly and effectively, and ensuring that our API meets their needs. It’s a great job, and I’m having a wonderful time. Netflix is exactly the kind of company I want to work for. You might have noticed, my imaginary computer friends, that I haven’t been blogging, but this is just because all the synapses in my brain have been occupied with the effort of ramping up on my new job. I’m no longer a telecommuter, but I do have a “corner office” with a “window” so that’s pretty excellent.

I’ve been scrambling recently with my “real life” and I realized that September is always like this – back to school this, boy scout that, prepare for holiday the other thing, just generally full of events. Having started back to martial arts (at Elite in Scotts Valley) even my unscheduled evenings are scheduled.

So, let’s see what this week looks like. Today my lunch hour will be spent at the Federal Building in San Jose with the Chapter 13 Bankruptcy Trustee. Tonight is unscheduled, so I will head home, make some dinner, eat said dinner, go to martial arts, and then help the Boy with his homework. Then maybe we’ll have time to play a game or watch a movie.

Tomorrow is work-from-home day, which is great because it means I can take the Boy both to the Dentist and to the Doctor while getting my work done. Then he has Boy Scouts. And I may go to martial arts.

Wednesday looks like today. Thursday night Victoria and I are headed to a friend’s house to do henna. Friday I’ve scheduled and need to run her menarche ritual. Thankfully I’ve already bought all the things I need for that, although I still need to print out all the parts and gather together the pieces. And order a cake.

During the weekends I tend to feel guilty if I don’t “do things”, but perhaps I need to do a better job of reminding myself that a day of rest is not just for world-builders. Hanging out with my family is valuable, and models sane behavior. We all need to reset our brains and spirits or we run the risk of forgetting why we’re doing the things we’re doing.

Ignite! Talks at OSCON

Posted in Uncategorized on July 22nd, 2009 by synedra – Be the first to comment

OSCON has always had a big kickoff event on Tuesday night, to get everyone ready before the keynotes and sessions get started on Wednesday.  Last night they used this time to present their first ever Ignite event, and it was excellent – one of the most engaging and fun kickoff events I’ve seen at an OSCON.

The lineup was varied, and the topics were refreshingly diverse.  Jet packs and Nigerian elections, Kindle hacking and film ratings – the combination kept the audience engaged, and entertained.  The presenters did an excellent job of staying within the ignite format (20 slides,15 seconds each slide, advanced automatically, 5 minutes total).  
Jesse gave the first talk, which was the most technical.  It’s amazing to think of the Kindle as a platform that can be hacked – for anyone interested in the topic, I have a feeling Jesse will be happy to talk to folks during the rest of the conference.  You can play the old adventure game on his kindle – although I couldn’t remember how to get into the house.  
Skud followed with an entertaining glance into the world of textiles, and Liz Henry gave a truly inspiring talk about wheelchairs as hackable vehicles (as opposed to boring medical devices). 
Julian Cash’s overview of his photography was, as always, incredible.  He is doing more OSCON pictures this year, in room G, so stop by and get a portrait done with him.  His perspective and artistry add so much to our community, and he is a wonderful person to talk to as well.
Sandy Jen’s discussion of the Open Source used at Meebo was very entertaining – Open Source is such a great idea in theory (and in practice, once you work out the kinks).  The space between the theory and the practice is frequently fraught with amusing stories, and she told hers well.
I was hugely inspired by Dan Meyer’s ideas about open sourcing his teaching methods.  I have long been interested in enabling shared knowledge among teachers, and I will definitely be following his work to see where I can contribute.
I was fascinated by Selena Deckleman’s story of the election work she did in Nigeria, and hugely entertained by Erica Olsen’s suggested movie rating system.  I also feel it’s necessary to know if I’m watching a movie with a Xenu-inspired script.  
Damian, of course, was hilarious (as he always is).  And he actually stayed within the 5 minutes, which I think is some sort of new record.
A great evening, and great job by the OSCON team!

Graph Databases are the New Black

Posted in Uncategorized on June 19th, 2009 by synedra – 1 Comment

When I started working on computers, the main thing people used databases for was storing tabular data.  Sales reports, inventory records, lists of things.  Relational databases were cool because you could associate a transaction in your sales table with an item in your inventory table.  As the internet has grown, however, our database needs have outgrown the abilities of the standard relational database system.  Social networks are a great example of this – the type of query needed to ask for six degrees of Kevin Bacon separation in a relational database is complex, resource intensive, and extremely time consuming.  Many very smart people have come up with ways to work around this problem, but the real problem is that this type of question is not what relational databases are designed to handle.

Graph databases, on the other hand, are optimized for exactly this type of question.  The problem with graph databases is that it’s a whole different data structure that we’ve got to wrap our minds around, and it’s difficult to do that without some starting place.  Freebase is a publicly  accessible, open graph database, available for people to use as the back end for their applications.  They’ve even created a suite of tools to make it easier to build fun things on top of their extensive data. They will be giving a tutorial on Semantic Technologies at OSCON, and if you have any interest in learning about graph structure and what you can do with it, you should definitely check it out.
If you want a more data-agnostic view of graph technologies, or want to try installing a graph database on your own, you can learn about Neo4J, an open source graph database, on Wednesday afternoon.

Open Source iPhone Development at OSCON

Posted in Uncategorized on June 10th, 2009 by synedra – Be the first to comment

Developing applications for mobile devices is often a daunting thought for those of us more comfortable in the land of high-level languages.  However, in the wake of the new iPhone announcement, I thought I would check out the mobile development offerings at OSCON to see if there was anything I could sink my teeth into.  It turns out that it’s become much easier to create content for the iPhone without having to turn to objective C.

The most intriguing tutorial I found was an introduction to the PhoneGap project, a platform which makes it easy for developers to create applications which work on the iPhone as well as several other mobile platforms.  A developer creates a web application using Javascript/HTML, and the framework provides a wrapper for this application which works as a native application on the mobile device.  The tutorial covers development under PhoneGap as well as the administrivia needed to get the resulting application into the App Store.  I was curious about how well this kind of framework could work for general iPhone applications, so I browsed through their applications page and found a variety of applications including highly rated games and locationally-aware utilities.  I’ll be excited to hear more about it at OSCON so I can get started playing with it.
I do have a macintosh, which has up until now been a requirement for most iPhone development – but for those of you who aren’t in the Cult of Jobs, another tutorial gives you the information you need to develop for the iPhone using open source tools on Linux or Windows.
Later in the week, Ian Dees will be talking about testing your iPhone apps using Ruby and Cucumber, and Patrick Collson will be telling you how to turn your iPhone into the Hitchhiker’s Guide to the Galaxy.  OK, actually he’ll just be talking about how they managed to cram Wikipedia into the iPhone, but it’s pretty much the same thing, isn’t it?
Of course, you still have to get a developer’s license from Apple before you can create an installable application for the iPhone.  If you’re curious about iPhone development, these sessions should help you decide if you want to jump in and give it a try.  

Taking my application by LoadStorm

Posted in Uncategorized on May 19th, 2009 by synedra – Be the first to comment

One of my work projects has gotten to the point where we really need to have some performance numbers under stress.  I played with The Grinder, poked at JUnit, and looked around at some of the other tools out there.  I was limited by the fact that I only have one system, and it’s very hard to make a single system look like a hundred systems… and real load testing works best when you have multiple clients whacking on the system for you.

So, given my previous experience setting up parallel processing things on Amazon Web Services using hadoop, I thought perhaps I should just build a new system using AWS.  But that seemed like a lot of up front work considering that the actual questions we were trying to answer were “How many concurrent users can the system handle?” and “What happens when you go over that limit?”  Simple enough questions, and hard to justify tens of man hours putting together a new prototype just to answer them.
So, despite my engineery heart insisting that anything Not Invented Here couldn’t possibly do the job, I poked around half-heartedly looking for an existing system to do what I needed.  And lo and behold, I found one!  LoadStorm is a web-based SAAS which does load/stress/performance testing for your system.  It’s free for up to 100 users/minute (and up to 60 minutes), and you can give it multiple steps for each of your users to do (along with some random wait time to better emulate real people).
LoadStorm has a reasonably friendly front-end for setting up your servers and tests, but where it really shines is in the analysis – manager-friendly charts and graphs to make the testing results palatable to the people who really need to understand them.  Their team is extremely attentive and helpful, and I would highly recommend them to anyone curious about the outer bounds of their system’s capabilities.
I was able to use LoadStorm to quantify the improvement we gained by making a structural change to the system, in an easy-to-understand format.  Playing with it further has given me a much stronger understanding of the strengths and weaknesses of our system.
Like I said, highly recommended.  Screenshots below.
users.jpg
errors.jpg