Wednesday, July 09, 2008

3 good weeks followed by...

All good things have to come to an end. :-(

Firstly it was some work related stuff that delayed my departure to make it to the Thursday night crit. That wasn't all bad as I took the opportunity to do some intervals and it was by far the hardest I have done all year.
That however leads into Friday: the schedule says do some time-trial pace intervals. My legs were dead. I have a day off and decided to sleep in instead.

So the delay pushed the time-trial pace intervals to Saturday before the club ride. It was raining lightly off and on and there were wet patches on the road. To save time I did the Chicks TT route. I was not doing too well. I was not pushing too hard when I hit the downhill portion of 16th towards Imperial Ave. I was thinking that I had a good line turning right when the rear wheel slipped. Immediately the bike was traveling sideways. I did a baseball slide at about 35kph on Asphalt. When I got up there was a car right behind me. The driver kindly offered to take me home and pointed out my right thigh/bum area is badly injured. I then realized that my shorts are ripped and I was bleeding. I decided to ride home slowly as my bike was fine as it probably will be better for me to keep the muscles moving.

When I got home I assessed the damage: right shifter was bent in - easy fix. Scrapes to right pedal and shifter. Most cuts to handlebar wrap. A couple of some bumps and bruises and one big skin abrasion about 4 inches by 4 inches. I was not bleeding a lot. I have been leaking fluid out of the wound for 2-3 days and it is finally coming to and end. Hopefully I can start training again in a day or two when the motion of thigh moving up and down does not cause a lot of pain and the skin has healed up enough.

The odd thing I still cannot explain is why the rear wheel slipped. I was well into the turn when it slipped. I was on my hoods implying more weight was on the rear wheel. So wetness should not be the explanation. More likely I hit a slippery patch or sand.

Friday, June 27, 2008

3 weeks of training

After the A race, it's back to build 1. I borrowed a trainer with power display to see how I am doing power-wise.

The first week I did some test to see what type of power I can sustain.
The second week I did this pacing exercise. I was able to do 10-8-8-8-6-6-4 minutes with average power somewhere between 245 and 255.
The third week I did a 12km time trial test run at Iona. I still think I can pace myself better but the numbers are already way better: 19:32 for 12.4km out and back. Average speed 38.1kph. My previous runs in April and May were about 35kph.

This is the best training phase I have had all year. Let's see what the next 3 weeks can do.

Thursday, June 05, 2008

Westside Classic 2008

I am not too happy with my race and I am not too unhappy about the race as well. Going in I know it will be hard for me to follow the main pack up the hill. Someone said the first two laps will be hard and it was. At lap one there was a gap after the climb but I was able to bridge back with a bit of time to get ready for the second climb. By lap two I have lost sight of the main pack. We formed a group of six (and later seven) that rode together for most of the race - knowing that we can't bridge up. At the last climb there were seven of us - four from the same club. I tried to set the guys up by forcing the tempo and blew up half way up Camosun. Four guys left the pack - three of which are from my club. Yet still the coveted 42nd spot when to the lone enemy. I could have regrouped to try to sprint for 2 more positions but did not try hard enough doing so.

I felt stronger this year than last but unfortunately not strong enough to be in the big group. Looks like climbing up Camosun in the big chainring is a requirement for next year. From a numbers perspective I am about 10 places better than 2007 and time-wise I am about 10 minutes faster as well. I also have improved on my turns, especially the two turns entering and leaving SW Marine drive.

Here are some photos. And here is the official results page.

Wednesday, June 04, 2008

To shut down a computer in .Net

I was testing something and needed to shutdown a computer. Wanted to look for an example and couldn't found one anywhere. So here is what I have written:


ManagementClass MC = new ManagementClass("Win32_OperatingSystem");
ManagementObjectCollection ObjCol = MC.GetInstances();
//there is only one object in the Collection
foreach (ManagementObject MO in ObjCol)
{
  MO.Scope.Options.EnablePrivileges = true;
  MO.InvokeMethod("Shutdown", null);
}


Note that if you skip the EnablePrivileges line you will get a exception with the message:
Privilege not held

This assumes the identity of the process has the privilege to shutdown the computer under normal conditions.

Wednesday, May 21, 2008

knocked down but not out

I was commuting to work, rolling down Dunbar towards 16th. Like any other morning there were a few cars backed up. As normal I slowed down as there are traffic and pedestrians around. Suddenly an SUV decided to turn right in 18th - probably to avoid the traffic as I was approaching the car. I yelled, braked and tried to turn in the same direction (probably in that order as well) but eventually hit the SUV and was down.

The driver came out and checked if I was alright. A few pedestrians (there is a Starbucks at that corner) came out to see if I was alright as well. Well luckily other than 2 scratches on the right knee, a bump on the right hip, a bump on the right shoulder and a bruise on the left arm, and more cuts on the handlebar wrap me and my bike are both ok. So I stood up, checked that I can continue on my bike, talked to the driver (not yelled) and ask him to signal and check, and went on my way.

Lessons learned:
- I should have counter-steered. The fact that turning right shows up on my manoevres is a blessing.
- I should have been slower when approaching slowed cars. I had a similar run in with a car 7 years ago but that was worse. So I have improved. :-)
- I am alright.

Today's EV count is 2.

Tuesday, April 29, 2008

weird and lucky

I got to deliver this guy a cheque. He lives in Kits and I work downtown. I thought about sticking it in an envelope and mailing it out but something just does not feel right. (weird #1) I have to hop over to the school at lunch time today. The sun is out so I decided to take a detour and drop off the envelope at John's place.

While I was heading over, somebody in an SUV was honking at me. I thought about chasing him down but don't have the legs to...

I was not able to access his mailbox (lucky #1). I could not see his name in the directory so I called the building manager. She told me that he moved a while ago. (weird #2) So I sadly turned around and head back to downtown. While on the way to Burrard bridge, a pedestrian was waving at me. It was none other than John himself! So I yelled, stopped and dropped him my envelope. (lucky #2)

That's not all. John told me he gave me an updated address in another email. When I got back to the office I forwarded the updated address to our membership director. Turns out the address and postal code do not match (weird #3). So even if I caught the updated address the cheque might still not get delivered (lucky #3).

My EV count today is technically 1 although if I count non-cycling guys too its 3.

Wednesday, April 23, 2008

we'll see how this goes

First time in my riding life I broke a chain while riding. I was going uphill and felt like the chain has skipped off. Lucky when it happened I was close to a bike shop and got help. The owner and mechanic knocked 4 links off and send me on my merry way. He said the drive train is still good for another 6 months although I have doubts and estimated 3 months. I have been very tentative with my commuter bike since and actually rode my race bike to work the majority of times - partly because of training and partly because I don't feel comfortable about the chain.

Last Saturday was my fourth ride after the fix. It snowed Friday night and the road was wet so I thought it might be better to ride a bike with fenders. I left the group and was on my way home. I was actually saying to myself that I should go to buy a new drive train when the chain snapped again! Stranded between Richmond and the airport I called for help using the universal repair kit known as the cellphone. While waiting for the support car to arrive I decided to try fixing the chain. The theory is that you can knock 2 more links out and at least ride home with a shortened chain. After 20 minutes of fumbling around I was at the point where I could try to put the pin back in when the support car arrives.

I bought a new drive train the same afternoon along with the necessary tools. It does look like I would need a new drive train every year so the tools are worth investing.

Last night I finally got the time to put the drive train on to the bike. The rear cassette was relatively easy once I figure out the chain whip and wrench should be position like scissor handles. Next come the hard part: the cleanup of the bike. The rear derailleur was so filthy I spent about an hour cleaning it up. The chain I bought (SRAM 991) is very easy to install because of the powerlink feature.

We will see how long this drive train will last. The previous one lasts about 13 months and the one before that about 2 years.

Today's EV count is 2: I met 2 EV guys riding.

Friday, April 11, 2008

the season till now

I went to the last road race of the Spring Series as a 'C' race - a race that I used as training and done without preparation - and it was hard.
The course is the 'snake': a 10km loop with a climb about 600m in length with average grade of 10.4% and max gradient of 15.4%. Using my granny gear of 39-27, I was climbing with a cadence of 50's to 60's which was very uncomfortable. The first lap I climbed sitting down (which I prefer), the 2nd lap a coach was yelling "stand up" (to his people that was around me) so I tried standing up. My heart rate shot through to the roof and my quads were sore after the climb.

On every lap after the climb people get away. People like Stuart has the ability to accelerate after the climb. If they were around me I would try to sit in the group and try to bridge back. Because I do not have as much acceleration I would lose contact with the chase group and have to ride in time trial pace all the way down the hill to catch back to the pack. At lap 4 just ran out of gas. Lap 5 I was at "tempo" - a notch below time trial effort and rode with a guy. By lap 6 I have let that guy go at rode at a warm down pace. Climbing that hill was hopeless so I stopped after lap 6.

Anyways not a bad day - weather held up, race conditions was acceptible. No accidents in the C race. Can't really complain.

A couple of things I have learnt that day: when the roads are dirty with manure, you have to spit out the first squish of water you drink to rinse the nozzle and avoid getting sick. It was a bit of a mess but I survived. Also for older cyclists it looks like more training at zone 4 (time trial pace) to 5a (a little bit above) is more useful than short intervals at zone 5b (which is my max range).

Yesterday I did my first Time Trial Test: 8 miles, full pace. It took me more than 20 minutes which averages about 35kph. When I got home I was wobbly and hungry. It was more intense than most of my workouts this year. Definitely more of this type of training in the coming weeks.

Wednesday, March 12, 2008

bone head

I got a new bicycle computer last year with 2 bike support and installed the second bike kit on my commuter bike. Everything was working fine for a week or so.

On Monday morning I realized I have no cadence reading. I tried adjusting the magnet thinking it might be knocked out of alignment but to no avail. When I was home I looked at the bike and realized that the cadence sensor wire was severed. I wrapped the cadence sensor wire around my down tube and slid the wire between the tube and the shifter wire. The shifter wires are just bare wires. As I was shifting the wire act as a saw and finally chopped the cadence wire. I tried reconnecting the wires. The wires are very thin it is hard to get it back working. I might need another cadence kit.

aaaaaargh.

Tuesday, February 26, 2008

i think this is a bug

I am writing a little app that hosts the Internet Explorer/Webcontrol control to navigate our production site and get some page load values. Somewhere on a page we have the following html snippet:

<input name="foo" type="checkbox" id="foo" />

Both IE and Firefox render this as a checkbox without the check mark.

When I interrogate the attributes inside the HtmlElement object, here is the interesting bit:

GetAttribute("Value") returns "on"
GetAttribute("checked") returns "False"

I wrote a loop to get all the input elements inside the <Form> tag to construct a post data string so the natural choice is to use the Value attribute because it seems to work for all input types. So the post is sending in foo=on for this input. ASP.Net happily interprets it as checkbox value=true and created a different behaviour that took me a while to track down and isolate.

Monday, February 04, 2008

job fair

Last week I was manning the company booth at a job fair in UBC. Here are some FAQs that I developed towards the end of the day:

Q: Is Thomson Financial an insurance company?
A: No.

Q: Is it an investment fund?
A: No.

Q: what is the company like?
A: we like to eat, don't drink a lot and like to work out and/or participate in sports.

Q: Does your company makes DSL Routers?
A: No. And we do not make seatposts, nor stems nor headsets.

Tuesday, December 18, 2007

Stuck

Once in a while a song will get stuck in my head and the music will play inside my head throughout the day. This one has been stuck in there for about a week. The words fit how I feel right now:

Holy darkness, blessed night,
heaven's answer hidden from our sight.
As we await you, O God of silence,
we embrace your holy night.

Sunday, December 02, 2007

good coaches don't yell

My daughter is involved in both soccer and basketball. A few weeks back we were up in SFU playing a Vancouver Whitecaps Club Super Series soccer game. Her team was coached by Steve Kindel. It helped with a quiet environment and a small field. Steve was calm and was always talking to the girls in a speaking tone. Instructions were clear and concise and the points were well taken by the team.

Today my daughter was in a basketball game. I got there just about half time and I realized her opponents were very different from other opponents her team has faced before. Defense was strong, people help each other in double teaming, inbounds play is precise. As I look towards the opponents' bench I saw a familiar face. Again Kevin is calm and collected, not talking much but when he makes a point his team listens.

In contrast, I yell too much. Sometimes the same keywords over and over again to no avail. I will definitely try different strategies to get my point across.

Monday, November 26, 2007

problem of the day

A colleague was trying to write a calculation tool on IIS logs. I recommended him to try the text file driver from Microsoft Jet. He couldn't get it going. The error is:

Cannot Update. Database or object is read-only
Error code is -2147217911 or 0x80040E09

Turns out the file has an extension of ".log". Once I changed it to ".txt" everything works. Can't find an explanation though.

Wednesday, November 21, 2007

gotcha

We got caught in the production system yesterday.

Turns out the problem is that we use System.IO.Path.GetTempFileName() to, well, get a temporary file name to use in a directory. This method, if you read the documentation (which I did not), states that

Creates (emphasis mine) a uniquely named, zero-byte temporary file on disk and returns the full path of that file.

So there is a side-effect by calling this method. But that's not all. In the remarks it said:

The GetTempFileName method will raise an IOException if it is used to create more than 65535 files.

So the production system failed because this method has been called more than 65535 times.

Lessons learned:
(1) RTFM!
(2) the method should be renamed CreateTempFile.

Tuesday, November 13, 2007

indoor trainer

I have always resisted the idea of riding a trainer in the house. It never appeared to be interesting nor effective, until this year.

It started out having a cold winter this January when I have to stop commuting for a few weeks.
In the fall when soccer season starts it is obvious that I will have less time riding in daylight.
Then there was some discount trainer emails flying around.

So being the cheap bastard that I am, instead of buying a new one, I sourced an old noisy trainer for $20 from a friend.

I've started riding on the trainer and it feels different. The 12s or zone 2s seem to be harder on the trainer than on the road. I've tried a small amount of 14s just to see how it feels and it seems harder as well.

On the entertainment front I found some old Japanese animation series that I normally would not watch sitting down. It works and time flys by a bit better than a regular Hollywood movie.

I probably need to set up a fan as I am sweating like a pig.

The lesson learned is that it is not boring when you don't want it to be boring.

Tuesday, October 23, 2007

Another weird problem

This time it is in our development environment. We are integrating with an external report engine and one of my tasks is to look at some performance statistics to see if we need extra hardware to support the report services. The reporting engine is still a 32-bit process so I wrote a bit of code to thunk down from our 64-bit .Net code to 32-bit before calling the reporting service.

After that I hook up our test/performance harness to make the system run 100 reports. That CPU was under siege for well over 10 minutes. After same tuning and monitoring I realized the CPU was not spent in the reporting process (nor our application services for that matter), it was the 64-bit version of rundll32.exe. Out comes the Sysinternals Process viewer. It turns out rundll32 was running:

rundll32.exe ntprint.dll "printer name"

The process is trying to install a printer. I tried it manually and we don't have the printer driver locally. So I guess this process failed repeatedly but kept trying. I looked up some documentation and found the option to turn off the printing portion of the report and everything works like charm. Just another day in the office...

Wednesday, October 03, 2007

tracing in asp.net

I am trying to use the trace.axd viewer to view page traces. I changed the <trace enabled='true' > tag in web.config and all I get was
--------------------------------------------------------------------------------
Server Error in '/xyz' Application.
--------------------------------------------------------------------------------

Trace Error
Description: Trace.axd is not enabled in the configuration file for this application. Note: Trace is never enabled when

Details: To enable trace.axd, please create a tag within the configuration file located in the root directory of the current web application. This tag should then have its "enabled" attribute set to "true".










--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
--------------------------------------------------------------------------------

Turns out I have to restart the worker process in order to get it to work. Turning it off has no such problems though.

Interesting piece of news

I just came across this piece of news from the office pantry. What is interesting to me is that the deal is made on the cycling roads rather than on the golf course. Cycling being the new golf in the corporate world someday?

Thursday, September 27, 2007

I blew it!

I put my lunch on a plate, throw it in the microwave and about a minute later, there was a loud crack. The plate was split into two down the middle. First time in my life I have broken a plate like that... how bizarre.
 
Listed on BlogShares