Friday, November 08, 2013

A Total Zero. Running to the DC Zero Milestone

For years I've wanted to track down the Zero Milestone located in Washington, DC. Unlike many blocks of granite in DC, the original vision for the Zero Milestone was purely functional:

When this marker was dedicated in 1923, it was expected that it would be the milestone from which all road distances in the U.S. would be reckoned. Obviously people in places like Oregon and California didn't like the idea that their road markers would begin and end in the 3,000s, and the idea was scrapped. Now the Zero Milestone only anchors roads distances in Washington, DC.

While completely impractical, I do love the regularity that would have come from having a universal mile marker. Whether you were in Alexandria, or Los Angeles, you'd have a common sense of distance.

Regardless, I've wanted to track it down. Last night, as I was running into DC, I found myself on Pennsylvania Avenue. My thought process suddenly ticked off the following facts: "The White House is located on Pennsylvania Avenue and the Zero Mile Marker is located near it." Before I knew it, I was charging forward in search of the milestone. The fact that it was dark, I didn't know where I was going and that I'd surely be late getting back to Shira were all not concerns in my hypoxic state.

Fortunately, it wasn't that tricky to find. If you ask nicely, Google Maps will tell you exactly where it is.

When I arrived, it was long past dark. So my photos are, well, awful.

But still, I was there. I wasn't particularly pleased when I routed my return trip with Google Navigation and it told me that I had an hour and 20 minute walk back to my starting point; as I only had 23 minutes left before my run was supposed to be over. But, I hauled my butt back as fast as I could, and for the second run in a row, I was late. But did make it back before Shira disappeared with the car. Whew.

Here's a few photos and the complete route:


View Run to the DC Zero Milestone in a larger map

Thursday, November 07, 2013

The Nest, Bringing Elegance To Your Thermostat

We've had a Nest Thermostat for a couple weeks now. Long enough that I've formed an opinion worth sharing on the blog.

The Nest, for the uninitiated, is a newfangled thermostat. That's right, the thing that you pretty much ignore (or fight endlessly with your spouse over) has received a massive makeover. The Nest strives to both look sleek, and more importantly, be brilliant. It wants to bring Artificial Intelligence to the problem of heating and cooling your home; effectively managing your furnace and AC through software. By doing so, it's pretty confident that it can be more efficient than the old style set-it-and-forget-it or programmable models.

So how does it do?

Well, after our relatively short stint with it, I can say they nailed the sleek part. Every part of the product, from the packaging, to the install, to the device itself, seems well designed. The thermostat, for example, has a bit more weight to it than an all plastic model, which means that it feels like a quality product. It has other nice touches, like a motion sensor that causes it turn on when you walk up to it. In many respects, it feels like a better designed Apple products than the actual Apple products I have in my house (an iPad and Mac-Mini).

And the sleekness isn't just about hardware. The software on the thermostat is as simple as you'd expect (turn dial to temperature; you're done). But more impressively, the web and Android apps are also clean and polished. That means that it's trivial to manage your thermostat from any room in the house, or any location in the world.

As for brilliance, the jury is still out. Shira's not a fan of devices that think they are smarter than she is. Still, she can fine tune the Nest whenever she wants; which she loves. We'll have to see overtime if the AI aspects of the device shine through. For example, it supposed to automatically detect if we're out of the house and adjust the thermostat accordingly. But I work from home, upstairs. So, how's it going to deal with that? At the very least, I can say that we don't feel like we're fighting with the AI. The Nest does what Shira tells it to do (unlike me, most of the time), and if it wants to try to be smart too, that's great.

Personally, I'm looking forward to the day when all our appliances have this same transparency and control as the Nest. Why can't I pre-heat the oven from upstairs? Or see exactly how much hot water I have left in the hot water heater? Would I like to know if our freezer is working overtime, or our fridge is too humid? Sure, why not. For years we've been talking about Smart Homes, whatever that means. But with the Nest, I'm finally getting a sense of how it may actually be useful.

So, is the Nest worth $250? From a hardware and software perspective, I'd say yes. Do you *need it*? Almost certainly not. But I'd be willing to be, it's the way of the future.

The Making of Jam Snob

It all started out innocuously enough. Our friends Jen and Eric were kind enough to bring us a wonderfully delicious meal in memory of my grandpa. Included in said meal was this:

That's right, homemade Blueberry, Congnac, Allspice jam.

Since that evening, I've been using it exclusively, relegating my usual Giant brand raspberry jam to the back of the fridge.

And this morning, I was greeted with the following sight after making a mid-morning snack PB&J sandwich:

And now what am I supposed to do?! Go back to that mass-produced non-cognac and allspice containing "Jam?!" But how?!

Thanks a lot Eric. No, seriously, thanks.

Wednesday, November 06, 2013

My Take Away on Malcom Gladwell's David and Goliath TED Talk

A couple weeks back I watched Malcom Gladwell's TED talk on David and Goliath. More recently, I've been making my way through A History of Weapons which is a mostly-hilarious take on weaponry from the beginning of time until around 1900. The TED talk is excellent, here watch it:

And what, you may ask, was my take away from this talk and the book I'm reading?

Was it the inspiration that small entities (be they individuals or organizations) can topple large ones (be it in business, politics or anywhere else), not out of luck, but out of their inherent and often overlooked skills? That *of course* David beat Goliath, looking at the facts, it would almost be hard for him to lose.

Nope. All this I know. In fact, it's essentially my day job (except instead of slaying giants, I write software that helps individuals and small companies slay the competition. OK, maybe not slay, but at least outperform.)

No, my big take away was this? Why haven't I learned to sling?!

You're telling me I can make a deadly weapon out of little more than some rope and a bit of fabric? What a hack. I'm in!

Luckily, there's Slinging.org, which is exactly what you think it is: a site that covers old-school slings (versus say, sling-shots) in great detail.

There's a wonderful collection of articles worth reading. Two useful places to start (from what I can tell) are: Making a Simple Sling and Slinging Advice for Beginners.

Of course, YouTube has a plethora of videos on the topic. Including videos like this one, that actually show how slinging may be useful for something other than putting out your or someone else's eye.

This all looks terrifically fun. The big challenge: finding a large 360 degree area where I can experiment with this wannabe hobby of mine without destroying life or property. Still, as soon as I find such a location, I'm totally in.

The Funny Thing About Virginia Electorial Politics

Look at this election map of the Governor's race in Virginia:

Pretty obvious what happened, right? The Red candidate smoked the Blue candidate, winning by a ridiculous margin.

Except that's not what happened all. The Blue candidate won by 55,420'ish votes (99.92% of precincts have reported in).

I almost feel bad for all those folks who live in Red counties and have to wake up to this map. But then again, I live in a a county that lean's so far to the left that they contributed 71% of their vote to the Blue guy. So around here, the election results seem right on track.

Tuesday, November 05, 2013

It's About Time: Running to the United States Naval Observatory

This evening I decided on an especially clear goal for my run. I wanted to run into DC and make my way to the United States Naval Observatory (USNO). Specifically, I wanted to grab a photo of the master clock they have running outside the grounds (where mere mortals can see it).

On the map, the route looked easy enough. The 7.5 mile trip would more than take up the hour of running I had planned, so I didn't have much margin for getting lost. You can imagine then, how disappointed I was when I got to my first potential short cut and found this gate:

Apparently it's not just the buildings of the Naval Observatory that are off limits, but the grounds as well. Rather than doing the smart thing, and running back home, I kept charging forward following the route suggested by the bigger streets on Google Maps. In relatively short order, I found my master clock:

At one point (around the 1890's) the Naval Observatory was indeed in the business of astronomical observation. However, that job has since been delegated to a more appropriate site. Another role, that of master time keeper, on the other hand has been going strong since 1830. That clock above may be for decoration, but the notion of being the master time source isn't. Especially given my new found appreciation for ship chronometers and clock parts, I found this site even more appealing.

And what's up with the import looking anchors in front of the USNO?

They get mentioned on the web, and they've been there since at least 1961, but other than that, I can find no further detail. Unlike the clock, they apparently are just decoration. Probably picked up from Pier One or something.

OK, I had the photo of the clock, now I just had one tiny detail, I needed to run my butt back to meet Shira before She drove off. I could have backtracked the way I came, but that's no fun. Instead, I looked at the map and saw what seemed to be some sort of connector that would loop me back around the USNO. Could it be off limits like my other shortcut? Probably, but it was my best shot.

I ran to said path and sure enough, I found an important looking guard station with no "Welcome Runners!" sign. As I was about to back track further and probably get even more off course, I saw two police officers and asked them about the connector. Sure enough, there was a trail that ran *next* to the gate. They pointed me the right direction and before I knew it I had found this:

The trail ended up being relatively short. Maybe even a couple hundred yards. However, after running the length that tracks near the fence above, it turns into pitch black woods. I had to bust out my cell phone flashlight app, and between that and Google Maps, make my way through the trail. I'm going to assume for the purposes of this story that this path is also haunted. All I know is that I could only see what was directly in front of me, and I was hoping this path would take me someplace sane.

It did. I popped out right where I needed to be and was able to truck it home. Had I not found the path, I'd probably still be out running around DC.

Here's the final route:


View To the Naval Observatory in a larger map

My only disappointment: the USNO is the home of the Vice President. I was so hoping I'd be jogging along and see Biden out watering the lawn in his boxer shorts. Alas, he was nowhere to be seen.

Monday, November 04, 2013

I've got the power! Review: Anker Astro 3E 10000mAh Portable Cell Phone Charger

During the work week, my cell phone is plugged into my computer nearly all day. That means that battery usage never drops below 80-90%. But on the weekend, and especially when traveling, I find that I can chew through the battery in what feels like a matter of hours. A couple Sundays ago I was fiddling exclusively with my phone in the morning, and by the afternoon it was completely out of battery juice.

A little poking around on the web taught me that there's such a thing as a portable cell phone charger. Essentially, this is little more than a battery that plugs into your cell phone to recharge its battery. Unfortunately, there's too many choices for which to pick! Do I want compact, inexpensive and low capacity or do I skip worrying about size and focus on one with lots of capacity?

In the end, I just went with the LifeHacker.com recommended Anker Astro 3E 10000mAh external battery. At 10,000mAh, it was supposed to charge my Galaxy SIII's 2,100mAh battery almost 5 times. I was hoping that this would finally put my battery woes to rest.

The Anker arrived and the size, as promised, is almost exactly the same as the Galaxy S3 itself:

The coiled cable, variety of tips and mesh travel bag all seem to be high quality. I thought about only carrying the one tip that I need for charging my phone, but the charger, cord and tips all fit in the mesh bag without a problem, so for now, I carry all the options. This is useful if I need to charge my Garmin GPS, which uses the large USB sized plug. Here's what the setup looks unpacked an packed:

This past Sunday, I had a chance to run the setup through its paces. I used my phone for web surfing in the morning, GPS tracking for a run, and photo editing throughout the day. By the time I was done with my run, my battery was at 44%. Throughout the day, as I noticed the battery usage dipping, I simply plugged in the phone to the battery and dropped it the man bag I was carrying. At the end of the day, I had 88% battery left on the phone, and 3 out of 4 bars still lit on the Anker backup battery.

I'm sold. For someone who uses his cell phone for a heck of a lot, this may be my best purchase in a long, long time.

As for surprises, the Anker didn't have many. I expected relatively compact size and quality, and that's what I got. The only real surprise I had was just how fast this sucker can charge my phone. I guess I'm used to USB charging, which is inherently slower than AC charging. The Anker Astro 3E must deliver AC levels of charging, because I found that in what seemed relatively short order (30 minutes?) the battery percent available would often go up significantly (say, 15 or 20%). I didn't keep any sort of detailed notes on the topic, but I was definitely surprised how quickly the charger worked.

For now, I'm happily considering my battery woes solved.

Sunday, November 03, 2013

Lake Accotink, 4 miles of smooth trail running

Shira has know and suggested the Lake Accotink trail for years, but today was our first time actually hiking (well, running) it. What a wonderful little loop. At 4ish flat miles it's not especially challenging, but the scenery on this fall day couldn't have been more perfect.



This would be a great location to take non-hikers for a walk in the woods. It also seemed like a perfect spot to practice some off road biking, giving you some dirt trail experience minus major hazards.


Here's an Android tip: you can download the GPX route of the trail here and import it into MyTracks to get an on-device visual of the map. This was helpful to avoid missing the turn off into the short section of suburban streets that the hike requires.











Friday, November 01, 2013

Caption Me: Holloween Edition

Of all the photos I took last night I think this is my favorite. Can you suggest a caption?

I'll start: When Ninjas and Zombies cooperate, it's bad news for us all!

Putting Our Halloween Knowledge To Good Use

Last year we had a 7 year old in the house, and no clue as to the best Trick-or-Treat strategy for Arlington. This year we are empty nesters, but we are also armed with quite a bit of inside information. Luckily, last night we were able to put it to good use. We offered to help take around our friends kids who had never done Halloween in this area and they took us up on the offer. David and I were back in business as trick-or-treating guides!

We started in the same South Arlington neighborhood at around 6:30pm. Again, it was perfect! It was buzzing with kids, adults and lots houses handing out candy.

After about 45 minutes of working that neighborhood we headed over to North Jackson St. and Pershing to check out an Arlington neighborhood with a reputation for awesomeness. The street did not disappoint. A few blocks into N. Jackson St. and we found that the road was closed off to traffic and the place absolutely swarming with trick-or-treaters. Many of the houses had amazing facades put up and the mood was beyond festive. The only frustration was that with all the crowds, there were actually some lengthy lines to stand in to get to some of the front doors. Yeah, that won't fly on Halloween. Still, it was a wonderful neighborhood to check out.

What a peculiar holiday Halloween is. You wouldn't think that teaching kids to run from house to house asking for candy would be a good thing. And yet, I have to admit it is. Maybe it works because it's one of those great equalizers: for a couple of hours kids just get to be in kid heaven, and parents get to just stand by and watch without a care in the world. It's a few hours of communal bliss. Rich or poor, black or white, zombie or ninja, it doesn't matter.

Here are some photos from the evening:

Thursday, October 31, 2013

What's in a Name? The Space Blanket

You know those handy mylar sheets that work great for keeping body heat in and wind and moisture out? They go by a number of names, including "Space Blankets." I'd always imagined that the "space" part of the name was a sort of marketing gimmick. You know, Mylar being a space-age material, or something.

It turns out, the name has quite a bit more meaning than I imagined. Mylar was definitely a NASA invention, but that's not all. There's actually this impressive little story that explains how the blankets earned their name:

The first United States experimental space station in orbit, Skylab, lost its thermal protection shield, or sun-shade, during launch on May 14, 1973. Sans a shield, temperatures in Skylab became dangerously high, rendering the orbital workshop uninhabitable and threatening to ruin the interior insulation and adhesive. Something had to be done quickly before the first crew could be sent to man the orbiting lab.

Engineers and scientists worked around the clock to develop an emergency repair procedure. In this picture, two seamstresses stitch together a sun-shade for the craft. The Skylab crew and the repair kits were launched just 11 days after the incident. The crew deployed the sun-shade during an EVA (Extravehicular Activity) the next day.

The sun-shade, you guessed it, was a big o'l Mylar sheet. Or Space Blanket, if you will.

Here's more info on Skylab.

Wednesday, October 30, 2013

Trail Running Kit, v1.0

Lately, I've been doing a bit of trail running. With any activity, comes the requirement of packing the perfect kit. The goal: have the essentials, but don't overdo it. This is especially true for trail running, where the whole point is to stay in motion.

So here it is, my Trail Running kit v1.0:

  • Handkerchief. For blowing my nose, keeping the rest of the gear quiet and about 100 other things
  • Mylar Blanket. Useful for treating shock, providing cover from the rain, or staying warmed up during a break.
  • Ibuprofen. These get crammed into the core of the athletic tape and are basically invisible.
  • Athletic tape. Lots of uses for this on the trail, from helping with sprains to leaving messages.
  • Utility Key Chain. This is my standard key chain full of goodies. The compass, knife, flashlight and whistle are especially handy to have on the trail. The USB drive, less so. But it's attached, and I don't bother removing it.
  • Buff. This serves as a hat / neck warmer / balaclava. Useful for runs where it's kind of iffy as to whether or not it'll be chilly. For the weight, the Buff provides quite a bit of warmth.
  • Galaxy S3. For me, trail running is often an excuse to get out and take pictures. Plus, I'll use My Tracks to track interesting runs. Who knows, maybe this device will keep me from getting lost.
  • Amphipod AirFlow Microstretch Belt. This little belt-pack is key. It expands to hold all of the above stuff without issue. I have a SPIBelt that looks to hold the same amount of volume, but the Amphipod holds quite a bit more. I didn't want to go with a full size backpack or even a large fanny pack, as that would clearly be overkill for the relatively short-near-civilizations runs I do. This Amphipod pack is perfect.

This probably seems like a lot (it does to me), but it packs down quite compactly. In fact, my original goal was to just take along the emergency blanket and tape. Those two items should handle most first aid scenarios. I had enough room to toss in my key chain, which provides me with another round of useful tools. Finally, the handkerchief keeps stuff from jiggling around and is useful in its own right. The Buff gets added to the belt as needed.

By the way, I only schlep this gear when trail running. When doing usual road running I try to bring nothing but my phone, a key and maybe a handkerchief. There's something about the woods, and a trail strewn with rocks and roots that just urges me to carry stuff. Must be the Boy Scout training.

Rejoicing in one of Life's Great Mysteries

Here's one of life's great mysteries: Snyder's of Hanover's Bacon Cheddar Pretzel Pieces are *Kosher*. And I can confirm they're tasty, too.

Or as Benjamin Franklin Didn't say:

Artificial bacon flavoring is proof that G-d loves us, and wants us to be happy.

Tuesday, October 29, 2013

Practice Your Photo Skills, Never Leave The Comfort of Your Desk Chair

Fernando Pereira Gomes is a real person, and a real photographer. Yet, his latest work is strictly virtual. In a wonderfully clever move, he's created a street photography project using the virtual streets of Grand Theft Auto 5.

The results are oddly compelling. Consider this example:

I suppose I could be a cynic and scoff at the idea of shooting photography in a virtual world. But, I won't. The rules of composition that go with photography don't change just because you're working strictly with pixels. And the patience required to get a good shot is just as necessary in a virtual world as it is in the real one.

At the end of the day, all that matters is whether or not the photograph is compelling.

Via: Web Urbanist: Real Street Photographer Documents Virtual Life in GTA V

And Now, It's Just Dirt

We sent from this:

to this:

In just about 11 months.

Not too shabby.

Here's another photo of construction at the old Navy Annex site. This one was tweaked by snapseed, a terrific little app for on phone photo-editing.

Monday, October 28, 2013

Trail Running Turkey Run Loop

We had a perfectly crisp day to do a little trail running yesterday, so I thought we'd give Turkey Run Loop a try. Turkey Run is connected to my favorite trail of late: the Potomac Heritage Trail (PHT). Though the loop we were going to attempt didn't cover all that much ground on the PHT, I was still glad to be running on a section of it.

As for Turkey Run Loop, we attempted to follow the instructions on localhikes.com. Things started off clearly enough, with clear signage and nice yellow blazes. However, as we made our way up Dead Run things got a bit hazy. Specifically, we got to the following line in the instructions:

Just after passing under the GW parkway bridge, turn left, cross the run and follow the yellow markers southeast until you reach Turkey Run again.

We had no problem finding the GW Parkway Bridge. And once we crossed under it we found a yellow'ish blazed trail. But it didn't head off in a Southeast direction. We took the trail, and continued to follow the bright yellow-green markers until we came across some dog-walkers. They explained to us that we were outside the park and nowhere near Turkey Run. We made our way back, found the GW Bridge again, but for the life of us couldn't find the trail turn off.

It turns out that that according to the map we inspected after the fact, we needed to turn left *before* not after the GW Parkway Bridge. D'oh. Note to self: bring a map, and don't just rely on a narrative and trail markings.

We backtracked to the PHT, and then ran Southeast. We did this until we picked up a sign for Parkway Headquarters. We then took that trail back to Parking Lot C, where we started.

While I was disappointed that we couldn't do the loop as described, what we did end up doing was terrific. Most of it was quite runnable with some fun hills. Parts of the PHT continue to be really rocky and less than ideal for trail running. But views of the Potomac more than make up for it.

Here's a useful map of the area, which I didn't have with me. And here's the Yelp review page, which I'm not entirely sure does the area justice.

And of course, here are some photos:

A Bumper Sticker You'll Only See in Arlington

I'm willing to bet event Kathleen Sebelius doesn't even have one of these bumper stickers. But I wasn't at all surprised to see it on a car at the Columbia Pike Farmer's Market:

On a somewhat related note, I just learned the following trivia about Arlington County's stance on secession during the the Civil War:

On May 23, 1861, Virginia held a referendum to vote on secession from the Union. Although Arlington’s small, rural population of approximately 1,400 voted, by a 2-1 margin, to remain a part of the Union, it was the only precinct to do so. Most of the state, including the City of Alexandria, voted overwhelmingly in favor of secession.

Perhaps we need a new moto? Arlington: Being not Real Virginia since 1861

Sunday, October 27, 2013

Black Tie'ing It For A Good Cause

For years we've been supporters of the Arlington Free Clinic, and for years we have received an invite to their Black Tie Gala. And for years we've passed the night by.

But not this year!

Shira put on a little black dress, I donned my tux, and Gala'ing we went.

The party was great. The vegetarian option for dinner was exquisite. I don't even know what I ate, other than the fact it was good and definitely not meat. The 10 piece band made for great dancing and our tablemates were delightful.

What a wonderful evening for a wonderful cause.


Thursday, October 24, 2013

A few healthcare.gov What If's

What if, at the start of the development for healthcare.gov the team split the source code into two source trees? One containing a small amount of sensitive code, and the other contained the bulk of the project which wasn't private.

And what if this second source tree was made available on Github or at svn.healthcare.gov?

And what if every programmer in the world could peek in on the source code and track it's development?

I can imagine the Internet self organizing around this. I can imagine people giving feedback, finding bugs and recommending fixes. I can imagine we'd hear programmers sounding the alarm that the system wasn't scalable long before it failed a load test. I can imagine people donating their time to make the site a success. I can imagine there would be a lot less finger pointing when the website had issues.

Of course, I'm a fan of sharing when it comes to code, so I'd naturally see this relatively simple act as a powerful one.

Project Manager's Dilemma: To Share or Not To Share?

There are essentially two approaches to sharing the software you've developed with stakeholders. You've got the Masterpiece method and you've got the Chicago method.

With the Masterpiece approach, you sit your stakeholders down and show them, well, your masterpiece. That is, you essentially wait until the software is completed and then wow them with the finished product.

The Chicago approach, so named because the dubious political phrase Vote Early and Vote Often, involves sharing every phase of the software with your stakeholder. From the very first blank screen with the name of the software in the title, to the finished product, you share it all.

The Masterpiece method is tempting for a number of reasons. First, which programmer or project manager doesn't live for the day when they can wow their bosses or the board of directors? Secondly, over-sharing leaves room for lots of questions ("why doesn't this button work? How come search doesn't find X? and so on), which increases project overhead and may damage expectations. And finally, showing each phase of the project is practically inviting scope-creep.

In my experience practicing the Chicago method, those possibilities for conflict are typically critical advantages. All those questions are really an opportunity to bring stakeholders on board and give them ownership in the project. And scope-creep? More often then not, the changes are important course corrections. Sure, they may deviate from the original plan, but they often make for a much better product.

Finally, the Chicago method counteracts the biggest issue with the Masterpiece approach: the possibility of catastrophic disappointment. What happens when you've worked for months on a product and finally sit the stake holders down, only to have them walk away unimpressed, disappointed, or flat out angry? At a minimum, the stakeholders are going to provide feed. Like, say, "excellent start, now just re-arrange the order process so it's 4 steps instead of 16," From a project management perspective, you've walked into this meeting assuming you're wrapping things up, but you leave with hours of re-work and re-testing ahead of you.

In many respects, it's this catastrophic disappointment we're seeing right now with healthcare.gov. One report I'm hard pressed to believe suggests that 20% of the 500 million lines of code need to be rewritten. I don't know how you arrive at that sort of estimate. But I know that if you're over-sharing with the right folks, then you're a lot less likely to get into such a broken state in the first place.

I've also seen attempts by folks to try a middle-of-the-road approach. They want to wait until the software is at some milestone, and then start sharing it. Like the Masterpiece method, I think you're setting yourself up for failure. All you're doing is raising expectations to a place that's often had to meet.

Bottom line: when it comes to software, Share Early and Share Often.

Wednesday, October 23, 2013

A Super Simple PHP Google Spreadsheet API

Over this weekend I was doing a bit of tool development for my own company and needed to pull in and update some data from a Google Spreadsheet. I continue to be a huge fan of using a Google Spreadsheet to manage data accessed from PHP. The folks at Zend provide a fairly comprehensive API for working with Google Spreadsheets, but it was overkill for what I needed to accomplish.

After thinking over the problem I needed to solve, I determined there were only two functions I'd need: sgs_list($worksheet_name) and sgs_walk($worksheet_name, $callback). The description of each is below:

  • sgs_list($worksheet_name) - given a worksheet name (the text in the tab at the bottom of a spreadsheet), pull back an array that represents each row of the spreadsheet. The array consists of key/value pairs, where the key is the heading of the row. Basically, this pulls in a Spreadsheet as standard a PHP array, and allows me to opperate on a spreadsheet much like a database result set.
  • sgs_walk($worksheet_name, $callback) - this function is similar to sgs_list(...). But rather than returning an array of Spreadsheet rows (which are themselves an associative array), it invokes $callback once for each row. And then there's a tiny bit of magic: if $callback returns an array, the Worksheet is updated to reflect the changed array. If $callback returns true (or any non-array value), then no change to the spreadsheet is made.

sgs_walk is a fairly clean way of updating a spreadsheet without worry about the details of doing so. You're just setting and returning an array; it couldn't be easier.

Every time I use Google Spreadsheets from a programmable context I'm amazed the power and ease of accessing data that would normally seem out of reach.

You can download my trivial little API here. And you can download a sample of how it's used here. Feel free to hack this to bits; if it's useful, have at it!

Monday, October 21, 2013

Trail Running on the Cabin John Park Trail

Yesterday was the perfect day to be outside. So how could we not finish it up with a nice trail run through the fall foliage? But where to go? In a hurry to find a location, I visited LocalHikes.com and started reading down the list of DC recommendations.

I'm not exactly sure why, but Cabin John Park Trail jumped out at me. Looking at the description, it appeared easy to find, the distance seemed about right (6 miles) and the instructions to just stay on the blue blazed trail seemed nice and simple.

We jumped in the car, and 23 minutes later (why, oh why, is there massive traffic on Sunday afternoon on the Beltway?!) we were at the Locust Grove Nature Center, ready to start our run.

To my surprise, the trail absolutely lived up to all my expectations. It was beautiful, free enough of obstructions to truly run on and well marked. It was hilly enough to keep things interesting; but not so steep that the downhills were unrunnable. We got a little disoriented when we popped out at the road 2 miles out, and didn't catch that we were supposed to walk down it a ways (the instructions say 40 yards, I think it's longer) to pick up the trail again. Instead, we followed a blaze into a camp ground by accident, which still made for a fine location to run in.

Apparently, the section of trail we covered is only part of the Cabin John Stream Valley Trail, which has a full length of 8.8 miles. That means that we've got plenty more miles to explore.

Definitely recommend this for trail running, or any other excuse for getting out into nature.