Wasaga Beach Olympic Triathlon – Race Report

This morning I raced the Wasaga Beach Olympic distance triathlon.  The first triathlon I ever did was at Wasaga, a half-sprint distance ‘give-it-a-tri’, in which I emerged from the water looking like a drowned rat after doggy paddling 400m, and then struggled around a 10k bike ride on my clunky old mountain bike.

Fortunately I’ve developed a bit as a triathlete since then.  And although this is the only triathlon I’ve raced this year, I’ve managed to get a decent number of other races under my belt – a marathon, a half marathon, a 10k and the Paris-Ancaster cyclocross race.  And thanks to some friends that have just joined this sport, I’ve been cajoled into putting in a few decent training sessions over the last month.

The weather was horrible during setup, but thankfully the rain stopped as we lined up at the start, and stayed away for the rest of the race.  The swim felt good, and I managed to draft my way to a 27 minute 1500m without burning too much energy.  Wasaga is probably my favourite place to swim; the water is perfectly clear and significantly warmer than Lake Simcoe.

It seemed to take the first 5k of the bike for my legs to warm up, but once they did I felt pretty comfortable, although I think I still have room for improvement here.  The course was well marked, and apart from a couple of disconcertingly wet corners, not too technical.

SportsStats tells me that my transitions are getting pretty good; with both of them under 90 seconds.  After T2 I headed out on the run – a 2-lap out-and-back.  Again, it took five minutes of running before my legs really started responding, and then I started ticking off the kilometers nicely.  This was a ‘fun’ race for me rather than a serious one, so I treated the run like a solid training block rather than a gut-busting effort.  Still, I managed a 4:19/km pace, thanks no doubt to the training I’ve been doing with my local Mudders For Mothers team and some hard tempo runs with my ultra-dedicated training parter Patrick Voo.

So, I finished with a PB, which isn’t really saying too much given that I’ve only run one Oly before, and I cracked horribly on the run that time.  But I believe that every race is a learning opportunity, so here are today’s lessons:

  • Habit makes things easier.  All my kit worked nicely, and I didn’t have to think to hard about the process of pulling it together and setting it up in transition.  Apart from dropping a couple of power gels along the course, there were no real glitches.
  • Muscle memory is a wonderful thing.  I haven’t swum nearly as much this year as I have in previous seasons, but once I had my wetsuit on and got in the water it all seemed to flow very naturally.
  • Running is a little bit like meditation.  When meditating, you’re apparently supposed to focus on your breathing, clear your mind from distractions, and bring your mind to a singular awareness of the present. Running at Lactate Threshold isn’t quite the same thing as relaxing in lotus position, but other than that the same concepts apply. I tell myself when I run that there’s no need to fret over how the race has gone so far, or whether I have the energy to hold this pace till the finish, or whether I’ll hit my target, but just to relax my limbs, keep my core strong, keep my breathing measured, and focus purely on the act of running, on the step that I am taking right now.  It isn’t easy, but it is necessary – when I stop doing that, I tense up and begin to panic. When I do it right, I find myself flowing easily towards the finish line.
  • 2z9jnrsFinally, it’s far more fun to attempt difficult things with friends and family around.  I hugely appreciated having my parents join me for the race, and it was great to see my friend and training partner Steve complete an Olympic distance race in his second ever triathlon.  Truly inspiring!

 

 

 


Reaching Goals

It’s no secret that I like to run.  Since I returned to this sport a few years ago, I’ve logged countless miles, run city streets and wilderness trails, in 40 degree heat and in blizzard conditions, on my own and with friends, and earned a few medals as well.  But I am learning that the for me, the point of running is about more than medals or races.  It is about the intentional practice of setting goals and achieving them.

So I have realised that running, for me, is the the laboratory in which I study the art of ‘optimal performance’.  What I learn in this lab has direct implications on the rest of life.  Running has taught me so many lessons.  Lessons such as:

Create a plan, track your progress, adjust as you go forward.  Learning to perform well in endurance sport requires continual small corrections.  Pay attention to your stride length and cadence.  Mind which part of the foot you are landing on.  Think about your swimming stroke.  Adjust the position of your elbows as you pull.  Change the height of your saddle.  Tweak your diet. Alter the balance between carbs and protein.  Training is never about mindless repetition, but always a mindful process.  In all other endeavours, we also need to continually readjust our habit to make sure we are on course for our goal.

Accept weakness.  Unfortunately, injuries are a part of training.  I don’t think I’ve ever met a serious athlete who hasn’t had to deal with them in one way or another.  But how we deal with them is important – the worst thing to do is to ignore them.  We frequently have to adjust our training plan, or re-evaluate our goals.  I have had to to take long periods away from running, and indeed had to re-learn how to run, to cope with knee pain and ITB tightness.   I have friends who have had to undergo invasive surgery.  But we always do better when we acknowledge the problem early.  Small niggles can be fixed before they become serious injuries, even if it takes humility to recognise that your body has a problem.

On a related note, I’ve learned that not all pain is good, not all pain is bad.  The ‘No Pain No Gain’ mantra is not helpful.  To become a good endurance athlete you must become intimately familiar with different types of pain.  It hurts to do interval workouts, and yet they are amazing for improving your lactate threshold.  It hurts to tear a muscle, and that does you no good at all, and must be acknowledged and treated immediately.

Our weakness do not need to define us, but they must be acknowledged and respected.

product~p~3293G_01~340.3

But I think the most important lesson I have learned is know your mission.   Training for a 5k is very different than training for an ultramarathon.  The former requires tempo runs and interval training, the latter require packing a bag with plenty of water and sandwiches and going out for a day-long run.  But I have found that once you are clear about what your mission is, no matter how difficult a task you have set yourself, the way forward suddenly becomes straightforward.  I’m fortunate to have friends that have gone from sedentary lifestyles to running marathons and triathlons.  These challenges often seem daunting at first, but I’ve observed that once a commitment is made to a specific mission, it then simply becomes a question of working methodically through a known process to arrive at the goal.  And it’s great to be surrounded by a friends who are just as passionate about achieving excellence as I am.  It is hard to be on a mission by yourself.  In this, and every other area of life, I’m learning just how valuable it is to find a community that is oriented around a mission that you believe in.


Four Killer Postgres Extensions

I’ve been using the Postgres database engine for probably 10 years now, and despite having also used Oracle, DB2, Microsoft SQL Server, SQLite, MySQL, Access, FoxPro and others, it’s still by far and away my favourite.

In all my years of using it, I have never once encountered, or even heard of, an incident of data loss or integrity failure.  It implements the SQL standard rigourously. And whatever I throw at it, it seems to just keep humming along.

And more than that, it’s extensible.  Here are four extensions that take it from merely being the most solid, reliable relational database engine in existence, to also being an incredible modern application development platform.  And there easy to install and get started with.

UUID

Install this by simply typing in psql

# CREATE EXTENSION "uuid-ossp";

Since discovering this, I’ve said ‘goodbye’ to SERIAL primary keys forever.  Now, my table definitions frequently look like this:

CREATE TABLE thing(
uuid UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
...
)

And there you go, items of type ‘thing’ will now be uniquely identifable GLOBALLY, as well as within his table.  I can backup and restore the database without worrying about getting the serial generated correctly, I can merge data from two sources without worrying about conflicts, and I can use that UUID in other code, or in RESTFUL urls, and always be sure what I’m referring to.

pgcrypto

Once again, this can be installed as follows:

# CREATE EXTENSION pgcrypto;

and then you can finally get your password management right, and free of all the embarrassing security errors that have plagued some popular sites in recent years.

I recommend the following structure for a username/password table:

CREATE TABLE app_user(
uuid UUID PRIMARY KEY DEFAULT uuid_generate_v4(), -- just as before!
email text not null,
hashed_password text not null ,
UNIQUE (email)
)

And then populate the hashed_password column by using the handy crypt function from pgcrypto

INSERT INTO app_user (email, hashed_password) VALUES (:email, crypt(:password, gen_salt(‘bf’) ) ) RETURNING uuid;

Then you can check user credentials like this:

SELECT EXISTS (SELECT uuid FROM app_user WHERE email=:email AND hashed_password=crypt(:password,hashed_password));

This has any number of security advantages, and avoids many common pitfalls:

  • The algorithm has a tunable speed.  By choosing a salt of type ‘bf’, the algorithm will be many thousands of times more resistant to brute-force attacks than once based on SHA1, and many many thousands more times resistant to one based on MD5 hashing.  See here for more in-depth info.
  • By creating a new salt for each user, and embedding it in the output hash, the same username/password combination will not result in the same output hash. So even if a malicious attacker had access to this table,  he wouldn’t be able to perform hash lookups in rainbow tables.  It’s frightening that many sites don’t use this approach yet.
  • It’s been very thoroughly tested.  Although I’ve written plenty of crypto code before, I’d always rather use a widely-tested, discussed and understood implementation.  There are so many mistakes that are easy to make and hard to detect in the security world, using a solid open-source library like pgcrypo is just good practice

Hstore

# CREATE EXTENSION hstore;

Hstore allows you to store arbitary key/value pairs in a database column. This is perfect for storing property bags, and in situations where you don’t know at design time exactly what the structure of your data is going to be.

Let’s extend our user table:

CREATE TABLE app_user(
uuid UUID PRIMARY KEY DEFAULT uuid_generate_v4(), -- just as before!
email text not null,
hashed_password text not null,
UNIQUE (email),
properties hstore
)

Now we can assign arbitrary properties to each user:

UPDATE app_user SET properties =  ('twitter_id'=>'sir_tweetsalot', 'comments'=>'some notes here', 'follow_up'=>'1')

and then we can use that hstore field as follows:

SELECT * FROM app_user WHERE app_user.properties->'follow_up'

In fact, with UUID and HStore, Postgres is already looking like a pretty good NoSQL solution, but still with all the traditional SQL benefits of transactional integrity.

 

PLV8imgres

And then finally, plv8.  I’m only beginning to discover how powerful this is, and it really deserves a post of its own.  In brief, PLV8 allows you to write stored procedures in Javascript,  Coffeescript or LiveScript.

There are all sorts of things that you could do with this.  Suffice it to say, last month we were pretty proud of ourselves when we wrote our own dialect of LISP, wrote a parser for it in Coffeescript, and then got the whole thing running inside our Postgres database.  Yeah, we were using Lisp on top of Coffeescript to filter SQL records.  That’s how we do things around here!

And all this is before Postgres formally gets JSON as a standard data type.  I can’t wait!

 

 


Maximum Performance

“Some people … are gifted with high trainability.”

I just read a fascinating article in the Guardian about athletic performance.  The concept of the ‘10000 hours’ of training needed to reach world class performance is well known, but recent research has shown another dimension to the equation, especially in the area of endurance sport.  There is, apparently, a big difference between individuals when it comes to their responsiveness to training.  In the studies, some people showed huge gains in their bodies ability to process and transmit oxygen to their muscles as a result of aerobic trading, but others, performing identical training blocks, showed little or no improvement.  This implies that a genetic predisposition  to adaptability is critical for the budding top level athlete.

This fascinates me.  I’m intrigued by the ingredients that go into excellent performance.  It seems that both natural giving and  disciplined, intentional training are needed.

You could find this research depressing, as it implies that people will never become too level marathoners, for example, no matter how hard they train.  But another way of responding to it would be to ask ‘what are my unique, inborn talents and abilities, and how can I nurture them to create my own excellent performances?’


Different Stories

I realized on my run this morning, in a moment of it’s-probably-obvious-to-everyone-else-but-a-revelation-to-me clarity, just how many different stories there are in the Bible.  I have at the back of my mind this idea that the Christian experience should be more-or-less the same for everyone, but a cursory glance at the Bible with open eyes should really disabuse me of that notion.

Jacob, for example, experienced God as the opponent in a wrestling match.  Moses experienced God as a burning bush, or a pillar of fire.  Job experienced God as a courtroom adversary, (and then both counsel for the defence and judge.)  David experienced God as all-knowing, all-seeing.  Habakkuk experienced God as frustratingly obtuse, Jonah experienced God as frustratingly merciful.

When Jesus turned up on the scene, the Bible continues in this vein.  The Pharisees encountered him as a dangerous challenge. Mary experienced tender compassion.  Peter experienced bold challenge.  Paul experienced dramatic life reversal.  John experienced profound philosophical satisfaction.

Why on earth, then, do I have this story in my head of the Christian experience being one of ‘convert, join a church, meander along in a reasonably satisfactorily middle class life, don’t get into trouble?’

If everyone who encounters God in the Bible had a unique story to tell about the experience, surely the only thing I can expect for sure about my spiritual narrative is that it will, also, be unique?


Social Business

I started reading Muhammad Yunus’ book, Social Business. He suggests that in addition to government agencies, charities and for-profit corporations, the world needs another type of enterprise – the social business.  This is basically a company set up to address a particular social need, such as public health, poverty or education, and is structured similarly to a corporation but returns no dividends or capital gains to its investors.  Any profit is guaranteed to be re-invested into achieving the social goal.

This might sound like a pipe-dream coming from someone else.   Yunus, though, is the guy who founded the Grameen bank.  Through his work millions of people have had access to banking services and small business loans that would have otherwise been denied them.  He has demonstrated in very practical ways that helping the poor can be about more than handouts – that creativity and entrepreneurship are key aspects as well.

In his advice for those considering starting a personal business, he says Start with a personal passion.  Too often, as businesses or individuals, we do whatever we need to do to earn revenue, and consider our ‘mission statement’ as something to be tacked on afterwards, maybe to please investors.   But what would happen if we looked at it the other way round?  If we asked ‘what is my mission in life’ first, and only then asked ‘how am I going to achieve it on an economically sustainable basis?’

Dennis Bakke, in his book Joy at Work suggested a very similar concept.  He argued that the goal of a for-profit corporation and a non-profit charity should really be the same thing: providing a service for society on an economically sustainable basis.

But regardless of how we choose to structure our enterprises – non-profits, corporations, co-ops, we must start with defining our mission, and then decide how we will go about reaching it.


Intentional Nutrition

We’re often been told that we should ‘eat healthy’, but I’m coming to realise that an intelligent approach to nutrition needs to be far more specific than that.  I went into the library the other day to look at books about diet and nutrition.  There were hundreds of books on the subject, and nearly all of them mentioned on the front cover the goal of losing weight.

I think that this is a terrible goal, for several reasons.

Firstly, it is expressed in purely negative terms.  I am convinced that we do well in life when we frame our goals and desires positively.
Secondly, it’s horribly unspecific.  If there is a theoretical perfect weight for every human being, then presumably some people are above that weight and some below.  “Achieve your correct weight” would be a better subtitle.

But thirdly, weight is a terrible proxy for fitness.  I define fitness quite simply as ‘the ability of the body to perform a required task.’  And this could mean very different things depending on the task and the individual in question.  When Ranulph Fiennes prepares for a polar expedition, he very intentionally tries to gain weight, both in fat and in muscle, to sustain himself over the long months ahead of trekking through a frozen wasteland with only what he can drag behind him on a sled for sustenance.  He is guaranteed to burn more calories per day than he can replenish from his food stores, so he has to have extra body mass at the start of his journey.

Scott Jurek is probably the worlds greatest Ultrarunner.  He needs to eat enough food to rebuild his muscles after each days training, and consume enough energy to propel himself for 100 miles over the Sierra Nevada mountains.

An expectant mother also wants her body to perform the task of growing and delivering a baby; and her nutritional needs will be dictated by this process.

A weightlifter or a wrestler or a UFC fighter needs to build sufficient muscle mass to compete well, and will need to have a protein-heavy diet geared towards growing and sustaining highly functional muscles.

Interestingly, none of these individuals have ‘lose weight’ as a primary goal.  And each one of them will need to have a different diet.  If a sedentary office worker eats like Michael Phelps, he will soon be very unhealthy, but Phelps needs to consume 6000 calories a day or more to support his workout routine.

When we know what tasks we want our body to perform – when we know what we mean by fitness, then what we need to eat will start falling into place.

Today I woke up, went for a 20km run, spent the afternoon in the pool and the evening on a group bike ride.

chia-seedsStrangely enough, despite being offered donuts several times throughout the day, I had no desire whatsoever to eat them, but I did find myself craving my hemp, chia-seed and buckwheat cereal.  I didn’t make those dietary choices out of some sense of guilt, but because my body was clearly communicating that in order to achieve the demands I was placing on it it required the correct fuel.

This is true in other areas of life.  What we choose to consume will be intrinsically linked with what we are trying to achieve.

 


New site design

I’ve tried to drag this site kicking and screaming into, well, whatever we’re calling this current decade.    The goal is a clean, minimalist interface, easy to find articles, and a good user experience on any device.

I’ve also just learned far more about the innards of WordPress than I ever wanted to.  Apparently, if you create a child theme, then you override existing PHP pages by creating new pages with the same name in your child theme folder.  Unless, of course the php page is functions.php.  In that case, both copies get included, causing all sorts of fun and conflicts.

In the end I gave up and edited the parent theme as well, so if I ever update the parent theme I’ll have to make a couple of changes.

Thank goodness for the Chrome WebInspector.  I can’t imagine how we used to do web development before we had tools like that.

css-cup_thumb[1]

 


Running Wisdom from Georges St. Pierre

UFC Champion Georges St. Pierre spends a surprising amount of his book The Way of the Fight talking about feet.

GeorgesStPierre_Headshot2012

My feet are the most powerful, important parts of my body.  We’re too busy wearing shoes we think are comfortable – shoes we believe “support” our weight- to even think about the meaning of our feet.

Shoes kill the sensations in our feet, which affects stability.  You start compensating for your lack of balance with your knees, hips and other parts of your body.

Feet are the genesis of all movements, especially in mixed martial arts.  It’s where most of our power comes from.

There are 7,200 nerve endings in each of your feet.  Yet every time you wear shoes or sandals, you’re breaking your connection to the ground.

Some people will say “Georges, it hurts when I run and my heels hit the ground!”  That’s because your heels aren’t even supposed to hit the ground when you run – even if you’re wearing a shoe.  The whole idea of a heel strike is a mistake.  It’s counterproductive.

In my stance, my heel almost never touches the ground.  For me, this brings my weight onto the balls of my feet, and that’s where I have an advantage over most of my opponents: I’m always ready to explode or change directions.

 

I wasn’t expecting to get minimilist running philosophy from a book on mixed martial arts, but I’ve rarely heard it put better.


Awards for Excellence (or maybe not)

In 2006 Euromoney magazine published it’s annual list of best banks.

In the North American category, the awards for both Best Investment Bank and Best at Risk Management went to … Bear Stearns.


450px-BearStearns

When the awards were issued, Bear Stearns was already dangerously exposed to toxic debt, and shortly afterwards collapsed, nearly bringing the global financial system down with it.

When it comes to finance and economics, it’s hard to trust that even the experts know what they are talking about.