Tuesday, November 4, 2008

What has 6 wheels, 4 feet, 1 motor, and lots of free time?

It's election day, and one topic that is on a lot of people's minds is energy, oil, and clean transportation. What's the solution? Electric vehicles? Car pooling? Bicycles? Skateboards? Randall Munroe and I decided to try all four at once. Here's a quick video of Randy on his electric skateboard holding onto a nylon strap tied to my bike carrying me holding a camera.

This turns out to be an extremely fun, albeit a little bit scary, method of travel. We all have to do our part to conserve energy. If commuting to work this way is what I have to do, well, I'm comfortable with that.

Wednesday, August 20, 2008

Google Maps developers enjoy extremely long walks through several beaches

It's quite possible that not a lot people reading this post have ever heard of MacDiarmid, Ontario, considering it's so small that I can't even find a population for it. I did find the population of Greenstone, Ontario, the township which encompasses MacDairmid and seven other communities. Greenstone's population is a solid 4,906 people. MacDiarmid is probably among the smaller half being one of four that don't have their own Wikipedia entry. I imagine that this puts their population right around the readership of my blog.

That being said, it's not entirely out of the question that there are MacDiarmid residents reading my blog. Actually it's entirely possible that as soon as this post goes up I will be the first Google search result for MacDiarmid. Especially if I say MacDiarmid enough. Now that I've convinced myself that I'm not totally wasting my time, I'd like to give some navigational advice, if I may, to the people of MacDiarmid.

If you're planning on taking a trip from MacDiarmid to Shebandowan, Ontario, it's a nice, three-hour drive down the Trans Canadian Highway, hugging the shore of scenic Lake Superior. A quick Google Maps look up will provide you with a handy, eight-turn route, and if you leave right after work, you'll be there in time for super.

MacDiarmid has a reputation for being a vacation destination for lovers of the great outdoors. It's likely you may be interesting in planning your Shebandowan trip as a hike or a bike ride. If so it'll probably be pretty tempting to click that new, convenient, little drop down to use Google Map's new walking directions feature. But if you live in MacDiarmid I highly recommend you get a second opinion first. Unless of course you're interested in heading down through the U.S. to circumnavigate the Great Lakes.

The entire walking trip from MacDiarmid to Shebandowan takes a brisk 25 days and 16 hours assuming you don't take any naps or stop for food. It covers 3,203km which is almost 14 times the distance that you'd travel in a car. On your way, you will pass though three U.S. states, take two ferry rides, and visit such major cities as Detroit and Milwaukee. Not to mention two border crossings. Don't forget to bring your passport!

Naively, one would guess that the walking directions from one place to another would be at most as long as the driving directions due to one-way streets and highways that wind around dense areas; this is a bit of city bias speaking. In some cases like these, however, there are un-walkable highways that are the only remotely direct route between two places. Though if you ask me, I'd prefer a little more rough hike through the woods to a 25 day hike with no rest. Maybe Google Maps developers are more adventurous than I am. Maybe they just get more vacation time.

There are definitely pairs of locations that Google considers unable to be connected via walking. I wonder what other kinds trips are possible to walk but have a similarly dramatic factor increase in walking distance. Can anyone find any that are bigger?

Wednesday, July 16, 2008

Catty Scrap Cannon

A couple of weeks ago I was in Pennsylvania with Jeff and Sean, and you know what that means. Destroying things in order to building things which will eventually be used destroy things. A few months ago Sean got a long and very thick steel pipe in at the scrap yard. He saved it aside until Jeff and my next visit with the plans of turning it into a cannon. This sounded pretty dangerous to me so I, as always, was prepared with my camera, just in case anyone got hurt. Have you ever had the experience of hearing such a loud sound that it actually made you temporarily deaf? I think two weeks ago was my first actual experience with this.

Monday, June 9, 2008

Round written up in the NY Times.

I just wanted to post a quick note that Round has been written up by the NY Times. Here's the article on their website.

Monday, May 26, 2008

Province Town Century

If you're not a avid cyclist, a computer programmer, a Free-Software enthusiast, and from around the Boston area, then you've probably never even heard of the Tour De Nat. The Tour De Nat is a one-day, 120 mile bike ride from Boston's South station to Province Town, MA followed by a ride on the day's final ferry back to South Station just in time to go out drinking.

Last summer Owen and I took this ride ourselves with a few adjustments. For starters we didn't plan to take the final ferry back the day we arrived. We planned a camping trip around our ride with several other friends. Secondly, we started from Braintree T station, the end of the Red Line, to cut out the cross-city ride and then took a less-direct, more scenic route across the South Shore.



When we began planning the camping trip, we realized we didn't have many friends who drove, so space in cars was at a premium. We ask the rest of them what was more important to ensure made it to the camp ground safely, the tents or Owen and I. The group unanimously voted on the tents so Owen and I had to find another way to get to the Cape. We spent the next couple of months trying to figure out what to do but with Owen's time warp portal only in pre-Alpha stage and the trebuchet being as weak as it is, we figured the only other option we had was to bike it. At least we wouldn't have to bike with tents.

We spent the summer training. Owen and I went on a 40-mile ride right at the beginning of the summer for a quick warm up. I continued this regiment by spending the summer programming and building things out of PVC while Owen chose to focus more on the riding aspect of the ride for his training. He took several more lengthy, one-day rides over the course of the summer but made to sure to keep me updated so that I wouldn't miss out on that part of the training.

The day of the trip approached and we were ready. We got up at about 5:00am to take the Red Line down to Braintree. We weaved across the South Shore on our circuitous path, hoping to, at some point make it to the Sagamore Bridge. With nothing to guide us but our wits, sense of direction, street signs, highway markers, a map, and a Garmin etrex GPS device, we set off into the great known, bound for adventure or at least a few cramps. We occasionally stopped off along the side of the road to get pictures, take some video.

Let me give you some advice if you're driving a car on route 6A down the Cape. If you see a cyclist riding in front of you, don't assume he's going to turn off any minute now; just pass him. I realize you're old and the road is narrow but seriously, you're holding up a line of ten cars.

Camping in Province Town was a blast. The town has a great strip with lots of nice places to eat and more than its fair share of celebrity look-a-like cross dressers. The beaches were beautiful and if you get to the park services office at 9:00am you can get in line to get a fire permit for the beach of your choice which they will happily give you when they open at 4:00pm.

The ferry ride home was rather expensive but well worth it. For starters, it's a lot quicker than driving or riding a bicycle. Secondly, you can bring your bike on the ferry. One of the things about a century ride is that unless you're lucky, the second half of the ride is pretty much just the first half in reverse. It's nice to be able to take a long ride straight away from your origin and then magically (ferries count as magic) appear back where you started after you're done. The view on the bay was nice and I got a couple nice shots of the Boston skyline as we strolled into the harbor.

That's my report. Owen grabbed our statistics from his GPS device:

Total distance: 108.23
Time moving: 7:44:57
Time elapsed (includes train ride from Davis to Braintree and lunch): 12:30
Average speed: 14.0
Max speed: 31.0

Not bad. We plan to do it again this summer. If you're interested in joining us, let me know.


View Larger Map

Monday, April 21, 2008

What a lot of people don't know about what makes software interesting.

I had a quick conversation with a grocery-store cashier yesterday that stuck with me for a while. He overheard Sarah and I talking about some technical stuff that piqued his interest and it came out that I was a software developer. He seemed pretty interested in that and asked me what kinds of projects I write. I mentioned that most recently I had written software for a museum installation and that for my full time job I work at a software company where I write software for doctor's offices.

His response was what stuck with me. He mentioned how it was nice for me to have some interesting side-projects to fill in the gaps I that must have from my boring day job. I didn't get into this with him due to the brevity of our conversation but I think his response is indicative of a very commonly held misconception about software development.

The irony of it is that if we're just considering the amount of rewarding technical challenges and interesting design decisions, his notions about the two projects are pretty much the exact opposite of reality. As fun an interesting as the museum installation, Round, has been for me, it's really not all that technically interesting. I'm not going to say it was easy for me but most of the reason that it was challenging was for two major issues. The first being that I had to learn a lot of new things as a result of being the only technical person on the project. Secondly I had relatively very little time to cram in all the work since I have another job.

On the other hand when it came to system design decisions, algorithms, abstraction decisions, code organization, or any of the important things we learn in a computer science degree, the decisions on Round were pretty straight forward. This comes in direct contrast to my day job, which I am very happy to say, provides very challenging and interesting problems.

Currently I work on a contract modeling system that enables doctors to analyze the contracts that they have with health-care insurance companies, cross reference them with their billing history, and figure out if they are being underpaid. I'm sure for anyone that is not a computer scientist this sounds incredibly boring. It's actually very fitting that it would considering the nature of the computing world. We invented computers specifically to do our boring work for us. It seems obvious that the work they do would sound boring. It's rare for a computer to get to spend it's CPU cycles on something fun an exciting like playing Chess. Such computers should consider themselves very lucky.

The challenges involved with the contract modeling project range from designing fast algorithms for cross referencing with billing history, creative mechanisms for caching previously computed values when the user will not be slowed down by the computation, and most importantly, the design of a sufficiently expressive language and interface for modeling the contracts that will not destroy the performance of the aforementioned algorithms. The work involves a lot of engineering and creativity as well as a lot of collaboration with other developers and non-developers alike.

Now don't get me wrong, writing Round was very interesting for me. I had total design control over the project, which is always nice and I had some creative input on the user interface and audio. I also learned new technologies which were really fun to use but really the allure to this project was that the result was fun. I was making art and helping my friend see his own art career come to fruition. It was (in direct contrast to my day job) something that my friends could go see and say "Wow, Mike, this project is really cool." It's a project that I personally enjoy using a lot.

Since none of my friends, save Todd, are doctors I don't really get that from my work. Actually I myself have no use for the software that I write at work, but that's not important. It's fascinating and it's solving a real-world problem. The state of health care in the United States, in my opinion, is on the verge of a logistical crisis, and has been for years. The company that I work for, AthenaHealth, is working to fix what it can with really good technology.

It does feel good to be working to solve a problem that effects us all on a political level and it's true that if a company's goals were too far off or even opposed to my own, I would not do the work. But I honestly, feeling good about the cause is mostly an ancillary benefit. For me, it's all about the technical challenge, not the result. I think most programmers would agree with me here. It just goes to show that you really can't conflate how interesting a software project is with how exciting the result is.

Friday, March 21, 2008

Hearing Voices

It's been a long while since my last post. Most of the reason for this is that for the last three months I've spent all of my free time working on a project called Round, which is now on exhibit at the Aldrich Contemporary Art Museum in Ridgefield, CT. Round is an audio installation, by Halsey Burgund, which solicits spoken voice contributions from visitors and uses them as part of a musical composition intended to be listened to while viewing the other exhibitions.

Visitors to the museum can pick up a wireless tablet and a pair of headphones from the front desk. The guard enters in their gender, approximate age, and the fact that they are a visitor into the device before handing it off. The device guides the user through a simple touchscreen interface asking them which exhibit and artwork they are looking at. The device then plays a music piece, composed by Halsey, along with voice comments about the chosen work of art. Users are able to limit the voices by age range, gender, and whether the comments are from the artist, curator, or another visitor.

The mechanism for playing the voice samples is perhaps the most interesting part of Round. Comments are not played in any particular order; they're not even played in their entirety but rather randomly sampled. Come to think of it there's not a whole lot about Round that isn't random. The voice clips are played for a random amount of time, starting from a random point in the clip, with a random amount of dead air between each one. The clips fade in for a random amount of time to a random volume level and then back back out for a random amount of time. There are two separate streams of voices so it's possible to hear more than one voice at a time and each stream randomly pans from left to right as the piece plays.

Round puts the museum visitor into an audio space that transcends time. When you listen to the piece you are hearing everyone who has ever been to the museum and talked about the art that you're looking at. The fading in and out and stereo panning gives the feeling that you're hearing bits of conversations as all the past visitors pass by you.

The exhibit opened this past Sunday so I took the trip down to Connecticut with Halsey, his girlfriend Laura, and an entourage of my nine most supporting friends to go to the reception. Brian's parents happen to live near the museum so Sarah, Emma, Trevor, Owen and I stayed over night. Nicolle, Jeff, Bob, and Chessie all showed up the day of.

Development for Round really came down to the wire. It wasn't until the morning before the opening that I rewrote the entire server to use Icecast rather raw TCP streams in order to make the kiosk version work. During the previous week we discovered that Halsey's commercial audio composition software was crashing if run for more than a few days. And at with just one hour to go before the opening, we discovered that inserting headphones into the device caused the mic to stop working. Now this is something we had tested throughly ahead of time and seemed to be pretty random as to whether or not it happened at all. Dealing with enumerable unforeseeable issues like these is enough to make anyone start hearing voice. Luckily for us that was our goal to begin with.

Despite our nerves, last minute hacks, and never ending surprises, the exhibit actually went really well. The visitors seemed to enjoy it and there were no major technical failures that the users knew about. I can remember my first sigh of relief coming when I saw an early group of visitors walking around the museum listening to the piece. The were listening, smiling, and looking at the art, rather than starring in frustration at a broken device. It felt really good.

After the reception Halsey and I spoke to Lisa Delgado, a reporter from Rhizome, which is an art and technology blog. She wrote an article about the piece called Guided by Voices.

As far as technical details go, Round is developed entirely in Python using GStreamer. The device we're using is Nokia N800, which I chose primarily for the fact that it runs entirely free and open source software. Having a device where one can really open up and hack the internals is pretty critical for any project that's as specialized as Round. Roundware, the software use to run the project, has been released under the GPL at sourceforge.net

After deciding on the device Halsey ventured to send some emails around and see if Nokia might be interested in donating the devices for use at the museum. As it turns out, they did, so Halsey and I would like to extend a big thank you to Nokia for that. I'd also like to thank Owen Williams, a good friend of mine, whose knowledge of Python and GStreamer really helped me expedite my development process. To that end I'd also like to thank the good people of the GStreamer IRC channel and mailing list for their endless patients and key insights.

Finally I'd like to thank my nine awesome friends who took the time to come all the way down to the other side of Connecticut just to see our project and be supportive and Brian's parents for housing all of us for the night.

Monday, January 14, 2008

Catty Scrap Tall Bike

Several weeks ago I was in Pennsylvania visiting my friends Sean and Nicolle again. This time I went down there with a great idea, which, like all of my other great ideas, was actually just a really bad idea backed up with a whole lot of zeal.

The idea was to rummage around in Sean's scrap metal yard for discarded bicycles and weld them together into one giant bicycle. Building a tall bike is a pretty straight-forward process if one has access to just a couple of suitable bike frames and knows how to weld. If one has access and endless supply of unsuitable bike frames and knows someone who has seen someone else weld, the process is significantly less straight forward.

We spent the first day piling up bikes that we found in the yard and discussing plans at the Allentown Brew Works, which was hosting their annual Brew Fest while I was in town. Keep in mind, inspiration comes faster when you're drunk and in Pennsylvania. I had found a couple of similar size BMX bikes and noticed that they both had those distinctive four-bolt handle-bar clamps and the handle bars with a cross bar on top. Sean and I decided it would be cool to take one BMX bike and flip it up-side down on top of another BMX bike. We'd take the handle bars off of the top one and use its clamp to hold onto the cross bar of the bottom bike's handle bars.

I thought that if we did this, the two seat tubes would line up and I'd be able to put a seat post through both to connect them, but I was wrong. So we took the plastic off of one seat and arc welded the remaining metal wire to the up-side-down bike. This allowed us to connect a regular seat tube to the top bike and slide it into the seat post of the bottom bike. I like to think of it as a bike that has a bike for a seat.

We then had a bike with pedals three feet off the ground, a fork for handle bars, and no place to sit. We solved the handle-bar problem no sweat. We just took another fork and connected it right-side up to the up-side down one. The existing wheel and axle made a perfect connector for the two forks so that's why there's a decorative, fourth wheel on top of the bike.

Now for the real challenge, where do you sit? We both agreed that putting my weight on that little seat-wire-welding number we whipped up earlier would probably cause my death, so we decided to cut the seat tube off of another bike and weld it up right coming out of the bottom bike. To brace it we drilled a huge hole through the bottom bracket of that same bike to put the seat tube through and welded the chain stays to the bottom bike for support. We found an extra long seat post in the yard to toss in there and presto! A very high seat.

Then we realized the major problem. The frame was in the way of running a chain from the crank to the rear hub because it was designed to have the chain go out the back. Now anyone reading this is probably thinking to themselves "Oh that's easy. Put the top bike's chain stays in a vice over night and force them apart. Then stick a five-speed mountain bike wheel with a cassette in the newly widened frame, run a chain from the crank back to the cassette, and finally run a second chain from the cassette down to the rear hub." Now, I admit that, in retrospect, we should have thought of that sooner but it was late and we weren't really thinking all that clearly (which we probably can't blame on the late hour.)

The bike was complete and there was only one thing left to do. I put on some thick gloves in case I had to brace myself during a fall and Nicolle got ready with the video camera in case anything more dangerous happened. As soon as I got on for the first time it was obvious that the bike would immediately do a wheely if I put any weight on the seat. It was so high up that it was behind the rear wheel, causing the seat post to act like a big lever. So we figured what, the heck? Toss a couple 20 lbs. weights on the front handle bars. It's not like we're going to being winning the Tour de France on this thing.

The first few trial rides revealed a flaw in the vertical chain. There was no way to tension the chain so it kept falling off. We added a derailer to try to pull up the slack. This fixed the problem enough to ride but it was still error prone and fell off fairly often causing the bike to lose speed, stall, and ditch its pilot.

We ended up using parts from six different bikes, two whole frames, one extra fork, one set of hacked up frame parts, an extra five-speed hub, a derailer, a seat, and a bunch of spare chains. I admit it wasn't pretty but it was so beautiful. Next time I visit we'll try to fix the chain situation.