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.

Tuesday, September 18, 2007

Network problem

Ever since late July I have been involved to diagnose a performance problem. After a few weeks of back and forth, dicing through the numbers and adding instrumentation to our code, it boils down to network delays in our .Net remoting calls. At that point I should have throw my hands up and pass the problem to the Network engineers. Unfortunately that person was on vacation and I need to carry on. After a bunch of trials and errors and flipping around options on the network driver level, the problem seems to be related to SNP/TOE. So next time you see a network slowdown, check if SNP/TOE is turned on.

Thursday, September 06, 2007

it might be obvious for others

This is definitely not obvious for me.

I did some performance tuning for our web app and cached some pages a while back. I did this:

<%@ OutputCache Location="Any" Duration="3600" VaryByParam="none"%>

I was going through the IIS logs as see that the page in question is still being requested a lot. Changing it to

<%@ OutputCache Location="Any" Duration="3600" VaryByParam="None"%>

does the trick. It seems implicit and I have definitely seen other people using the lower case version. But the attribute is CASE-SENSITIVE!!!

Monday, August 27, 2007

Things I did on Sunday

Or things I did not do on Sunday.

The first event of the day was the Team Time Trial. Before I go on vacation I was pretty gung-ho on doing this as it sounds like fun. I was asking around to gather interest and form a team. Unfortunately there was not a lot of interest and after my vacation, I lost a lot of fitness and gave the idea up. I then signed up to help out in the race. A few days before the race a couple of cat 4s were looking for a 4th member. I replied, wanting to ride on condition the race director agrees. Then the race director came back saying he needs me to marshal the race, thus making it impossible to race. I have no qualms about the decision and helped the team find a 4th member. This team won the race. I was happy for them and was happy that I didn't drag the team down as I was not in good form.

After the race, a coach hosted a cycling garage sale at his house not far from the race venue. I was carpooling, the driver wanted to drop by so I went to take a look as well. It was like going to a candy store. Wheels, helmets, sun glasses, jerseys, jackets, bags, you name it. Everything useful for a cyclist is available. I picked up some old team jerseys for cheap and bought two nice shimano wheels off him. I had no intention of buying anything but ended up being one of his biggest customers that day.

I was excited and Sunday night started to assemble up the Pinarello. With the extra wheels the work is easier as I can take my time to tune up the bike while riding on the current bike. No single point of failure makes things easier to transition.

The most important lesson for the day: that front and back skewers have different lengths. Pull a rear skewer to fit a rear wheel - it is longer.

All in all a good day.

Thursday, August 23, 2007

a little bit of history

As the Canucks are getting ready to launch their new logo and jersey, let me share a little story about their previous jersey launch.

I joined a small software company in 1997, replacing a guy who went to a big game development studio. It was all in good terms and this developer was in touch with the few of us. A few days before the jersey launch one of my colleagues received a email from this guy with the Canucks whale logo in an attachment. This ex-colleague was not on the hockey team but somehow got hold of the logo. We were admiring the logo and another colleague came by, saw the picture, called his girlfriend and forwarded the email over to her. This person worked for CKVU and it was a matter of minutes when Don grabbed hold of the picture and ran a story at their six o'clock news.

So this little company played a pivotal role in leaking on the logo last time.

Thursday, August 16, 2007

A race

I was finishing my morning ride and spinning to the office when I met Gord on Macdonald and Cornwall. Gord is a strong rider and the president of the cycling club. We exchanged pleasantries and he took off. I continue spinning away but there was always an urge to go after Gord's wheel. I lost sight of him after the uphill section and was surprised to see him in front, slowed by the lights. I almost caught him at Burrard but the light turn green before I could reach him. Gord took off again. This time it is a struggle because of 2 weeks' vacation I lost a lot of fitness. The climb up the Burrard bridge is a challenge when you want to push but your HRM disagrees with you. At the end I decide to go with my HR zone and let him go.

Little did I know that he was caught up in traffic lights again and I caught him around Smithe. This time I have the legs to ride away from him and did not see him again. He looked at me from his Subaru in disgust as I smiled and waved bye bye.

Sunday, August 05, 2007

caught

I know it is inevitable, but the moment of truth is still surprising. My son has been growing up and he has reached the first milestone: we now officially have the same shoe size. I now can test fit shoes for my son!
 
Listed on BlogShares