Friday, July 27, 2012

ImportHTML and Google Spreadsheets

We're getting ready to go on a family vacation to Alaska, and one of the big questions in the months leading up to the trip has been what the weather will be. Last week my wife and I were reviewing our trip todos and I stumbled on a great feature in Google Spreadsheets that I'd never used before: ImportHTML.

Before each trip, my wife and I work from a shared spreadsheet. We list out the packing details, transportation, itinerary, etc., and then divvy up the tasks. (I should point out that my wife almost always shoulders the vast majority of these tasks.) As of a week ago, the long-range forecast at Accuweather.com was showing rain for the entire time we'd be in Alaska. Not awesome, but at least we'd be prepared.

But as I looked at the spreadsheet with our itinerary, I was annoyed that I had what we'd be doing listed out, but not the weather (which could dramatically affect what we'd pack, and what we'd need for various days). That's when I found ImportHTML and fell in love.

The premise behind the function is simple: in a cell, type =ImportHTML("[URL]","[query]","[index]"), where "query" is the element within the HTML that you want to import, and "index" is which element within the page you want to import. Here's how it works:

I found this page at Accuweather.com that lists out the month's extended forecast for Anchorage, Alaska. Conveniently, it's laid out as an HTML <table>.


A quick look at the HTML source from that page confirmed that the table containing the weather data is the first table in the page, so in Google Spreadsheets I entered this:

=ImportHtml("http://www.accuweather.com/en/us/anchorage-ak/99501/august-weather/346835?view=table","table",1)

That parses the HTML data into individual cells in the spreadsheet; and from there it was a trivial matter to associate an individual day's weather (high/low/forecast) with its entry in the itinerary, giving us one screen that shows where we're staying, what we're doing, what the weather will be on each day, and what we'll need to pack. Here's a snippet of the spreadsheet:


Best news of all? Now that we're just a week away from our arrival, the forecast is getting increasingly positive: a week ago all of these cells showed rain for the entirety of the trip; today when I opened the spreadsheet, just two days show rain and several days look to be pretty warm and sunny!

Wednesday, July 18, 2012

Kill Decision by Daniel Suarez

One of the first "grown-up" books I read was Andromeda Strain by Michael Crichton. He wrote it in 1969, while he was a medical student at Harvard Medical School. I remember not just loving the book, but admiring his attention to detail. My Dad worked at Millipore at the time, and I was surprised when I saw Millipore referenced in the book. It was obvious Crichton knew what he was talking about; though Andromeda Strain was a fantastic work of fiction, it was rooted in reality in a way that few books are.

I had a similar reaction to early Tom Clancy, and later Scott Turow. There's something about an author who can both write a great story and who's intimately familiar with the intricacies of the space they're writing about. And it's exactly why I adored Daemon the first time I read it; here was a book that came from someone who knew technology. More importantly, it was clear that the author had given serious thought to the implications of technological developments. At its core, it was a book that wanted you to think about where these things were headed, and what that might mean for society.

That author is Daniel Suarez, and it's been a privilege to get to know Dan over the last several years. (More on that here.) I'm hardly an objective observer at this point: I consider Dan and his wife Michelle to be good friends, and those who've known me for a while are likely tired of my enthusiastic recommendations of Dan's books.

Couldn't be more excited for Dan that his newest book comes out tomorrow. It's Kill Decision, and if like me you love a good story that's rooted in an intimate understanding of its subject matter, you will adore it. Many others have written great summaries of the plot, so I'll let you read those rather than try to retell it.

I read Kill Decision a few months ago, and what's stayed with me ever since was a deep unease at how present the book is. Where Daemon and Freedom™ were both far-fetched enough in plot that you could safely admire the technical accuracy while discounting the likelihood of seeing something like it play out in real life, I've had no such ability to do so since reading Kill Decision.

Great authors give you a good story while leaving you with something to chew on. That's what made Kill Decision such a joy for me: Dan's written about something deeply unsettling: as the tools of war become less expensive and more anonymous, the very nature of warfare has changed (and continues to change). And as technology drives cheaper, smarter, and smaller devices, the potential to deploy those devices as instruments of war – particularly when they're autonomous and anonymous – is intellectually intriguing and simultaneously terrifying.

Here are a few of the articles over the last several months that make the technology discussed in Kill Decision very, very present:

With this, it won't surprise anyone that I highly recommend Kill Decision if you're looking for a thrilling, thoughtful read. Pretty sure that Dan will be a household name in a month or so as Kill Decision cracks the summer bestseller lists. It's that good, and most importantly I'm eager to see the conversation that develops as more people get exposed to the issues Dan raises.

Tuesday, July 17, 2012

Building Character with the Boy Scouts

"The Boy Scouts of America provides a program for young people that builds character, trains them in the responsibilities of participating citizenship, and develops personal fitness."
That's how the Boy Scouts describe themselves at scouting.org. I support that mission wholeheartedly; it's why I've encouraged both of my sons to participate in Scouts for years. Both boys joined Cub Scouts as Tiger Cubs, my oldest is just a few requirements shy of advancing to a Second Class scout as a Boy Scout. My younger son earned his Webelos badge earlier this year, and plans to bridge to Boy Scouts this winter to join his brother in his troop.

Today, the Boy Scouts completed a two year program reviewing their exclusion of homosexuals, and affirmed it. Deron Smith, the Boy Scouts national spokesperson, said that the committee that reviewed the policy "came to the conclusion that this policy is absolutely the best policy for the Boy Scouts."

They're wrong. Excluding committed, engaged individuals who want to help my sons grow is the antithesis of building my sons' character. What this decision tells me is that the Boy Scouts of America are more interested in pursuing their own exclusionary morality ahead of my sons' personal growth. Last month, the Boy Scouts clarified their policy in a post on their blog:
The BSA policy is: “While the BSA does not proactively inquire about the sexual orientation of employees, volunteers, or members, we do not grant membership to individuals who are open or avowed homosexuals or who engage in behavior that would become a distraction to the mission of the BSA.”
Scouting believes same-sex attraction should be introduced and discussed outside of its program with parents, caregivers, or spiritual advisers, at the appropriate time and in the right setting. The vast majority of parents we serve value this right and do not sign their children up for Scouting for it to introduce or discuss, in any way, these topics.
The BSA is a voluntary, private organization that sets policies that are best for the organization. The BSA welcomes all who share its beliefs but does not criticize or condemn those who wish to follow a different path.
I'm a parent whom the BSA is supposed to be serving. My opinion was never sought, nor am I aware of any effort to solicit input from any of the parents in the packs/troops we've been involved in.

That said, whether we continue with the Boy Scouts is a decision for my sons to make, not a unilateral conclusion to be handed to them. A hallmark of strong character is choosing the company you keep. My wife and I will be sharing this information with both of them, and giving them an opportunity to decide what to do about it. Because they are already strong, moral children, they know that we don't exclude others simply because they're different than we are. It's possible that they'll decide that they want to work within the organization to change it. If so, they will have my support. If they can't support the decision and wish to leave Scouting, I'll support that too.

But what I won't do is let this decision go unnoticed, or let my sons ignore the implications of what it means for the organization they (currently) belong to. That is how you build character.

Tuesday, July 10, 2012

My war on phone distraction

At the risk of turning into a blog-stalker that only talks about his boss, I wanted to write up something I did in June as a direct result of watching a speech Joe gave on our "culture of distraction". Joe's entire speech is worth listening to, as it touches on a number of issues that I've been thinking a lot about lately:


Joe identifies that much of the reason we're so distracted of late is the increasingly powerful devices we carry in our pockets — our phones:

  1. all of us have a device in our pockets that is a very potent, addictive distractor
  2. the more we train our brain to pay attention to this distractor, the more distracted we become.
Immediately after watching this, I radically changed how I use my phone: I turned off all notifications for everything except my calendar and Google Voice (for SMS messages). That means my phone no longer proactively checks my e-mail, it no longer checks for Facebook activity, it no longer checks for G+ updates, no longer alerts me when I have new @replies on Twitter. This doesn't mean I don't read e-mail, post to Facebook, or catch up on G+ or Twitter. When I want to do those things, I can manually update the apps — it takes just a few seconds to do. But what it does mean is that my phone is no longer constantly interrupting me to tell me I have new mail, new comments, new posts to read.

The result? I decide when to pay attention to the phone. I pull my phone out of my pocket when I want to engage, not when the phone demands my attention. I have more time to think, I spend less time being interrupted by my phone, and I am much less likely to get distracted. I pay more attention in meetings, I'm never tempted to open my phone up while driving, and as a bonus, the battery on my phone lasts much longer now that it's not checking for new data every few seconds.

I shared this idea with Brian Fitzpatrick a few weeks ago, and he pinged me this morning to tell me that not only is he far happier with his phone, he's also stayed at inbox zero for longer than he's ever done before. That's been my experience too: turns out when you decide when to focus on your inbox, you control it instead of the other way around!