How to catch up on a 100-something-challenge

Saturday, January 17th, 2009

I have seen a lot of 100 something-or-other challenges online recently — I’m currently, as I mentioned, doing the 100 burpee challenge from Crossfit Santa Cruz.

Here’s the problem: I started the challenge on Jan 1st, and I became a new dad on Jan 10th. I managed to do some of them, but I find myself behind.

The rule is, generally, that you need to do all the ones you missed. So if you missed, as I did, the 12th, 13th, 14th, 15th, 16th, 17th, and 18th (yikes) that means I need to do (12+13+14+15+16+17+18) = 105. It’s cool, I’m good for it.

But it’s kind of annoying to punch all those numbers into a calculator to find the number, and there’s a good chance I’d typo something. Thankfully there is a math trick (with a good explanation over at WikiHow for how to do it and how it works) for finding the sum of all the numbers from 1 to some number ‘N’. Short version, the sum is (N*(N+1))/2. So if I want to find how many I missed between the 12th and the 18th, I just need to find the sum of 1 to 18 ( and subtract the part I already did, the sum from 1 to 11). In other words ((18*19)-(11*12))/2, or 105.

Hence, a quick and dirty calculator. Just punch in the last count you did, the count you should be doing today, hit enter, and the third box will give you your wonderful total you need to do today (including today’s.)

Number you last actually did:

Number you should do today:

Number you need to do to today to be caught up:

At the hospital, waiting to become a dad!

Saturday, January 10th, 2009

I’m updating my Son-to-be’s blog (carterbarratt.com) with updates so our friends and family can keep up.

100 Burpee Challenge: PDF Calendar

Wednesday, January 7th, 2009

Some of the people at Culver City Crossfit started doing a “100 Burpee Challenge” they found on Crossfit Santa Cruz’s site. (Check that link for a full explanation of the “rules” and for what a good Burpee looks like.)

A guy from the Royal Navy demonstrates.

It sounded like fun so I jumped in and made up my missing Burpees. Since we started it on the 1st of the year, it’s pretty easy to know how many you have to do for the month of January — it’s just the date. It gets trickier after January’s over — you need to know what day of year it is.

I found a sweet PDF calendar generator which includes the ability to put the day of the year right in the calendar!

So, here it is. (I’ll bring one in for Crossfit Culver’s wall before the end of January.)
Link: 100_burpee_calendar.pdf

Permanently converting from textile markup

Tuesday, January 6th, 2009

So, I have resurrected the blog!

There were some victims — at one of the transitions along the way, many of my posts got truncated to just ’summary’ length and the ‘real data’ is gone. (Moment of silence.) Moving on to brighter and better things.

Wordpress was able to connect to my textile database and inhale all my posts. (Thanks!) Unfortunately, it was all in Textile markup. And they didn’t seem to plan on supporting that.

What to do?

I made a quick YAML config to store database options in, config.yml:

---
dbserver: mydbserver.com
dbuser: mydbuser
dbpass: doilookthatdumb
db: my_wp_db
dbtable: wp_posts
dbcolumn: post_content
dbkeycolumn: ID

I didn’t hard code it in the doc so I could generically do this kind of thing later if I wanted.

And then, the cowboy perl to inhale the markup and go from Textile to HTML, using the handy Formatter::HTML::Textile:

#!/usr/bin/perl

use strict;
use warnings;

use YAML qw(LoadFile);
use DBI;
use Formatter::HTML::Textile;

my $c = LoadFile("config.yml");

my $dbh = DBI->connect("dbi:mysql:$c->{db}:$c->{dbserver}",$c->{dbuser},$c->{dbpass}) || die "Can't connect to database: $!\n";

my $q = "select $c->{dbkeycolumn},$c->{dbcolumn} from $c->{dbtable}";
my $uq = "update $c->{dbtable} set $c->{dbcolumn} = ? where $c->{dbkeycolumn} = ?";

my $sth = $dbh->prepare($q);
my $usth = $dbh->prepare($uq);

$sth->execute;
while (my ($key,$text) = $sth->fetchrow_array) {
    my $formatter = Formatter::HTML::Textile->format( $text );
    my $newtext = $formatter->fragment();
    $usth->execute($newtext, $key);
}

And in a fraction of a second, all my old blog posts were converted, in all their (arguable) glory. From now on I’m only blogging in XHTML, suckers.

Posting to WordPress from the iPhone: Awesome.

Monday, January 5th, 2009

It's pretty amazing to be able to do longer form blogging from the iPhone. I don't know that I will do it much, but it's nice to have the option.

For no reason other than that it makes me laugh (well, and to test upload) I am including this image of a cat.

Hiking O’ahu: Kealia Trail

Friday, July 11th, 2008

So we spent a few hours on the awesome looking Backyard O'ahu but found over and over that the great looking hikes were all either illegal or needed advance permission to use. Bummer. So we found the Kealia Trail:, nice and close to our rental home on the North Shore, and did a nice early morning punch.

A view from near the top:

I shot a couple of panoramas, too, and stitched them up with Hugin

Around the point (Kealia Trail)

Down in the Valley (Kealia Trail)


View Larger Map

The workflow to produce this data is a little bumpy, so I'm documenting it so I can remember it for myself, and presumably it'll be interesting for someone else as well.

Tools

  • Garmin eTrex Vista HCx
  • Mac running Leopard

Steps

  1. Save the track on the GPS
  2. Connect to your computer and use Garmin Bobcat to import it.
  3. Load it in Google Maps. Drill down into your data set and turn off everything but the “path”
  4. Right-click your path (very important) and say 'email'. (Sounds nuts, but it's the only export function I can find?) Drag and drop the file out of the email that got created and throw the email itself away.
  5. Upload the kmz file to some hosting somewhere.
  6. Go into Google Maps and search for the URL of that KMZ file.
  7. Choose 'Link to this Page' … 'Customize and Preview embedded map'.

Everybody’s blogging it so why can’t I: Frequently used Mac Apps

Sunday, June 29th, 2008

With no information other than the programs, here are the ones I find myself actually using.

No particular order — semi alphabetical. Enjoy!

Slowing down songs on the Mac

Wednesday, May 28th, 2008

I've recently been practicing some songs on my guitar, trying to get them just right. The problem's been that, especially with a song like the one in the screenshots I've included in this, the beat is pretty quick. When you're learning it and either trying to hear the notes, or play along with tab, music, or chords — you can get left behind.

Cool, so how to slow it down? On a Mac, it's pretty easy. I'm assuming you've got the song in iTunes. (This works if you bought the track from the iTunes store or from any other source that iTunes will play.)

Step one, find the song, right-click (or control-click) it, and click “Show in Finder”.

Step two, right-click (or control-click) the file and open in Quicktime Player.

Step 3, open up the AV Controls Menu:

Step 4, tweak away and learn the song!

I find the playback rate especially useful — start out at 1/2 speed, and work your way up to 3/4, 7/8, then full speed, and if you really want to practice, 1.5 speed or double-speed! Also, the mixer's not the most incredible thing, but if you're trying to learn bass (as I have been) you can kill off the treble and throw the balance to one side, so you can listen to yourself play with the other ear and mute as much of the “rest of the song” as possible.
http://serialized.net/img/playback_rate/av_properties.jpg

I also use the A/V Controls menu to watch a lot of educational/documentary movies and screencasts — ones where the content is king and the pacing is not so important (as would be the case in a “theatrical” style film.) I can get almost to double-speed and that's a great way to absorb a lot of the technical google videos. You can always slow it down again if you're having trouble keeping up with something.

Scootering to work is awesome.

Thursday, May 8th, 2008

As most of you who actually read this site know, I've been driving riding to work on a scooter.

I just added the shiny topcase, which is cool — I can store my helmet in there and it carries my laptop bag on the way to work so I don't have to backpack-style it.

Like anything, there are some pros and cons:

Pros

* FUN! I get to work every day grinning. It turns something fairly mundane or even stressful (commuting) into something exciting and engaging.
* Financial. The scooter was $2,400 brand new, with a nice warranty. (By the time I got helmeted, (plus one for Amber) topcased, jacketed, taxes on everything, license, doc fees, motorcycle safety course, driver's license upgrade, etc — still less than $4,000 all told.) That's not a lot of car payments on a “real” car. It gets 85MPG. (Sorry, Prius.) It's pretty simple, mechanically, so for the most part I can take care of it and repair it myself.
* Environmental. See above. It just makes more logical sense to use about 250 lbs of machine to move about 200 lbs of person, instead of 4500 lbs of machine to do the same.
* Time Saving. I save time because of 2 things:
** Traffic avoidance. I can pretty safely cruise up between rows of stopped cars at a light, and because this thing is so lightweight, it pops off the line like a Porsche. So I can do what would be a 35 minute drive for a car (tested) in 15 minutes.
** Parking. This is the secret factor. I used to take the freeway to work, but then park on the 4th floor of a parking structure quite a ways from my office, that I had to wait at a ticket booth to get into. I added, typically, 5 minutes to my drive time — but I cut 12 minutes off my parking time because I can squeeze in literally AT the front door. It also makes it GREAT for running out to lunch. Today I left, ordered, got my food, and was on my way back before people who left the same time as I did had even arrived at the spot.
* Really being where you are. When you're in a car and driving through places, it's pretty much like watching it on TV. Your car smells like it does, you even have your own soundtrack, the only wind is coming from your vents, the air's a perfect 72 degrees, or whatever you choose — a rolling living room. I feel the air get colder when I roll under a bridge. I smell the restaurants on the block. (And, to be honest, the garbage trucks too, but it's still real.) I hear the sounds around me as I roll to a stop. Every sense is engaged, and that's surprisingly enjoyable.
* No audio. It wouldn't be safe (at least in my opinion) to rock the headphones while riding — I rely on audio cues for a lot of my 3d sense of what's going on around me. I also practice the “SEE” idea that they talked about at the motorcycle safety course I took — “Search, Evaluate, Execute.” I like focusing my whole mind on what's going on around me — what every driver is going to do next, what the contours of the road are like, what my lines are if this guy over here hasn't seen me and is going to pull out — and so on. In a very real sense my life depends on it. (Incidentally, so far, nobody's done anything stupid while I'm riding. I kind of wish they would more often so I had practice dealing with it.) It reminds me a lot of a common technique in meditation or yoga — where you focus the mind on your breathing to help you quiet down the chatter of your mind. I really enjoy having that stillness now, where the only things going on are the mindful being right there.

Cons

* No audio. All that being said, I do miss catching up on podcasts, and the 'drive time' was about the only time I did that any more. (That, and doing chores around the house. Wait a minute, I can listen to podcasts AND make my wife happy at the same time! I think I'm on to something here…..)
* Weather. This one hasn't bitten me yet, but the scooter is distinctly not air conditioned. We had one random 90+ day here and waiting at lights was un-fun. (However, you do a lot less waiting, so that works out ok.) When you're moving, it still feels great. I'm also pretty sure that riding in a rainstorm would stink.
** Staying dry is harder
** I rely a lot more on road surface traction for cornering than a car does.
* Increased risk, no doubt. However, looking over the stats on crashes, I've decreased my risk quite a bit. I
** Always wear a helmet
** Don't ride after drinking
** Took a motorcycle safety course where I practiced emergency evasion
** Don't go on the freeway
If my math is right, I'm statistically about as safe as a car driver now!
Honestly, as long as you're paying attention, it'd seem that bikes have a decreased risk of being in a crash. The factors are: people are coded to look for cars, so they're less likely to see you. However, you're small, and you stop/accelerate/swerve fast, so you can avoid a lot of accidents that would normally be inevitable for cars. Again, the key is paying attention. The problem is if you don't avoid one it's probably going to hurt.

Also, I am fully aware of how ironic it would be if something really bad happened after I wrote this post. Therefore, I am attempting to defuse the inherent potential irony by stating — yes, I know, it'd be ironic. (Let's hope that works.)

Nice cruise today on the scooter

Sunday, May 4th, 2008

I had some time this afternoon, and it was a nice day, so I decided to take the scooter out for some exploring. We live right next to Pacific Palisades, and I've never really headed over there, so figured 'why not.' It ended up being 35 miles! There's some really gorgeous views to be had around there, and what look like some great (and accessible) trails which are an easy trip for us to get to.

In the future I would wear a jacket, no matter how warm it seems. Got a bit chilly.

I had the GPS under the seat recording the tracklogs, and here's the results:


View Larger Map