The Latest

  • Goal update, July 2014

    Another month has passed, so here’s another summary of how I’m doing on my goals. I wrote last month that I started getting back on track in June; I cycled and ran a lot, and turned my rough spring from minor weight gain back to minor weight loss. If June was solid then July was the month when I began feeling confident again. I kept my goals in sight through July, and everything is moving the right direction.

    I set a new personal record for running this month. My first month ever over 100 miles. But I didn’t bike as much as I wanted to. My Trek suffered catastrophic derailer failure 10 miles from home on the Fourth of July. This destroyed the derailer, broke or damaged every spoke on the right side of the rear wheel, dinged up the hub, and bent the derailer hanger. The poor bike is unrideable. I got the hangar straightened out and picked up a new derailer, but I still need to rebuild the rear wheel before I can ride it again. I have been riding my single speed—sometimes fixed gear—Schwinn and I borrowed my dad’s bike for a ride around Ames, but to be honest the breakdown hurt my enthusiasm and I didn’t do many long rides this month.

    I improved my weight, activity, and food tracking setup with the help of recent integration between myfitnesspal and Garmin Connect. Now myfitnesspal is acting as the bridge between the different online systems I use, glueing them all together—a little haphazardly—into one almost automated system as outlined below:

    • Weight: Every morning that I’m home I step on my Withings wifi scale, which uploads the data to Withings. From there it gets automatically downloaded to a small data file through IFTTT, and sent over to Runkeeper and myfitnesspal via their APIs. Once it is in myfitnesspal it gets automatically added to Garmin Connect via another API. It’s a bit convoluted, but the upside is that I step on the scale in the morning, and my various online services are all updated automatically. When I’m not home I use whatever scale is handy and record it manually, or skip weigh-in.
    • Activities: I track my general daily activity with a Garmin vívofit, which replaced my missing Fitbit. That data gets uploaded to Garmin Connect through the app on my iPhone. I record runs, bike rides, hikes, and so on with my fēnix 2, which also goes to Garmin Connect. Garmin sends this activity data to myfitnesspal, where it’s added to my estimated Calorie burn and daily goals. Incidentally, my Fitbit is somewhere in my apartment, because it still occasionally syncs with my phone; apparently it has a low battery.
    • Food: Food is the only manual part of my process now. I wish this could be automated but no such tool exists. I use myfitnesspal, which has most foods I eat, a good bar code scanner, and decent recipe tools. It can be hard to keep it up to date or remember to log everything, but I try. When I use it well I get a great picture of what helps me or hurts me.
    Activity2014 GoalJulyTo DateProgress
    Running600 miles104 miles549 miles92%
    Cycling1,000 miles85 miles541 miles54%
    Weight Loss40 pounds2 pounds13 pounds33%

    — Steve

  • Brew day — ESB 2014

    My latest beer is an ESB. It’s a slight modification of the recipe I used in 2012. I increased the recipe size for 5.5 gallons of finished beer, which means nearly 6 gallons in the fermenter. I figure why not, since I’m using slightly larger fermenters. I also simplified the recipe a bit. I removed the Munich malt and switched to a slightly darker English crystal malt. I also switched the hops around. I went with Willamette hops for bittering and East Kent Goldings for aroma and flavor, reduced the boil time, and got rid of the first wort hops.

    Brewing went very well. Good efficiency, good temperatures, and no surprises.

    Recipe (70 minute boil):

    Malt

    • 5.5 lbs US 2 row
    • 5.5 lbs Maris Otter
    • 1.0 lb UK medium crystal

    Hops

    • 2.0 oz US Willamette 4.4%, 70 min (29 IBUs)
    • 1.0 oz East Kent Goldings 5.1%, 15 min (8 IBUs)
    • 1.0 oz East Kent Goldings 5.1%, 1 min (1 IBU)

    Yeast

    • White Labs WLP002 English Ale Yeast
    • 1 L yeast starter with 75 gm of DME

    Mash

    • Infusion: 15 quarts at 174F for 154F mash.
    • Batch sparge: 23 quarts at 170F

    Characteristics

    MeasurementExpectedActualReference
    Efficiency75%75%N/A
    OG1.0541.0541.048 — 1.060
    FG1.0141.0101.010 — 1.016
    ABV5.3%5.8%4.6% — 6.2%
    IBUs393930 — 50
    Color (SRM)10Amber6 — 18

    — Steve

  • Running log excerpts

    Over the last 18 months I’ve progressed from being unable to run more than a minute or so at a time to completing several 10k races and a half marathon. I keep a journal, and so my progress and fears are well documented. I thought I’d share some of them, along with a sort of breakdown of the various stages I’ve been through on the way.

    Starting out

    I started with the Couch to 5k plan that seems so popular these days. It seemed to work for others, and I was starting from zero. Any help was welcome. I got started in late November, and was well into the plan by mid December. I wrote about the process and my progress last February.

    December 17, 2012

    I went running again tonight, even though I felt tired and shitty and stressed out. I was worried the longer intervals would give me trouble, but surprisingly I made it without stopping early. The last 3 minute period was hard, but I did make it.

    January 19, 2013

    I went running again this morning, keeping up my goal of 3 times a week. I made it to a mile, though not by a lot.

    February 8, 2013

    I ran again last night but couldn’t make my goal. I got such a stich in my side that I had to walk for a while. If I could have kept breathing I could have kept running.

    Until I finally made it 3.1 miles without stopping in mid-February.

    February 16, 2013

    I ran a 5k today. 34:50, so a little more than 11 minutes a mile. I wasn’t sure if I could make it, but I just kept going until I did.

    Some general running

    After finishing Couch to 5k, I moved on to general running, without much of a plan. I thought I’d stick with 2 to 3 mile runs and mostly work on increasing my speed. I almost always ran hard, and generally couldn’t make it must past 3 miles. I thought the way to get faster was to run fast all the time, and just push harder as I went. I mostly wanted to finish a 5k run at 10 minutes a mile. Again, I wrote about that here in May.

    March 27, 2013

    I went for a run last night, after 3 solid weeks off. Travel and a bad cold. It was hard; I stopped to catch my breath at 10 minutes and almost passed out.

    March 30, 2013

    I went for a run first thing this morning. I started with a 2 mile jog, though I didn’t actually make it the full 2 miles without stopping.

    April 7, 2013

    I can finally run 20 solid minutes at below an 11 minute mile.

    April 22, 2013

    My average pace has improved from around 11:30 min/mile to almost 10:30 a mile. I’m hoping to get below 10 minutes eventually.

    May 3, 2013

    Last night I ran 2.5 miles at 9:45/mile. I think that I broke through a real barrier a couple of weeks ago.

    May 9, 2013

    On Saturday the 4th I ran a 31 minute 5k. That’s a big 10 minute/mile goal achieved.

    10k training

    I still dreaded giving up, so I signed up for a 10k in May to keep myself moving. At this point I started following one of the 10k training plans from Runkeeper, though I started with a much too aggressive time target that I eventually had to give up on. My eventual 10k target time was 65 minutes. I ran that race one year ago, and wrote about it here.

    May 10, 2013

    Yesterday I made the decision to not only sign up for Midnight Madness, but to go for the 10k rather than the 5k. I already started on a training plan to get me up there by late June.

    May 17, 2013

    I didn’t make it to 4 miles last night. I had to walk at 3.75.

    May 22, 2013

    I still can’t quite make it to 5 miles without stopping, and I need to get to 6.2. And at my current speed that’s 66 minutes.

    June 7, 2013

    I think the training plan I picked may have been too aggressive.

    June 17, 2013

    My Saturday run went fine, but Sunday didn’t go well at all. I was supposed to do 7 miles and thought it would be no trouble. In truth it was all kinds of trouble.

    July 3, 2013

    Last night’s run was interesting. I did 4 miles at a 10:30 pace, which is my target time for the 10k, then intervals which were less fast than I hoped. I made it with no real issues, but I had chills by the end and almost collapsed when I got home.

    July 7, 2013

    My run this morning was hard. 8 miles is beyond what I can easily do right now. I made it almost to 6 miles, and probably could have done a full 10k, but couldn’t go much more.

    July 15, 2013

    I did the Midnight Madness 10k on Saturday night. Based on my training and current fitness level I set a goal of 65 minutes, and officially I made it! 64:51, 9 seconds to spare.

    After the 10k

    I kept running after finishing my first 10k. Again I didn’t have much of a plan, but I kept working on my intervals and general speed.

    August 7, 2013

    I did an 8 mile interval run last night. While I didn’t make it through all intervals at speed or without stopping, I felt good on the whole. I’m still improving and have more stamina than ever. The overall progress that I’m making is pretty awesome.

    August 12, 2013

    I woke up early and hit the trail. I did my 10 mile run and though it wasn’t fast it was a big milestone. I had to walk a few times, I drank all my water, and my legs felt like lead, but I made it.

    August 31, 2013

    I had planned to go for a 60 minute 10k this morning, but it didn’t go well. I ran out of breath early and my legs are hurting. My shoes have less than 200 miles on them but I think they may be shot.

    September 18, 2013

    Another 5 mile run last night. I ran at about the pace that I did the 10k in July, and I consider it to be a comfortable speed. But it is still slow. I am not really certain how to get faster.

    Time to try a half marathon

    I decided to try a new challenge, and started training to run a half marathon. Ever stupidly ambitious, I set an impossible goal of 2 hours when I started. I later realized that wasn’t possible, and changed my goal to something simpler: to finish.

    This was about the time that I started paying attention to the advice that said that most runs should be at a slow pace, with some interval training and occasional longer race-pace runs. Up until this time I was determined to push my pace on every run. Now I was running slower than 11 minutes a mile again, on purpose.

    Even now going slow on my slow runs is hard.

    I wrote about signing up for the half marathon, and later completing the race here.

    October 9, 2013

    Last night’s run was interesting. It was hard at first to settle into the slower pace but after a little while I steadied out. Running slow used to be a lot harder.

    October 11, 2013

    Last night’s run was late, around sundown. It was chilly until I really got moving. I may have to switch to long sleeves before too much longer. The pace I’m trying to maintain is slower than average, which can be its own challenge. But it’s easy to maintain and I don’t feel tired.

    November 3, 2013

    I did my first long run in a while today. 8+ miles. It was a little rough but really not all that bad. Despite my slacking off I still have some of the endurance that I spent the last year building up.

    November 26, 2013

    I moved into the second phase of half marathon training this morning with my first interval run. 8 short, fast intervals at around 8 minutes a mile, with slower recovery periods. It was hard-ish, but honestly I did fine.

    January 7, 2014

    I reset my training plan for the half marathon. I missed more than two weeks of runs between Christmas and getting sick, and realized that I wouldn’t be able to just pick up as though nothing happened.

    I pretty much guarantee that running 13 miles at a 10 minute pace will be very hard. It might even be prove to be impossible.

    January 13, 2014

    On Saturday I did a 7 mile run, which was a lot harder than it should have been. I don’t seem to be fully recovered from getting sick at the beginning of the month. I made it about 6 miles and then ended up finishing with more of a run/walk thing. That’s not good news for running a half marathon.

    Getting more complicated with heart rate measurement

    Around this time I picked up low end Garmin GPS watch with a heart rate monitor, and started recorded heart rate data. I wasn’t yet training by heart rate, but at least was starting to consider it. I was still foolishly aiming to run my half marathon at a 10 minute mile pace.

    My interval sessions and race pace training was still all based on a target time and not heart rate. I hadn’t yet established my resting or maximum heart rates or any training zones. Looking back at the data now I was well into Zone 3 for my easy runs and in Zone 5 for my intervals. I was pushing harder than I should have in pursuit of times I wasn’t physically ready to achieve.

    My mileage was piling up at this time, going from long weekend runs of 7 miles all the way to 12 to prepare for the late March race.

    January 20, 2014

    Saturday’s run was the hard one, as it had 2 15 minute intervals at around 9:10/mile, and I wasn’t sure I could maintain that pace. I did OK though, clocking in about 10 seconds a mile slow.

    February 3, 2014

    I ran a lot of miles this weekend, but fewer than I had planned. My pace on Saturday’s long run was a lot slower than planned and I ended up more exhausted than expected. I blame running through snow.

    February 14, 2014

    5 weeks until the half marathon. I’m scared.

    February 24, 2014

    Saturday’s 10 mile run was very difficult. I hardly made it past 6 miles before I started flagging, and I wasn’t even going all that fast. I worry that getting to 13.1 will be extremely hard even with all my training.

    March 3, 2014

    Longest run ever on Saturday. 11.25 miles, at a little over 12 minutes a mile. I think that’s about the right training pace, which just reminds me that I’m still very slow.

    March 11, 2014

    11 days until the half marathon. I’m terrified at how I’m going to do in the actual race. I ran 12 miles and wasn’t dead last week, but if I ever have even a little bit of a time goal that speed does not support it. Everyone says to not focus on a time, to just finish. They’re probably right, but I desperately want to achieve a good time. I would like to beat 2:30. That’s a little less than 11:30 a mile.

    March 27, 2014

    The race on saturday was up in Golden, on a truly miserable morning. While Friday had been warm and sunny, Saturday was below freezing, gray, cloudy, and threatening snow. Still the race went on. I wore two shirts and long pants, which mostly kept me warm after the run started.

    The first few miles felt great, and I settled into what felt like an easy pace. But after the turnaround it was all uphill. I started lagging on the uphill. In the end I made it in 2:28:08. Slower than the 11 minute pace I hoped for, but faster than my target of 2:30.

    Changing cadence and using my heart rate monitor

    The half marathon was my first run using the Garmin Fenix 2, which records cadence as steps per minute based on the oscillation of the heart rate strap. The data for my half marathon shows I steadily ran at about 160 steps per minute the whole time. Looking at older data from an app on my phone shows that I was usually between 150 and 160 on every run, and that this didn’t change much as I changed speed.

    I read a lot about how increasing turnover and therefore cadence was one key way to improve speed, and potentially to reduce injury by shortening stride length. I had been struggling with shin splints, and now that this data was being recorded and displayed on my wrist I had a way to work on improving it. I started with just trying to take faster steps, and over a few weeks a shorter, quicker stride became habit. Now I routinely average 180 steps a minute, and take more steps at faster paces. I haven’t had any shin issues since.

    At this time I went off to spend 2 months working in Michigan, and although I kept running I stopped writing about my runs as often. Getting through the half marathon seemed to be the point where I went from worrying about running all the time to considering myself a runner. I signed up for the Bolder Boulder 10k, established a training plan based on heart rate zones rather than specific speed targets, and just kept going.

    May 14, 2014

    I’m hoping to run Bolder Boulder in around 55 minutes, but between the elevation change and weight loss troubles I think 57 or 58 would be OK. 9 minute miles would get me to 56. I can do that on a flat course in Michigan. Can I do it on some hills in Colorado?

    June 16, 2014

    I set a personal best at the Bolder Boulder 10k on Memorial Day. I wrote that 57 or 58 minutes would be OK. Well, I ran the race in 57:58. A win, I think.

    I’m flying to Iowa in a few weeks to run Midnight Madness again. My target now is to beat 56 minutes, based on the Bolder Boulder results. The Ames course is flatter and has more air, but it will also be hotter.

    July 15, 2014

    Iowa was great, and Midnight Madness went pretty well. Despite having 3 beers between brunch and lunch, I was hydrated and ready to run when the gun went off at 8:30. I was feeling good the whole way, trying to keep just under 9 minutes per mile based on my watch. Everything seemed primed for my 56 minute target, but I was just slow enough on the two hill climbs. When I saw the clock after the last hill I realized I might not make it, but went all out on the last stretch to try.

    I was just short, with an official time of 56:09. Even with the 8 seconds it took to reach the start line—the race only does gun time, not chip time—I would be a second short. I definitely had the reserves to make up those 9 seconds, and the next race will be faster.

    What comes next

    At this point I’ve achieved my early goals, and most of the ones I set afterwards. I’ve done 3 10k races, improving my time by nearly 9 minutes in just a year. I ran a half marathon too, and plan to do another this year. At this point I think I just want to get fitter and faster.

    I plan to sign up for my next big race this week: the Boulder Half Marathon in October. I’m already training for the race and plan to blow my March time away. Along the way I plan to run a few 5k and 10k races. I could be reaching the point where I don’t set personal records on every race, but I think weight loss and running will eventually lead me to a 10k time of under 50 minutes.

    Maybe I can improve more and maybe I can’t. But it doesn’t matter. In less than two years I made it from struggling with Couch to 5k to running 3 10k races and a half marathon. I run 5 times a week and enjoy it. I see improvement in my race times and overall fitness levels. I see improvement on the scale.

    If you asked back before I started if I’d ever make it this far, I doubt I would have said yes. I see a clear progression when I look back, but I don’t think I could have mapped the path forward. It really is just one step—one run, one race—at a time.

    — Steve

  • Goal update, June 2014

    April and May weren’t great months, but I started getting back on track in June. Between stress and travel I’m not doing a great job of tracking what I eat and drink, but I’m staying active and that helps a lot.

    I spent more time on my bike this month, and plan to keep that up in July. The weather has been great most weekends, as long as I’m on the trail before noon. Afternoons bring thunderstorms this time of year, but the mornings almost always start out clear and bright. And I finally have more cycling miles than running miles. It’s been backwards since February.

    I haven’t lost much weight, but I’m going back down at least. Maybe I can hit 200 pounds by my sister’s wedding, only six weeks away. And Midnight Madness is only a week and a half away. I’d like to take another one or two minutes off my Boulder Boulder time and get down under a 9 minute mile. But if it is hot and humid I might go slower. I did a long run near Kansas City over the weekend and the heat sapped a lot of my speed.

    Activity2014 GoalJuneTo DateProgress
    Running600 miles85 miles446 miles74%
    Cycling1,000 miles168 miles456 miles46%
    Weight Loss40 pounds1 pound11 pounds28%

    I guess we’ll see how July goes.

    — Steve

  • Making up lost progress

    As I wrote two weeks ago I had a couple of rough months. My weight loss stalled and I hardly rode a bike at all. Since then I have worked to make up for the lost progress. But despite the level of effort I have made it hasn’t really felt like work.

    Maybe that’s the biggest gain I’ve made since I started running back in 2012. An individual run like this morning’s difficult set of intervals may be hard, but four runs a week is part of my life now. I feel bad when I don’t run. I’m happy to get an early start on weekends and spend an hour out on the trail.

    Now that I’m back in Denver I have access to my bikes again too. Both my Trek road bike and my Schwinn single speed are all tuned up for riding this summer. But because I was traveling for most of spring I hardly rode at all. The chart I use to track my 2014 goals showed steady running progress but only slow sporadic progress in cycling. At least until late May.

    Since I got home I’ve made an effort to ride more frequently. The days are long this time of year. I can easily fit 10–20 miles in on a weekday afternoon, and many more on the weekend. My mileage went from a near flatline to rapid increase.

    To add to this, I’m eating better now that I’m home. I have access to my food scale, a full kitchen, and no need to go out for meals all the time. I lost two months of progress, but my weight trend line is moving downwards again. I’m nearly where I was before I started traveling back in April. I’m disappointed that I lost time, but happy that I can start making up for it. With a little luck and much hard work I’ll be under 200 pounds by late July.

    And I’m in the best shape of my life.

    — Steve

  • Goal update, May 2014

    Like April, May was something of a bad month for my fitness goals. I was traveling for work from the beginning of the month through the 23rd, and a number of things slipped as a consequence.

    I was eating out at restaurants most of the time, and the result was that I gained 2 pounds in May. I’m not happy at all about that, but there’s nothing to do but try to keep moving forward. I also took a week off running to let a minor toe injury heal. And most of my cycling occurred in two short weekends. I guess I should be happy that I got any cycling done at all.

    The goal for June now is to get back in the swing of things. I have more travel coming up this month, but I’m going to try hard to stay on track despite the temptations of travel.

    Activity2014 GoalMayTo DateProgress
    Running600 miles61 miles361 miles60%
    Cycling1,000 miles87 miles288 miles29%
    Weight Loss40 pounds-2 pounds10 pounds25%

    Bolder Boulder 2014

    I’m throwing in a quick Bolder Boulder race report here too. This was my second official 10k, after Midnight Madness last year. There’s no way to compare the two races though, other than the distance. Where Midnight Madness is a nice size race in a small college town, Bolder Boulder is a gigantic race in a bigger college town.

    And I do mean gigantic. There were over 45,000 finishers this year. It’s almost unbelievable, and yet the whole thing was very smooth from start to finish. Parking was smooth, the start was smooth, the race was good, and the post race lines, food, beer, and so on were easy. I’m very impressed.

    Ben flew in from the Twin Cities to run, despite his injured foot. We also met up with the doctors Buck, Pete and his daughter Alison, who both flew in just for the race.

    I set a new personal best with a time of 57:58. I hoped to hold a 9 minute mile, but I’m pretty happy with my finish. I took nearly 7 minutes off my 10k time in less than a year.

    Ben meanwhile ended up at 884th overall. Top 2 percent with a foot injury. He’s crazy.

    After the race, and after saying goodbye to the Bucks, I watched the men and women’s pro races. The noise of the crowd as the runners entered the final stretch in the stadium was pretty amazing.

    To finish the race day, Ben and I met up with my friend John, who drove up to Boulder from Colorado Springs with his family. I hadn’t seen him since [last October, when we met up at the Garden of the Gods][john], and I hadn’t seen his wife Aoi and his kids in much longer. The last time I saw his little girl Mari she was a little toddler. Now she’s around 4 and loves to talk. I also got to meet little Victor for the first time. He’s only about 2 months old and was a little sleepy, but I look forward to seeing him again.

    We got lunch and beers at [Oskar Blues], and got to catch up on life in general. It was totally worth the wait and the drive.

    All told, the race day was fantastic. I was nervous and worried before it, but I set a personal best, saw some very good friends, had good beer and food, and generally just had a great weekend. I hope to do it again in the future.

    — Steve

  • Paste tables as MultiMarkdown in Editorial for iPad

    I purchased Editorial when it first came out last year, and I’ve used it to write a number of documents including several posts for this blog. Its Markdown support is great, and whatever dialect it uses aligns well with the features I need from MultiMarkdown and kramdown, the two variants of the language that I use.[1]

    The main feature of Editorial—the one that set it apart from every other Dropbox-enabled Markdown editor—is its extensive automation and scriptability support in the form of workflows. I have never been big on scripting my editors, and so while I spent some time exploring this feature when I first purchased the app I didn’t do much with it. I wrote a simple script to convert pasted links, imported a couple other Markdown link scripts, and not much else. Not much else was needed; I mostly write text and when I need something more complex I do it on the computer.

    But I do make tables. Most of my brewing posts and my fitness progress posts contain simple tables written in the MultiMarkdown table format, as so:

    | Header | Row     | Goes | Here     |
    |:-------|:--------|:-----|:---------|
    | Then   | we      | have | all      |
    | the    | content | of   | the      |
    | table  | like    | this | example. |
    

    But aligning everything by hand feels like more work than necessary. It’s so much easier to type this:

    | Header | Row | Goes | Here |
    |--|--|--|--|
    | Then | we | have | all |
    | the | content | of | the |
    | table | like | this | example. |
    

    Both convert to the same output (other than the cell alignment, which is specified in the first example) as shown.

    HeaderRowGoesHere
    Thenwehaveall
    thecontentofthe
    tablelikethisexample.

    So why does it matter? Because I want my source files to be just another version of my content. They should be human readable. As John Gruber, the creator of Markdown, puts it:

    The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.

    A nicely aligned table is easy to read and understand.

    This was a perfect chance to use Editorial’s workflows and python scripting. I could get software to do boring work for me and just let me write. I already had Dr. Drang’s table scripts for BBEdit installed, and the formatting script was written in python. It was simple to convert this to a filter script for Editorial instead:

    #coding: utf-8
    import workflow
    """Prettify MultiMarkdown Table
    
    Formats a MultiMarkdown table into a neat set of columns
    
    This is basically just a minor edit of Dr. Drang's script, converted
    to an Editorial python workflow.
    
    http://www.leancrew.com/all-this/2012/11/markdown-table-scripts-for-bbedit/
    """
    
    unformatted = workflow.get_input()
    
    def just(string, type, n):
        "Justify a string to length n according to type."
    
        if type == '::':
            return string.center(n)
        elif type == '-:':
            return string.rjust(n)
        elif type == ':-':
            return string.ljust(n)
        else:
            return string
    
    
    def normtable(text):
        "Aligns the vertical bars in a text table."
    
        # Start by turning the text into a list of lines.
        lines = text.splitlines()
        rows = len(lines)
    
        formatrow = 1
    
        # Figure out the cell formatting.
        # First, find the separator line.
        for i in range(rows):
            if set(lines[i]).issubset('|:.-'):
                formatline = lines[i]
                formatrow = i
                break
    
        # Delete the separator line from the content.
        del lines[formatrow]
    
        # Determine how each column is to be justified.
        formatline = formatline.strip(' ')
        if formatline[0] == '|': formatline = formatline[1:]
        if formatline[-1] == '|': formatline = formatline[:-1]
        fstrings = formatline.split('|')
        justify = []
        for cell in fstrings:
            ends = cell[0] + cell[-1]
            if ends == '::':
                justify.append('::')
            elif ends == '-:':
                justify.append('-:')
            else:
                justify.append(':-')
    
        # Assume the number of columns in the separator line is the number
        # for the entire table.
        columns = len(justify)
    
        # Extract the content into a matrix.
        content = []
        for line in lines:
            line = line.strip(' ')
            if line[0] == '|': line = line[1:]
            if line[-1] == '|': line = line[:-1]
            cells = line.split('|')
            # Put exactly one space at each end as "bumpers."
            linecontent = [ ' ' + x.strip() + ' ' for x in cells ]
            content.append(linecontent)
    
        # Append cells to rows that don't have enough.
        rows = len(content)
        for i in range(rows):
            while len(content[i]) < columns:
                content[i].append('')
    
        # Get the width of the content in each column. The minimum width will
        # be 2, because that's the shortest length of a formatting string and
        # because that matches an empty column with "bumper" spaces.
        widths = [2] * columns
        for row in content:
            for i in range(columns):
                widths[i] = max(len(row[i]), widths[i])
    
        # Add whitespace to make all the columns the same width and 
        formatted = []
        for row in content:
            formatted.append('|' + '|'.join([ just(s, t, n) for (s, t, n) in zip(row, justify, widths) ]) + '|')
    
        # Recreate the format line with the appropriate column widths.
        formatline = '|' + '|'.join([ s[0] + '-'*(n-2) + s[-1] for (s, n) in zip(justify, widths) ]) + '|'
    
        # Insert the formatline back into the table.
        formatted.insert(formatrow, formatline)
    
        # Return the formatted table.
        return '\n'.join(formatted)
    
    # Return formatted output to workflow. 
    formatted = normtable(unformatted)
    workflow.set_output(formatted)
    

    99% of this is a simple copy and paste of Dr. Drang’s work. I added this script to an Editorial Workflow I call Format Table. It takes selected text (such as the messy table shown above) and makes it pretty using Dr. Drang’s script.

    In addition to making handmade tables pretty, I also occasionally paste tables from Pages, Numbers, or web sites that I want to use. These generally get pasted as tab separated tables. Dr. Drang provided a short script in perl that converts them to basic MultiMarkdown, but I had to write something in python for Editorial. What I put together isn’t fantastic, but it works:

    #coding: utf-8
    import workflow
    """Convert to MultiMarkdown table
    
    Python script for Editorial that converts copied tables from the web, 
    spreadsheets, and so on (anything that hits the clipboard as a tab
    separated table) to a basic MultiMarkdown table."""
    
    input_table = workflow.get_input()
    
    # Split into a list of lines, assume first line is the header row.
    lines = input_table.splitlines()
    first_line = lines.pop(0)
    
    # Count tabs to get columns. There is one more column than tabs.
    columns = first_line.count('\t') + 1
    
    # Build a basic format line as a list. Will output a format string
    # in the form of '---|----|----|----|---'
    formatline = []
    for col in range(0, columns):
        formatline.append('--')
    formatstring = '-|-'.join(formatline)
    
    # Replace tabs in each line of the original table with |, and build a list
    content = []
    content.append(first_line.replace('\t',' | '))      # Header row
    content.append(formatstring)                        # Separator row
    for line in lines:                                  # Table content
        content.append(line.replace('\t',' | '))
    
    # Add leading and trailing | characters
    formatted = []
    for row in content:
        formatted.append('|' + row + '|')
    
    # Return the markdown table as a string separated by newlines
    table = '\n'.join(formatted)
    
    workflow.set_output(table)
    

    I made a second workflow for Editorial called Paste as Table that combines this with the first script, and applies it to the contents of the clipboard. If you copy a table from another app like Numbers or Safari, and use this workflow, the table will be pasted as nicely formatted MultiMarkdown at the cursor position in your Editorial document.

    I put both of these workflows in my toolbar and now if I copy a table from the web or create one in Numbers it will paste cleanly and quickly right into my document. I’m sure this has already been done by others, and I’m sure I spent more time on this than I needed to, and I’m sure this script does not handle edge cases gracefully, but it does work rather well for me. Hopefully someone else gets some use out of this too.

    — Steve


    1. There are several variants of Markdown that add a number of features to the original implementation. The key features that I use are tables and footnotes.↩︎
  • Goal update, April 2014

    April was not a great month. I left Denver for Michigan on April 7 and have been on the road since. That means a lot of restaurant meals, poor tracking of what I eat, and no cycling at all. I didn’t have access to a scale for most of the month, and when I did the picture wasn’t pretty.

    The only thing I really did right this month was stick to my running plan. And on that I am happy to report that I am making noticeable progress in both speed and endurance. I do wonder if I’m going faster partly because there’s more air to breathe down here in the Midwest.

    I’ll find out soon. The Bolder Boulder 10k race is in under four weeks, and I plan to blow my last 10k time away. Definitely under 60 minutes, where my first was just under 65. Ideally I’ll be able to finish around 55.

    Otherwise, it looks like I’m on pace for closer to 900 miles running if I keep going at this rate. I still think I can make the bike numbers once I get back in the saddle, but I have serious catching up to do.

    Summary

    Activity2014 GoalAprilTo DateProgress
    Running600 miles85 miles300 miles50%
    Cycling1,000 miles0 miles201 miles20%
    Weight Loss40 pounds1 pounds12 pounds30%

    — Steve

  • Goal update, March 2014

    Welcome to the third regular installment of “am I making progress?” For the curious I have links to updates from January and February.

    I am mostly on track to achieve my goals. Three months in and I’m ahead of my running goal, on target with my weight loss goal, and only a little behind with cycling. I finished training and ran the half-marathon on March 22 — in dismal weather. I included a brief race report near the end of this post.

    It’s March in Colorado, which means wild swings between sunny and 60s to snow and cold. But we are trending towards warmer more springlike weather. Most of the bad weather seemed to hit on weekends. My first run of the month was an 11 miler in 15 degree weather, and the next weekend I ran 12 miles through snow and mud on another chilly Saturday. As a final touch race day was cold and windy, with light flurries.

    But there were good days too. Enough for more bike rides and a chance to catch up on my riding goal. I’m still behind — I should be at 25 percent — but I can make that up over a few nice weekends. It may even be getting warm enough to start running in the morning instead of after work, assuming I can wake up early.

    Now that my race is past I’m not training for anything specific. I will run the Bolder Boulder 10k in 8 weeks, but I decided to just run it without a specific plan. Instead I am working through a more general running plan with a mix of long runs and intervals aimed at increasing speed and overall fitness. I wanted some structure on the calendar; a plan to keep me motivated. I should run plenty of miles in April and May.

    March was good for weight loss, with the trendline showing 5 pounds gone since the start of the month. Some weeks have been better than others but overall things are going well. I had to buy new jeans and a new belt, and I need to go shopping for work pants too.

    I also did my first hike of the year — a trek from Chautauqua Park up to the first flatiron in Boulder. I wrote about the hike earlier this month, including some pictures.

    Summary

    Activity2014 GoalMarchTo DateProgress
    Running600 miles89 miles215 miles36%
    Cycling1,000 miles84 miles201 miles20%
    Weight Loss40 pounds5 pounds11 pounds28%

    Half-marathon race report

    Pictures by Annie Block.

    I planned to write a separate half-marathon report, but didn’t get to it. So here it is as part of the monthly update.

    I’ll start with how I got here. I finished my first 10k last summer at Ames Midnight Madness. After that I kept going, trying to finish a bunch of runs on the 10k training plan that I hadn’t completed before the race. That kept me busy through August, and coasting through September. But my run distance in September and October dropped to about 2/3 of what it had been before the 10k. I worried that I was going to start skipping runs if I didn’t have a target to aim for.

    So in mid-November I lost my mind and signed up for a half-marathon. It seemed like the sort of challenge that could keep me motivated, and be difficult but achievable. I chose a smaller race up in Golden, both because of the timing and its size. It only had a few hundred runners each of the last two years, and I felt like the pressure would be less than a bigger race.

    I started in on a basic 16 week plan in November. I took something of a break in December, but started back up in earnest in January, after I recovered from a bad cold at the start of the year. I progressed to longer and longer runs, eventually making it through 12 miles 2 weeks before the race.

    I pulled back on the distance after that, hoping to recover some strength after all the conditioning work. My long runs had been at a relatively slow pace, with some faster intervals mixed in. Estimating race pace was difficult, since I had never run that distance before. I hoped I could sustain an 11 minute average mile, which would put me at 2 hours and 24 minutes, while my overall “must achieve” target was 2 hours and 30 minutes.

    My Dad and younger sister Annie drove out to Colorado to be my support team. Their decision to come was a late one, but made me happy. Annie has been a big supporter ever since I started running.

    Although the day before was warm and sunny, race day was cold, windy, cloudy, and generally miserable. The weather report showed 28 degrees before the race start, and I don’t think it got any warmer in the two and a half hours I was on the trail.

    The first 5+ miles of the course were downhill, and during this portion I was feeling great. I settled into what felt like a nice easy pace at under 10:30 a mile. Which I held with no struggle until the out and back turnaround. Looking back it might have been smart to go slow on purpose at the start to save more energy for the long uphill.

    Except for one steep descent, the rest of the race was a long uphill slog. Shortly after turning around I slipped back to 11 minutes a mile, which I held through mile 9 of the course. Somewhere around that point my dad and Annie found me, and I got a quick hug from her before moving on to the really hard part.

    The last few miles of the course were a loop around the north side of a big reservoir. The trail around the reservoir climbs a couple hundred feet up, well above the lake. Where the previous few miles had been a steady gentle climb, the slope increased sharply up to the 11 mile mark, and I slowed way down, closer to a 13 minute mile. I started walking on the uphill because I couldn’t keep my heart rate from running crazy even at a shuffle.

    By the time I hit the huge downhill on the west side of the lake I was pretty much completely wiped out. I got down the hill quickly, but the last mile and a half were uphill again. I was struggling hard at this point. Some quick math told me I wouldn’t make 2:24, but that I should have no trouble with 2:30 as long as I kept going. Dad and Annie found me again on the far side of the lake. That girl can yell.

    I finally struggled up the last couple of hills and crossed the finish line. My official chip time was 2:28:08, at an 11:19 minute/mile pace. The gritty details are all on Garmin Connect, though I didn’t stop my watch until almost a minute after crossing the line.

    I was completely wiped out at the end and it was a couple of minutes before I could really talk. And it was still cold and windy. My torso was cold and my hands were going numb and a golden retriever stole my breakfast burrito.

    But I’m happy. I finished, not at the back of my division, not at the back of the race. I made it the whole distance and I’m still running on the other side. I’m thinking of signing up for another in the fall, after I have the whole summer to run and bike and get faster.

    — Steve

  • Weekend update, mid-March edition

    We’re halfway through March, which in Colorado means we’re still alternating between snow and 60 degree days. This weekend was typical: a mix of cold and gray with warm, sunny, and cloudless. Not a bad weekend, really. I got in a couple good runs and a nice hike, took a bunch of photos, and am feeling pretty good about my most recent beer.

    A 5 mile run

    This was the last weekend before my half marathon, so I cut my weekend distance. I took Saturday’s 5 miler as a chance to test a faster pace, one I hope I can use for the 10k distance. It was chilly and gray, but once I got moving I warmed right up.

    I started with a slow, easy warm up mile, then followed it with 3 miles at a sub 9:30 pace. I know that doesn’t sound all that fast, but it’s a nice improvement for me from last summer. I can’t say for certain, but based on how I felt I think I can hold that speed for another 3 miles. I’ll see if that holds true on a run after the race.

    Some shopping

    As mentioned in my last couple of posts, I’m working on losing some weight along with the running and cycling. I still have a long ways to go, but I am making progress. This weekend I finally had to give in to reality and buy new jeans and a new belt. I couldn’t keep the old pair up without looking ridiculous.

    I headed to the mall and spent a while trying on 5 different styles of Levis jeans. Eventually settled on a pair of 514s, a size smaller than the old pair of 505s I was wearing. I also picked up a new belt to go with them, since I was on the last hole of the old one, and it was too loose. It feels good to need new clothes for the right reasons.

    An easy Sunday run

    I followed up on Saturday’s 5 miler with an asy 30 minute jog on Sunday morning. While Saturday was about what fast pace I could maintain, Sunday was just about moving for a half hour at a low level of effort. I did a little less than 3 miles and barely broke a sweat. I have to take it on faith that running hard all the time is bad, and that running slow can be good. I don’t actually understand the science, and it feels weird to go slow.

    And a hike, with pictures

    I rented the newest Fuji camera for the weekend. It’s a faster, slightly larger camera in the same system I own. Image quality is essentially the same—excellent—but I was intrigued by the handling improvements which include a larger grip and much larger and faster viewfinder.

    Not content with pictures from my neighborhood and Cherry Creek State Park, I decided to take the rental up to Boulder on Sunday afternoon for a little hiking. I parked on the street near Chautauqua Park and headed up the muddy trails to the first flatiron. Where Saturday was chilly and gray, Sunday was bright, sunny, and warm. There were only a few wispy clouds, and some heat haze in the afternoon air.

    It wasn’t that great for photography, but the camera was a good excuse to take my first hike of 2014. While I hardly broke a sweat in my morning run, the afternoon hike soon had my heart rate way up, and I got a great workout. The trail was muddy near the base, and there was still snow and ice in spots. I made it to the top without incident, and took a few photos of the flatirons and of Boulder below me.

    There were hundreds of people out enjoying the nice day, and the ranks were swelled by students on spring break, including from other states.

    There were even some climbers making their way up the rocks, rather than the trail.

    Finishing off with a beer

    My most recent brew, a reddish Colorado style ale, has been carbonating for a week. That’s not quite enough time to be ready, but I have a hard time waiting. I had a bottle in the fridge and cracked it open when I got home from my hike. The beer still needs time to finish carbonating, but I’m very happy with how it has turned out. It is nicely hoppy but not overly bitter. I’m looking forward to sharing this one.

    And that’s about it for the weekend. My half marathon is on Saturday, and although I’m still nervous I’m looking forward to the run. It’s hard to tell what the weather will be like, and I’m mostly hoping for a lack of rain or snow. Current plans are for my dad and sister to be out here to cheer me on, and I’m looking forward to seeing them both.

    — Steve