The Television Reckoning

’twas a bad end to the television season for me.

Community, which I think I rate in the top 10 shows ever (and probably top 5 sitcoms), was canceled.
Trophy Wife, a show that was probably one of the better new family sitcoms, lasted one season.
Suburgatory, a show that, at its best, gave us Ryan Shea (aka Eugene Goldfarb) and Dalia Royce, was canceled.
Enlisted, a touching, funny show that stole “Ryan Shea” from Suburgatory, didn’t even make it through its first season.
How I Met Your Mother, a show that had a great peak, nearly ruined its legacy with a tone-deaf final season.

Topping it off, Parks and Recreation and Cougar Town are both finishing up after one more season.

Want to know why people are spending more time on Netflix? I’m not worried about them canceling The West Wing or Scrubs (again).

Bah.

Backing up iPhoto to Flickr

Ever since Flickr upgraded to their 1TB plan, I’ve been looking for a good way to backup my photos there. Over the weekend, I stumbled upon this Github repo, which has a bit of AppleScript to get your photos and albums from iPhoto, then sets about uploading them to Flickr.

Even better, it keeps track of what it’s already uploaded, so you can run it every time you add some photos to iPhoto, so you’ll have a solid backup.

For me, this solves a lot of problems:

  • One, I like having my photos backed up. I think this will be my seventh photo backup, which makes me at least feel pretty good that a bad disk or virus or malware won’t eat all my photos.
  • Two, it solves the “how do I keep a lot of photos on my phone” issue.

That latter solution is a big one. iOS still has a pretty bad solution for managing photos, particularly doing it wirelessly. Syncing photos is still over a cable, so I’ve moved to using Photo Stream as a way to get photos off my camera, as imperfect as that is. But that means the photo albums on my phone never get updated, as they only get updated when you sync via USB.

Now, I can use the Flickr app (as long as I’ve got some sort of internet access) and have access to every single one of my photos going back to when I first got a digital camera (Christmas of 1999). That’s pretty awesome. And they don’t take up any space on my phone. Even better.

There’s some little downsides and gotchas. If you’ve already uploaded anything to Flickr, you’re going to end up with duplicates (at least I’m pretty sure you are—I’ll know when my upload finishes). That’s pretty easy to clean up though. I’ve noticed some photos getting uploaded in the wrong orientation. That’ll take a little while to go through and adjust, but hey, easy enough to scan through albums and rotate some images.

Once done, I’ll have 15 years of images available to me at pretty much any time. I can add comments or descriptions and search on those, or browse albums. Flickr’s new app is pretty nice, and not a bad way to view photos on the go.

Revisiting Harmontown on the Nature of Art

Back in September, I mentioned a Harmontown podcast that delved into the nature of art. It’s a pretty great, moving conversation between Dan Harmon, Kumail Nanjiani, and Jeff Davis on art (and what art is), emotions, inspiration, and a variety of other topics.

Thankfully, someone snipped about 12 great minutes of the conversation and put it on SoundCloud. I’ve embedded it below.

There’s a great moment right at the beginning with Kumail talking about seeing Michelangelo’s David, realizing that he did that at the age of 29, and immediately going online and canceling his pre-order for GTA5. Such a razor-sharp modern reaction to seeing someone’s amazing art and realizing that many of us just piss away our time.

Also, to quote:

I saw the David and I was like “everyone can have one great day, what else you got?”, and you see the Sistine Chapel and you’re like “oh, ok, also this. Also this.”

Really, give these 12 minutes a listen. If you like it, track down the full podcast and listen to the next 20 minutes, which are also just great.

For me, it has served as a much needed spirit lifter at the end of a couple of hard weeks (much like my first keytar bear sighting yesterday).

Light, in the midst of a generally awful week ...

In the middle of what has been a week from hell, I’ve at least stumbled upon a very entertaining podcast, Wits.

Wits is a sort of adorably goofy variety show, an SNL- or Daily Show-lite, with a celebrity guest, skits (involving said celebrity guest), and a musical act. It’s not the funniest show, or the most daring. It’s just two parts clever, one part “aww shucks”, with a little bit of edge tossed in.

There are moments when you wince at the forced humor, or, if you listen to a few shows in a row, when they go back to the well for a repeated joke.

But, mostly, you just kind of grin at their goofiness of the “Pop Song Correspondence”, when they act out the other side of a famous song. The best, and what hooked me on the show, is Kristen Schaal as the Horse from Horse With No Name. I don’t want to ruin it. It’s good.

Take a gander through their episodes, grab a couple that have guests or artists you like, and give a listen.

A Chorus of MJs

Every once in a while you hear something that just makes you say “ohhhhh”, and then makes you just sort of weep for what people can do with the human voice.

The ones that always stop me in my tracks are the vocal only tracks from The Beach Boys on Pet Sounds.

Go listen to this:

and listen to this:

This week I saw a link to a recording of Michael Jackson laying down the demo to Beat It. It’s unreal. It’s an a cappella chorus of MJs.

Go listen to it. I’ll wait.

…….

Seriously – amazing, right?

I came across this from a link that someone had sent to this post, which has a really great story of how Michael Jackson used to layout songs:

As Jackson couldn’t fluently play any instruments, he would sing and beatbox out how he wanted his songs to sound by himself on tape, layering the vocals, harmonies and rhythm before having instrumentalists come in to complete the songs.

The rest of the story is even better, but I don’t want to steal it all, so head over to that aforementioned post to get the rest of the story.

Raining on the Pre-Victory Parade

"You do understand that there is zero chance that the Red Sox repeat, right?

Last year was fun, but it’s not going to happen again. Not this year, anyway."

Thanks, Eric Wilbur. You mean it’s hard for a baseball team to win the World Series, let alone win them back to back? Well, I’ll be. I never would have figured.

This shit is why people hate sports writers. There is zero in this article that is worthwhile. This is a contrarian article to get page views, and generate some ad dollars for boston.com, and maybe get Wilbur a few a couple more spots on radio or local tv.

Yes, it’s hard to win the World Series. Yes, the Red Sox are not a dominant team, going to steam roll the league (that just doesn’t happen in baseball any more). Are they the most likely team to win? Not by the odds—Baseball Prospectus has them the 6th best odds to win it all, Vegas has them 6th as well).

But, this tripe:

Boston still isn’t viewed as the best team in the American League. It probably even has to surrender that honor to the Tampa Bay Rays in their very own division. The Tigers are more complete. The Rangers have more firepower. The Royals are young, hungry, and ready to burst onto the scene.

The Rays are absolutely a solid team, betting on a very young rotation once again. Definitely one of the best teams in the AL. The Tigers have no shortstop, but have put together a great (if defensively flawed team), and have one of the best rotations in the AL. They have little depth to handle injuries. The Rangers … the Rangers? They’ve got a pretty horrible rotation (topped with their ace being on the DL), a questionable bullpen, and an offense that is very different than last season’s. They’re a good team, but not one most folks are even betting on to win their division (that’d be the Oakland A’s or Los Angeles Angels). And, jeez, the Royals? Now you’re just trolling. They’ve got one of the worst hitting infields in the American League, and have one starting pitcher on their staff likely to have an ERA under 4.

The Sox? Well, they’ve got a hole in the outfield, no matter how you slice it. I wasn’t a huge Ellsbury fan, but his 2013 is likely to be better than the Sizemore/Bradley combo (though not for as much as he got paid). Bogaerts is a rookie, and Middlebrooks is Middlebrooks. What the Sox have is depth. Depth for call ups and depth for trades. Sizemore gets hurt? Bradley is there. Bradley not cutting it? Bring up Brentz, or trade for an OF. Bogaerts scuffling at SS or Middlebrooks not getting it done? Drew is still out there …

Are the Sox going to win it in 2014? Probably not. There’s just no way you can say that any team is going to win it. But to say they aren’t going to win it, and to mention the Royals and Rangers as reasons why? That’s just being a douchebag.

(Via Boston.com.)

Randomness from the past few weeks ...

I’ve been pretty busy lately (travel, taxes, work, more travel), so here’s some things I skimmed from my Instapaper and Evernote from the past few weeks that you may find handy or interesting.

Check out an old version of a file from your git repo as a new file

I needed to grab a couple of snapshots of files (here’s how the file looked on date A, date B, and date C). It took me a bit of digging, but the syntax for that is:

git show <sha>:<filename> > <newfilename>

Pretty handy, once you figure it out.

Nate Silver’s new FiveThirtyEight.com launched

Some early highlights:

If you’re a fan of Nate Silver’s writing, I’ve found the site to be pretty solid so far. It’s still finding it’s legs, I think, but it’s a great extension of what his fivethirtyeight blog used to be.

Speaking of FiveThirtyEight …

Both FiveThirtyEight and Grantland are now hosted on WordPress.com, which means they’re both exposing full text rss feeds. I don’t remember those existing before, and it makes it much easier for me to keep up with articles from both sites.

Finally … OmniFocus 2

I first mentioned signing up for the OmniFocus 2 beta about a year ago. It was in very very rough shape to start with—more of a tech demo than a real beta.

Well, that year as served the app well, as the beta is back. It’s now usable on a daily basis, and the forecast view on the Mac is even more useful than the feature on iOS (because I’m often planning my week at my desk, not on my phone).

There’s still some rough edges (clipping out of Mail didn’t work until I rebooted my Mac, it’s not quite as fast as it probably should be, there’s some UI bits that probably need to be rethought), but it’s really solid and there’s enough that’s goodness that it’s easily worth displacing the venerable OmniFocus 1.

Unintentionally Eating Some Delicious Cookies

I use a cool little web app called ThinkUp to keep track of stuff I post to Twitter and Facebook. I use the self-hosted version, running on my own server, and I’ve had it running for a year or so and never had a problem.

This weekend, I went to login to see if ThinkUp would show me anything interesting. Except I couldn’t log in. Every time I tried to login, it would just kick me back to the login screen. Clearly something had gone wrong. I watched the login requests via Developer Tools in Safari and Chrome and noticed that I was not getting a PHP session cookie. That’s certainly odd—setting a session cookie is pretty straight forward and I’ve never seen it fail.

As is typical in this sort of issue, I debugged it ass backwards. I spent an hour or so writing test scripts, changing permissions on session directories, and changing session settings before realizing I was debugging things entirely wrong.

My stack looks something like this:

nginx -> varnish -> apache2

I realized that I should start by looking to see if the request to Apache2 was getting the cookie headers back. I ran a quick curl command, and sure enough, the cookie headers were there when talking directly to Apache2. Logically, I then ran the same curl command, changing it to talk to Varnish. Sure enough, the cookie headers were gone.

Finally, I’d figured out where my cookies were getting eaten (haw haw).

Diving into the Varnish config, it was pretty quickly obvious what had happened. When adding Varnish caching to support this here blog, I added this line,

unset beresp.http.set-cookie;

which basically says “get rid of the cookie header we’re sending back to the user”, which allows us to cache more stuff. Of course, that was getting set far too liberally, dropping the PHP session cookie, and making it so I couldn’t login. A couple of tweaks and restart later, and all was well.

This sort of thing happens to me somewhat frequently. I muck around with some settings on my server, and everything works great for my blog or my static site, but I forget about other things I have running, and a few weeks later, I notice they’re broken, but now I have no idea why. It’s a pretty good case for using a tool like doing, to log things I do (that aren’t necessary driven by my OmniFocus to-do list) so that I don’t spend hours debugging my self-inflicted problems.

I couldn't think of a clever title about a hydra. This is a dorky programming post.

This weekend, I was tooling around with a couple of scripts to do some web benchmarking. Really simply, I just wanted to throw a bunch of requests at a site, see its performance, make a few changes, and do it again. I wrote it out in perl the first time, just shelling out a curl request (not even bothering to use LWP). It was the quick and dirty solution:

for ( 1..10 ) {
    # New host
    my $time = `/usr/bin/curl -o /dev/null -s -w %{time_total} $site/`;
    push( @curr_time, $time );

    # Old host
    $time = `/usr/bin/curl -o /dev/null -s -w %{time_total}  -H'host: $host' $ip{$dc}/$url/`;
    push( @old_time, $time)
}

The whole script (parsing the incoming data, running the curl requests, creating some aggregate data) took about 65 lines with comments.

It was definitely the quick solution to write. But it wasn’t the quick solution to run, as it took the better part of a day to finish running.

On a lark, I remembered that Ruby had a library called Typhoeus that was pretty much designed to do the exact task I was trying to do. And it does it with some concurrency using a queue called Hydra, to help me solve the “quick” side of things. I could have done this in perl with something like AnyEvent, but I figured why not give it a whirl in Ruby.

Took me a bit to get my head back around Ruby, but I was able to crank out the script in about 90 lines (with comments). My first pass through running it (with a 10 threads) it took a little over an hour to rip through the list of sites. In looking at the data, there were a bunch of requests that got back no result, which leads me to believe that maybe I was pushing the concurrency too high. So I dropped that down, and added a retry.

Remember, this is super quick and dirty. If this script proves fruitful, I’ll likely turn it into something reusable, but for now, the guts look like this:

hydra = Typhoeus::Hydra.new(max_concurrency: 5)
50.times do
    request = Typhoeus::Request::new(url)

    request.on_complete do |response|
        if response.code == 0
            puts "Got a 0 response for #{url}"
            unless retried[url] == 1
                puts "Retrying request"
                request = Typhoeus::Request::new(url)
                hydra.queue request
                retried[url] = 1
            end
        elsif response.code == 200
            results_file.write(data[site]["user"] + "," + site + 
                       response.total_time.to_s + "," + response.code.to_s + "\n")      
        end
    end

    puts "queueing request"
    hydra.queue request
end
hydra.run

Basically, we create 50 requests to the same url, queue them up, execute them (up to 5 at a time), and then I write the results out to a file. If I get back a response.code of 0 from the request, I retry it (but only once). If I get back a 200 response, I log it. Otherwise, I just move on.

I’m expecting with retries and the concurrency turned down to 5, that it’ll take a few hours to finish. Typhoeus, with its Hydra queue, is a pretty nifty little framework.

2014 Goals Update

A few days after the the new year started, I posted about my goals for 2014. I thought that it’d be worth giving an update after a couple of months, as a mechanism to keep myself honest.

Dressing Slightly Better

I think I’ve been achieving this, given that it’s a pretty low bar to hurdle. When I’m out running errands or just hanging around locally, I still tend to dress for comfort (hoodies, tees, jeans). At work, I’ve at least mostly started wearing nicer shirts most days.

It’ll be interesting come spring and summer, when the temperatures give me the desire to wear shorts and tees.

But, for now, I’m doing ok on this one.

Getting Back Into Shape

I’ve been walking more (thanks slightly warmer weather and Celtics home games!), which is definitely helping. More than that, aside from a couple of weeks when the flu was kicking my butt, I’ve been hitting the treadmill a couple of times a week (or more). I’m trying to work myself back into averaging 7 minute miles for a 5k. Right now, I’m not there. I think I can get there over the course of the next couple of months.

When I do this update again, we’ll see where I’m at.

Managing My Time Better

This is where I think I’ve probably done the best. I’ve really been pushing hard to keep my inbox as clear as possible (2 emails right now), get data into OmniFocus and into Evernote so that it’s not cluttering my inbox, and to not spend time aimlessly answering and reading email. I’ve put together something like 20 rules to get useless email out of my inbox, and I add more each week. I’ve been trying to not spend too much time on the computer in the morning, instead using that time to go to the gym, then to start my day fresh, cleaning out my inbox and laying out what’s important for the day.

Next, for me, is to probably try to start doing the paperless thing. I’m thinking very, very hard about getting a ScanSnap, even at the crazy price. The ability to get all of the crazy paper that piles up on my desk (and in drawers, boxes, and closets) into digital format is really, really appealing. And, it should help me continue to steal back a bit time each day.