I was accepted to participate in the Google Android Hackathon that took place on Saturday. All week, I mulled over my knowledge of the subset of Android that I’ve used, and planned out an idea for the pitch (which turned out to be unneeded). I drove up there being nervous about my skills and hoping I could get a rough demo going. But when I got there, I realized it was an excuse to spend a day at the Google campus.
The reputation they have for the food they provide is well deserved. I had apple wood smoked bacon, Straus yogurt, local wild honey, and persimmons for breakfast; tuna poke, taro chips (mmmm, salty!), and purple carrots for dinner; TCHO chocolate while hacking; and jasmine tea and sparkling water from the fountain all day. That was just a fraction of what was available (HOW could anyone eat pizza with that poke sitting there, I mean srsly???). It was worth going just for the food–heck, it was worth going just to sit on one of those heated toilet seats.
But I came to hack. We were given an assignment, some sample data, a method to incorporate, and a suggested timeline. I chose to go off the timeline, because part of the core functionality–drawing into the canvas of a custom component–was familiar to me, while app navigation was not. We were only allowed to access the Android developer site and Stack Overflow, but we were allowed to ask for help from the proctors if we got stuck. I only needed fresh eyes once; I had forgotten that View subclasses need the two arg constructor when they are being inflated from XML. Other than that, I bumbled along quite nicely.
The new R22 tools, which I’d upgraded to the night before, offered me a wizard to create my app with two pane navigation for tablets. That was one of the “extra” tasks in the assignment right there. I was a bit confused by the dummy content the wizard created for the list. I thought I should get rid of it, but since when hacking Android I tend to waste a lot of time trying to figure out the correct way to do something when either a) there is no correct way or b) the correct way was my first thought that I had dismissed, I tweaked it and used it. I spent a little bit of time panicking and flailing, but since I was under the clock, I told myself to do something that works and move on–a valuable lesson. Unfortunately, I didn’t do that with the two arg constructor issue. I let at least forty five minutes go down the drain before I spoke up, so I went into the “easy” part–drawing text into the canvas–shaken and under last minute pressure, and it took its toll. I implemented at least two new things, though: a TypedArray resource, and a form. So I did fairly well despite my mistake.
The judges were encouraging. When I told them about my kernel adventures, they suggested I look into the NDK. It’s been on my Round Tuit list ever since I learned it existed. Well, after seeing just what I can accomplish in eight hours and knowing that, with a little practice, I can accomplish more, I’ll definitely be looking into more Android. I still have that demo plan.
Oh, and the swag bag. I figured there would be the t-shirt and a plastic Andy toy, and maybe a journal.
If they’re going to bribe me like this, then heck yeah.