Monday, March 29, 2010

invalid license data. reinstall is required

I have Vista 64 SP2 and Visual Studio 2008 SP1. Monday morning I got this error message when I try to start Visual Studio. MSDN recommends reinstalling Visual Studio.

Luckily the technical support guy reminded to reboot the computer first. The problem goes away.

Monday, March 01, 2010

withdrawal

What did I do after watching the closing ceremonies? I re-read all the emails that were sent to me from the volunteer program manager. I baffles me that 7 years or planning and executed the plan in 2 weeks. Think designing, coding and testing a system for 7 years and run it for 2 weeks and throwing it away. Imagine hot-fixing it within the 2 week period as well. Amazing.

Next thing I would do: re-read the training manual. :-)

Tuesday, January 05, 2010

GroupBy with XElement

I am working on a new project and experimenting with Linq. It is very powerful and useful however it is a paradigm change for us old geezers.

The problem at hand was an XML string that needs to be sorted by a the value of an inner node:

<a>
  <b>
    <c>value1</c>
  </b>
  <b>
    <c>value2</c>
  </b>
  <b>
    <c>value1</c>
  </b>
</a>

I want to grab a list of "b" sorted by "c".

So I tried:
var xmldoc = XElement.Load("file.xml");
var grouplist1 = xmldoc.Elements("b").GroupBy(x => x.Elements("c").Select(y => y.Value);

When I do that the key is not the value1 but some sort of IEnumerable.
Then I tried:

var grouplist1 = xmldoc.Elements("b").GroupBy(x => x.Elements("c").Select(y => y.Value);

Then the compiler complained that I cannot cast an IEnumerable to string.

The issue is that within XElement you can have multiple "c"s although we know it could not. So this finally works:

var grouplist1 = xmldoc.Elements("b").GroupBy(x => x.Elements("c").Select(y => y.Value).ElementAt(0);

Of course it assumes there is at leaat one "c" node inside or else it would not work.

Lesson learned:
(1) types are still your friend. Declaring them make things easier.
(2) Break up Linq queries into smaller function calls. You will get the right result faster. At least it works for me.

Saturday, November 28, 2009

reflections on the Olympics part 1

Just a little background: I signed up to volunteer for the 2010 Olympics and recently I have been officially offered a position as an NOC (National Olympic Committee) assistant.

I have been attending the training sessions since April. I did run into a cycling friend in one training session but other than that these are all strangers to me. Being the anti-social self I have not been interacting with my fellow volunteers. All that changed today as I have my driver training. Three of us were assigned to a car and our job is to go through a couple of the Vancouver venues to locate the entry roads, dedicated parking, loading zones, etc. And for a few hours the three of us have to interact, make conversation and discover the solution for the problems posed to us.

Here is my reflection: as diverse are the people coming to compete in the games, the volunteers are similarly as diverse. We don't have to be friends, we don't have to have the same political views, we don't have any similar interests. We are all there just to make the games work. And as long as that objective is achieved that is the bottom line.

Friday, November 13, 2009

busy

I am volunteering for this, this and this. It's going to be busy for a while.

Wednesday, October 21, 2009

bike fit

I went for a bike fit at this bike shop. Here is what I have learned from the session.

1. Most of us have feet that are not parallel to the ground. I have known since a teenager that the outside of my shoes wears out first. Yet most pedals and cleats assume we are parallel and we are locked in while riding. I sometimes get soreness on the outside of my feet possibly because of this. The guys at the store installed some cleat wedges to rectify that problem.

2. In an ideal world the world the knee should be perfectly above the pedal and moving up-and-down only. Sideways movements just causes inefficiencies in the power transfer. The guys figured that my knee was moving outwards and rectified it by moving the pedals out by 20mm. At first it feels drastic but after a few rides it seems natural now. My only worry now is how peddling through a corner in a crit will be affected.

Before I went into the fit session I thought it was mainly about adjustment saddle and handlebar positions. They spend way more time on cleat and knee position than saddle/handlebar. I now have results to prove that I am more effective and would recommend this bike fit session to any serious cyclist.

Monday, September 21, 2009

a question

With all the discussion around gender differential disorder these days, it brings back an old question I had about 10 years ago: what if a person with an sdd goes to apply:

1. to be a Catholic priest or a nun?
2. a single-sex school?

(1) brings the most interesting discussion as it is defining a rule based on science (gender) and the science is giving a non-boolean answer.
(2) brings similar issues as the IAAF as it has sports performance implications among other issues.

Wednesday, August 19, 2009

Tuesday Night Crit Aug 18

Raced 9 laps with the main pack until my diaphragm start cramping up and my legs cannot turn the pedals at that rate. Another 2 laps or so and I could have finished with them.



Normalized power is 279W for just over 20 minutes. Too bad the season is coming to an end...

Wednesday, August 12, 2009

Horseshoe Bay Aug 12

I have done this ride a couple of times this year. The ride really starts once we passed Dundarave. With a bigger group the pace is higher and I will get dropped around Lighthouse Park and ride tempo the rest of the way. Today there were only two of us and Joe was nice enough to work with my tempo. Here is the section starting from Dundarave:



I went as hard as I could and we even have a sprint finish! Average power was 233W and normalized power is 272! That is definitely a personal best.

Saturday, August 08, 2009

Thursday Crit Aug 6

First time racing in the 3/4s. Power is actually lower (average 216 normalize 234) than this race but pace (41.9kph)is higher. There were a lot of big guns out there so I know I have no business sticking my nose in front. I was just "swimming" up the peloton to get a good position and drifting down slowly. Rinse and repeat for the whole race. I felt good and confident that I can hang with the big boys for the whole duration.

Tuesday, July 28, 2009

mishap

When I was commuting to work, there was an accident in the intersection of Cornwall and Cypress. A cyclist was knocked down and emergency crews were treating her right there. Let's hope she's alright and everyone please ride safe.

Thursday, July 16, 2009

Cypress Hill Climb

Climbed up Cypress on Wednesday. 41 minutes from the first switchback to the end of the steep part just beyond the power lines.



The dips in power happened where the switchbacks are. It is relatively flat and only on the lookup was I trying to power it through. With the others I was actually stretching my back and legs.

Everything done in one gear: 39x27. Cadence was mostly between 75-80. Power drifts down as heart rate drifts up.

Actually I was surprised that I have heart rate data for the whole climb. These old Powertaps tend not to record heart rate data when it is too "busy" - normally means when there is substantial power data there is no heart rate data. From today's chart it looks like it is speed related and the cut off speed is around 22kph. Will keep this under observation.

Monday, July 13, 2009

Thursday Crit #2

Since Tuesday was a rainout, and riding was on the low side the early part of the week, it is high time to race on Thursday.

The routine to race on Thursday is like this: I have to leave work at 5pm sharp, commute for about 70 minutes at below threshold pace (roughly L2) to Richmond. Sign-up, final warm up, race for about 30 minutes then commute home. If I am stuck in the office which often happens and cannot leave before 5:15pm there is no hope making the race. So it is roughly a 2 hour commute for a 30 minute race.

Thursday was also the company annual barbeque at Stanley Park. I decided to opt out of the barbeque partly to work on my projects and partly to make sure I leave downtown on time.

I have not been doing good at this Richmond criterium for one reason or another. The first time I went to race in 2008 I was rushing to get there so my legs were feeling tired before the race started. I blew up with about 2 laps to go. The second time was the same week as WTNC #1 this year and I was not in good shape. I was not able to hang on to the lead group of four or five and cramped with about 2 laps to go. I finished but barely.

I do not have high hopes this race. I was aiming to finish in the lead group and get a good workout. I was constantly positioning myself in the front third: not front enough to chase the occasion efforts to break away and also not needed to pull in the front of pack that often. There was a good size crowd so it is easier to move up the pack as there are more shielding from the wind. Moreover the road is wide so there are lots of lanes to move around people.

By about the 4th lap I got to the front and did some work pulling. As I crossed the start/finish line they rang the bell for prime lap! I was worried that if I pull off too soon nobody would want to work in front and it would be more accident prone. So I continued pulling the group through the backside so the guys can go for the sprint. Then I have to work a bit to make sure the sprint group didn't stay away. Once I caught them I looked down to see my numbers. My heart rate was going at 175 at that point! My threshold is 168 and history has taught me that I cannot stay above that number too long. I also made the determination not to look at my numbers again until the end of the race and see how I can race this.

The end the average speed is 41.5kph and my max heart rate is 179. The max heart rate is a personal best as I have never gone beyond 176 is previous efforts and testing.

The middle couple of laps I was hanging towards the end of the pack or what's left of it. By about the 9th lap I was feeling good and looked down on my Heart Rate monitor. The number was 161. That means I was well rested and ready for more action. We were going against the wind towards the start finish line. I was at about 6th or 7th wheel but still I decided to pull out and push the pace up. When I cross the start finish line I heard the bell ring again for the second prime lap. Sure enough I have to keep the pace high again for about half a lap before I slow down. I then follow the pack making sure there is no significant gap.

For the last couple of laps I was just hanging around making sure I was in the front 3rd and not creating gaps. On the last turn towards the finish line I found on 3rd wheel behind two strong guys looking for the win. I waited for them to move knowing that I cannot outsprint these 2 guys and I do not have much left in the tank. Once one of them move I tried to follow but their speed is just to great. I sat up and let one guy move around me. There was another guy nipping me at the line and I finished 5th. Regardless these is the first points I claimed as a competitive cyclist and it only took my 3 seasons.

The good part about the race was that I raced smart and did not use up a lot of energy. I did most of it right and was lucky enough to be at a good opportunity for somebody to win provided he has a decent sprint speed. The bad part was that I never was in this situation and did not know how to win the race given the opportunity.

From a power point of view it can be divided into 3 parts: the first 10 minutes until the first prime the average power was 252W. The middle 7 middle minutes I had a bit of a break and average power was 195W. The last 8 minutes the average was up to 262W with that long pull being 46 seconds and average of 323W. Overall the average was 239W with normalized power being 253W.



Lessons learned:
- race smart and not necessarily hard.
- law of large numbers: race often and good things will happen.
- relax and enjoy the race.
- work on sprinting!

Thursday, May 28, 2009

Tuesday Night Crit #1

This is my first race of the year, the local WTNC criterium at UBC.



The image has the first 5 laps up to the prime. Where the blue line is going above 50kph is the downhill section on 16th. After that there is a 2 short sections followed by the 1 minute climb up Stadium. The third lap is the hardest averaging about 370W. Other laps range from 320W to 360W. The whole race was averaging about 37kph with a normalized power of 264W which is kind of in range given my FTP is 250W.

There is one other significant point about this race. I was racing with an ex-professional hockey player whom has his number recently retired by the Canucks. Of course he is good and strong and won the race. As for me I just recovered from a 2-week bout of cold and was happy to finish the race.

Thursday, April 30, 2009

this looks better

For the past month or so I have been riding the racing bike a lot. The weather was cooperative and I was in the build phase of training. Here is what the zones look like:



The top 3 zones adds up to about 25% of riding. There was a lot of hill repeats and intervals so there was a lot of recovery riding in between as well.

Here is a more detail distribution of the power levels:

The 2 lines sticking out represents recovery and commuting (which is an estimate of the whole ride). The threshold is sitting right around 250-260 which is where the distribution turns back down. Not as textbook as far as spotting the functional threshold power (FTP) is concerned. There was supposed to be a big dropoff in the distribution which does not exist here.

Wednesday, March 04, 2009

Something's wrong

Here is a picture of my power distribution for the last 28 days:



The labels are Active Recovery, Endurance, Tempo, Threshold, VO2Max and Anaerobic Capacity. As you can see it skews heavily on Tempo and Endurance combining close to 90%.

Now a lot of the rides are done without a powermeter and therefore are estimates. But the point that too much time is spent on tempo and Endurance is still there. I don't feel very comfortable riding above threshold and it shows on the chart.

Friday, January 16, 2009

Trainer

One thing I am trying to do this year is "ride to failure" - keep pushing the pace (normally TT or just below) and ride until I cannot push the pedal anymore. It is actually harder than I thought. The body is complaining. It is uncomfortable but I can actually go on. So far I have been doing these SST (90% of TT power) drills and it was only last night when my calf cramped up so bad I have to stop.
If I do these same drills on the road I have to save some effort so I can ride home. Going on a trainer gives me more leeway to "dig deeper".

Wednesday, December 17, 2008

note to self

Riding a fixie on snow without brakes is not a good idea. I just saw one fixie sliding into a car. Ouch.

Tuesday, October 28, 2008

PDC 2008

I am at Los Angeles attending the PDC. Lots of cool technology. Some of the stuff I am looking at includes:


These are all 'low hanging fruit' type of efforts that can be readily incorporated into my day to day work.

Monday, August 11, 2008

Time Trial

Finally raced my first time trial.

This is the second of two time trials in the race season that operates as an independent race. Other TTs that runs are part of some stage race which I am not ready for.

I grade my TT as a C+. My original target was 38km per hour. Based on an estimated distance of 36km (official distance is 36.4) I was pacing for 58 minutes hoping to start conservatively and have a slower 1st half.

I caught a ride around 5:30am and arrived at the location around 6:45am. I wanted to volunteer as well and my job was to assist in bike measurements. The commissaire was mostly enforcing the rule where the tip of the saddle needs to be 5cm behind the BB axis. There were a couple of guys and gals used the "morphological exception" by sliding their bum beyond the end of their saddles to get by the rule.

My start time was 10:56 so I have lots of time to get ready and warm up the bike measurements were finished.

It has been raining off and on that morning and sure enough when I start my warm up it was raining the hardest. I was soaked before starting. Just when I was about to start the rain stopped. The start house was actually the club trailer so that was kind of fun. I was nervous for a little while waiting for my start. There was nobody starting 1 minute before me. The guy that was supposed to start 2 minutes ahead but didn't show up until the very last minute so I was in the start house for almost 3 minutes. I didn't want to go too hard when I start because the first 2km or so was a slight downhill and I was hoping to save my effort for the final climb. I chose a cadence around 85 and was cruising above 40km very quickly. At that point there was a burning sensation around my crotch area. The bib shorts is not adjusted properly and it is rubbing in the wrong place. I chose to ignore that sensation and keep going as I do not want to stop and knew I could not fix the problem on the bike. The downhill comes gently to flats and I started pacing at 38km. I was thinking the course is not completely flat as my speed rolls down to about 36 and I would push it up to 39 and let it sink again (it could have been the rubbing - see below). It is a twisty course and it is hard to know where you are other than looking at the elapsed time on the watch. My heart rate monitor has been acting up for about 2 weeks before the race and it was only after 2 battery changes was I able to get it working the day of. For the first time in about 2 weeks I was able to know that my heart rate was hovering around 155-163. My threshold is 167 and my expectation was to push the HR up for the final 1/3 of the course.

The 5-6 guys following my start are all strong cat 1 or 2 riders, so I was passed a good few times before the turnaround. Lucky for me these guys are so fast (Will Routley the winner averages 10+kph faster) I did not know they were passing until they blew by. I did pass one woman after the turnaround before the bridge so that was a bit fun.

My pace was good and I was feeling comfortable (to a point) up till about 20 minutes to go. I wanted to push the pace up and found that my legs have been locked into automatic cruise control and refuse to cooperate. I tried shifting down to spin up but that only brought the speed down more so I have to settle for the same speed (36-38) and roughly the same HR which was mostly in the high 150s at that point.

The final climb was dreadful as I cannot garner any extra power to my legs and watch my speed go down while the HR stays the same. I slowed down to about 30 towards the end and clocked at 1:00:05. The guys did a re-measurement of the course and relabeled it at 36.5km so my average speed was 36.45.

At the end I found out my rear brake was rubbing the wheel. I did not realize it because the warm up was so wet and I cannot hear the rubbing. Afterwards I was told that I should have performed a test to just roll the wheels to check for rubbing.

Just like in Westside classic, my hamstrings were sore for a few hours after the race. This time I have problem sitting down so the car trip back to Vancouver was not very comfortable.

In hindsight my cadence should be higher (like 90-95) as my muscles were tired but I never taken advantage of my heart rate. If previous practices I find my HR dropping towards the end and my speed sank. So I should probably start around 160-163 and move it up that way. The lower cadence drill (4x10min at TT pace but 70-75 cadence) that John Tolkamp suggested helped my endurance but confused my cadence selection.

So between the rain, the brake rubbing, slow turnaround and my wrong cadence/HR selection I think I can save a minute at least. I wasn't too unhappy with the result as 1 hour was my lower bound and the conditions were not ideal. But then again you see other cat 4s and 5s doing really well so I do feel that I am not progressing at fast as I wanted.

Results are here. The bib numbers represent starting order.
 
Listed on BlogShares