Monday, June 21, 2010

Tuesday, June 08, 2010

Did you notice?

That the hockey statisticians credited the loss to Brian Boucher for game 5?

If they used baseball rules it should have been Michael Leighton.

Friday, June 04, 2010

Network Load Balancing in Windows

I am using NLB on a prototype I am working on. I have a custom process that listens to custom port and I have two Windows 2008 boxes to act like a web farm. The quick gotcha is that if my process is down but the network on the machine is still up NLB will try to distribute the network load around the two nodes. I was hoping for something a little bit smarter (like figuring out the port has not listener) but that is not the case.

Monday, April 26, 2010

TSS and CTL

For the definitions of TSS, TSB and CTL read here.

This is my second year training with a powermeter. Last year it was mostly about getting the field experience of using it, matching up the perceived effort with the real power, managing efforts so the training is effective. This year the focus drifts into looking into TSS and CTL and how it relates to racing.

Firstly instead of using number of hours as a gauge of training effort, I am trying to use weekly total TSS as a gauge. So a big week needs to have say 600-700 TSS.

A rest week would be used to reset TSB to zero without losing CTL. The point is to keep building up CTL without going overboard. Last year I got sick right around Easter time trying to do too many big training rides and took more than one month to fully recover.

CTL is used as measure for race-readiness. If I were going into a 1.5 hour road race I need roughly 130 TSS. If my CTL were below 65 chances are I would crack before the end of the race. In comparison the one-day classic races the guys are racking up 300+ TSS in a day. Not only do you have to have the Watts per kilogram to stay with the guys, you need the CTL/TSS to stay with them for the duration of the race.

Lastly I counted the number of times a ride exceeds 150TSS last year and it is less than 10. So in terms of training regime 150 is a big ride. So if my "A" race is a 2 hour race worth about 180TSS, I will have to ride a couple of big rides to get use to that level. Either that or just stick to 30 minutes criteriums. :-(

Friday, April 09, 2010

how things have changed

Back in the days when I was learning piano, I often hear my teacher play the song once or twice in the beginning, rely on your memory and your reading skills and try to play the song. I was one of the luckier guys when I was in University and can use the record (vinyl) collection in the music library to hear the music while reading the score.
Last night my son told me that we were tasked to pick a new song (list C) for him to play and the recommended composer is Rachmaninov. So I opened up imslp and search what they have. We then look for the corresponding pieces on youtube and have these great pianists playing for us. We picked prelude op 23 no 5 - something I haven't played myself.

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.
 
Listed on BlogShares