How I dropped 20 lbs in 6 months while training on the bike

I’m not sure who obsesses more over their weight – the covers of popular magazines displayed in grocery store checkout lines or road cyclists. My bet would be on the latter. Unlike the magazines, cyclists point to fancy sounding terms like, “power-to-weight ratio”, which basically translates to: how much power you can generate pedaling your bicycle versus how much you weigh. Power-to-weight ratio is particularly important to those who ride up hills on their bicycle, aka “climbing”. The less weight you have to haul up the hill the better. Makes sense. Nevermind the weight obsession.

At the beginning of this year I determined I was only going to target one main cycling event, The Ultimate Challenge in Utah. It’s the sixth stage of the Tour of Utah and it’s full of climbing. Over 10,000′ in total.

Tour of Utah Stage 6 elevation profile

I was at 180 lbs in January, 2016. I’m 6′ 2″, so that weight is not bad. But, I wanted to do better on the bike when it came to climbing and knew that the most significant improvement I could make was losing weight. I also knew how to do that. The question was how much weight I should target to lose. I was concerned about losing weight while training at the same time. As absurd as that sounds, it can be legitimately awful to restrict your calories while putting in miles on the bike on a consistent basis. Losing weight and cycling don’t necessarily go hand in hand. I knew I’d have to balance getting stronger on the bike with losing weight so that I didn’t burn out or make my body vulnerable to every sickness known to man.

Chris Froome. Have you been lifting weights?

Chris Froome. Bodybuilder.

Ever the healthy example, enter pro cycling. (Done laughing yet? Me either.) I learned that most pro cyclists are in a height-to-weight ratio of 2.1 to 2.3. That means you take your height in inches and multiply it by those numbers. I’m 74″ tall, so I was looking at a target range of 155 to 170 lbs. The thought of 155 made me laugh a little. 170 was very doable and didn’t seem like it would push me quite enough, so I targeted 165 lbs. as my ideal weight to get to by the end of June. Since I started losing weight in earnest in February, that gave me 5 months to lose 15 pounds. Losing 3 pounds a month is very reasonable. I felt comfortable with that goal being attainable while not pushing me to reach an impossible balance at meal time and training on the bike.

I lost the first 10 pounds fairly quick and I was feeling good on the bike. I don’t have a power meter for my bike, so the whole “power-to-weight ratio” was going to have to be measured in less scientific ways. I went by feel and some far less scientific measurements in regards to my times up various climbs in the area. Sure enough, I was seeing results and I felt really good. I decided I would set my weight loss target to 160. While the first ten pounds came off fairly quick with small changes in my diet, the next ten didn’t come off so easy. I had to tighten up on my calorie counting and there were a number of nights I went to bed and felt hungry. By the end of June I was in the range of 160-162. In July I was able to settle into my weight. Perfect timing.

The ride is over. I’m happy with my effort, had fun out there, and my body feels good overall.


Me at Ultimate Challenge 2016

Is that a donut or a shot of EPO behind my back? 

In regards to my weight loss in preparation for this ride, my takeaways are:

  • Target a healthy and attainable weight several months in advance of the event
  • Don’t try to lose more than 1 lb. per week
  • Be prepared to be hungry when you train
    • Don’t starve on long (2+ hour) rides – hydrate and eat (I target ~60g carbs per hour after the first 2 hours)
    • Do closely pay attention to what and how much you eat throughout each day, even (especially?) on hard training days
  • Plan on hitting your target weight weeks in advance of the event
    • Stabilizing weight at this time is important so that the focus is on peak strength in regards to conditioning, recovery, and nutrition

DynamoDB and Botkit

emojination_64I recently built (on top of the Botkit framework) and launched a Slack chat based game, emojination. I started out running emojination on Heroku. It was cheap and fast to get up and running there. Heroku does some really nice things for developers that shields the complexity of Amazon’s AWS. However, once I had emojination running well enough on Heroku, I wanted to learn AWS better. I knew about some of the services at a high level and used some of them on projects operationally, but I had never built anything on top of them myself.

I could run everything on “native” Amazon AWS services except Redis, which I was using for Botkit’s storage. While Amazon has a Redis based service, it is meant for caching. I could run Redis on EC2, either running the setup myself or using a 3rd party that makes it simpler to setup and maintain. While those options were reasonable, I wanted to see if I could make use of Amazon’s DynamoDB, since it’s a perfect match for the job (a key/value store), doesn’t require ops overhead on my part, and comes with some AWS free tier incentives. Yep, lock me up in the trunk and throw away the key.

The only problem was that there wasn’t a Botkit storage module for DynamoDB. There was one for Redis, MongoDB, Firebase, etc. but no DynamoDB. Seeing as I have near zero Node.js skils, I thought, “how hard can it be to create the DynamoDB Botkit storage module?” Not too hard, as it turns out, except for the part where I need to still figure out how to get the tests passing where promises are involved. The bulk of my time was spent figuring out how DynamoDB worked and what the options were in regards to npm DynamoDB modules. I ended up using the Dynasty module, which has a nice promise based approach. I found a few surprises along the way working with DynamoDB, but everything is running smoothly now, with emojination using it for both read and write operations.

The end result is there is now a botkit-storage-dynamodb module available for all who are interested in using DynamoDB with their Botkit based bot. A small contribution that has helped me learn quite a bit in a short period of time. ❤️

One little problem setting up Cloudflare SSL via cPanel for a site

I’m not going to give a full tutorial on how to setup Cloudflare SSL for a web site using cPanel for its hosting management. There are better resources for that. However, I did run into an issue that took me a while to track down and I wanted to capture that here in hopes that it saves someone else some time.

I had everything setup on the Cloudflare side and added the keys to cPanel for my domain but received the following error:

The system did not find the Certificate Authority Bundle that matches this certificate

There was a spot in the cPanel SSL setup page for adding the CA Bundle but my Google searches weren’t returning what I needed. Somewhere along the way I finally ran into my answer, which can be found at this Cloudflare support page. Once I added the Cloudflare root certificate from that support page, my site was enabled to serve up pages via HTTPS.

Note: I setup another domain for SSL via this same setup and didn’t have to enter the Cloudflare root certificate again.

Calling a Slack Web API method from a slash command app

I’m currently trying to build a little Slack app. The (Botkit based) app is a “slash command” that also needs access to the team and user info Slack web API methods.

I ran into a problem where I needed an access token that Botkit stores in its users object store. The issue is that when I need to use the access token to call the Slack web API methods, I need to find that token. I wanted to lookup that access token via the team_id that is passed in through the slash command message, but I couldn’t if the token is in the users object store, with the install user’s ID as the key.

Here is an example of what I had in the Botkit users and teams object stores after a user installed my app:



When my app gets a message, it doesn’t have access to the install user’s ID, but it does have the team ID. I needed to pass in that “access_token” for the web API calls like this:

My workaround was to get the access_token from the install user during the install process and store it with the team. This is what that code looks like:

That happens once during install and adds the access token to the teams record:

{"id":"T1DDTABCD","createdBy":"U1DDKABCD","url":"","name":"slack-team-name", "access_token":"xoxp-49999999999-49999999999-59999999999-7e05d2266c"}


I could then call the Slack web API like this:

Notice I’m calling the teams storage and passing in the message.team_id to look up the team for the user who submitted the command.

The one thing I was never told

During the last 2+ years, since being hit by a driver of an SUV while I was riding my bicycle, I was advised on a lot of things – a lot of important things. There was lots of medical and dental advice, and I’m thankful for it. There was quite a bit of legal advice, and I’m thankful for that too. But there was some advice I never received: You need to account for the mental and emotional toll.

I spent so much of my time focused on the “next step” in my recovery that I neglected the mental and emotional side of the equation. I felt “OK” – or so I thought. All attention was paid to the physical and legal components of recovery, and meanwhile, I was pushing forward on near empty without realizing it. I never saw a counselor. I never talked to anyone who asked me questions that would press me a bit beyond, “how’s your body healing?” The doctors I saw never advised me to talk to anyone or to at least be aware of some potential pitfalls beyond the physical. I’m starting to realize that all that trauma, all that stress that comes with recovering from such an event over many months, and all that pressure I put on myself to “get back to normal ASAP” has caught up to me.

I don’t write this to lay blame on anyone. I’m writing this for those who may come across this post as they struggle through their own recovery. Go talk to a counselor. Go talk to someone who will ask questions that friends and family aren’t likely to ask because they don’t even know to ask them. Acknowledge the struggle is beyond what you feel physically, the endless appointments, the non-stop focus on getting back to “normal”. You likely won’t even realize you need to talk to someone, but you do.

I’m capturing my journey towards recovery after being hit by an SUV while riding my bicycle on February 8th, 2014. I’ve learned quite a bit along the way and want to share those lessons. I’m not a doctor, lawyer, or any other sort of expert in this area. Any insights I provide along the way should be taken as my insights to my particular situation. In other words, seek professional counsel if you find yourself in similar circumstances. See more here.