Popular Tags:

Very interesting.

September 14, 2003 at 1:19 pm

Roy Osherove writes of some very
interesting research
in his blog.

I’ve always found research about how we read to be fascinating

A long ride

September 7, 2003 at 11:51 pm


Today, I participated in the Tacoma Wheelmen’s Heritage Century,
a ride through the picturesque Enumclaw valley. Normally, I would have added “in the
shadow of Mt. Rainier”, but since it was overcast, the mountain was hidden.

I had hoped to do the whole century (100 miles), but because I got sick a couple of
times this summer and injured recently, it wasn’t going to happen. I settled for a
shorter version. Overall, a pretty good ride. It was much hillier than I had expected.
Luckily, I’ve been suffering on hills for weeks. At one point, I was following
a guy up a steep hill – so steep that I had to stand up even though I was in my lowest
gear, and during the highest part of the power stroke, my back wheel was spinning
up. I put that in the “not fun” category, because if it slips hard, I’m probably going

When I got to the top, I realized I was following a guy with an artificial leg from
the knee down on the right side. I’m used to being passed, but usually the people
I’m passed by have all their parts. Pretty amazing.

After I finished that section, I caught up with my wife and daughter, who were doing
the 45 mile route with my daughter on her Burley Trailercycle.
I hooked her onto my bike for the next 9 miles, and then when we switched back, I
found a nice slight downhill and cranked it up to 20-23 MPH for a few miles, and then
cruised across the flats to the finish.

Overall, I’m pretty happy. My legs hurt but never got to the cramp stage, I had enough
energy for the whole ride, and my butt didn’t start hurting until I’d been riding
3.5 hours. Next year my target is RSVP.

Vital Stats:

Distance: 63.5 miles
Time: 4:36
Average speed: 13.9 MPH
Pedal Revolutions: 22,100
Horses: 155
Cows: N (where N >> 1000)
Food: 3 Power bar balance (600 calories), 3 fig newtons (165 calories), 2 energy gell
packets (200 calories), 1 1/2 bananas (150 calories), 32 oz gatorade (240 calories).
Total = 1355 calories
Calories used: Approximately 600 cal/hour ~~ 3000 calories used.




A story…

September 6, 2003 at 12:25 am

My daughter just started a new science unit in her 4th grade class. After she explained
it at dinner tonight, I told her a story that I thought I’d share with you.

One day, a farmer got up, got dressed and went outside to the barn. He got out his
tractor and took it out to his alfalfa field, which he needed to plow under after

He spent the whole day plowing, and finished the field. He turned his tractor around
at headed for home, but as he reached the edge of the field, it mysteriously stopped.
He backed up, and tried again. And again. No matter what he tried, he could not get
out of the field. He left the tractor and walked home.

The next morning, he got up, called the John Deere repair service, and sat down to
wait. At 10AM, the mechanic arrived, and they walked out to the field. The mechanic
patiently listened to the farmer’s story, shook his head, and started walking away
from the field.

“What are you leaving for?”, said the farmer. “You haven’t fixed it”.

“There’s nothing wrong with the tractor”, the mechanic replied. “You’ve got a magnetic
field there”.


After I told that, my daughter rolled her eyes and went back to eating. She does that
a lot.

Building a music system

August 16, 2003 at 12:09 am

We have a ski place in Skykomish, WA (20 miles from Stevens
) that my wife and I have been finishing for the past couple of years (contractor
did the shell to painted drywall, we do everything else). Having music while doing
this is a critical factor, so I brought an old stereo (my first receiver, in fact,
from 1980) and a 5 disk CD changer up there. That’s has worked okay, but when your
used to having all your CDs (somewhere around 200) accessible and automatically scheduled
with your PC-based system, you kindof get tired of the same 12 CDs. (Yes, I know,
I *could* bring up more, but that would require me to plan ahead, and I still wouldn’t
bring up the right one).

I did some research into CD jukeboxes, and wasn’t terribly impressed. They’re a bit
smaller than a PC, but all they do is music, and they don’t implement the system that
my home-based on does. So I held off on buying one.

I’ve recently been working on a C# version of my system, and it’s starting to wake
up and look around, and it’s almost good enough to use. So I decided to build a small
PC to hold my music and run the software.

I started at NewEgg, who supplied the components
for my current office system. I wanted a minimal system with a reasonable size disk
and network. A little research got me a motherboard, case, cd-rom, memory, processor,
fan, and hard disk for $328 to my doorstep. One trip to the computer store to get
another IDE cable and to get a fan that would actually *fit* in the case (its a
micro atx size). That’s a pretty good price for an Athlon 1500, 256M of memory and
40 Gig of disk space.

So, once I get XP on the system, I’ll copy the files over, and probably install the
current version of my software. One problem with the system is coming up with something
that isn’t a big ugly PC. The Micro ATX case helps a bunch, but what do you do with
the monitor and keyboard? My real home system uses IR remote control, which is a possibility,
but the new system also supports using a PocketPC as a controller. At work I use a Toshiba
with built-in wireless as the test for remote control, and it works great,
but I’m not going to use a $500 PPC to control a $330 music system. I needed something
cheaper. I decided to forgo the wireless and bought a reconditioned Toshiba e310 on
ebay for $125, and I’ll use that in the cradle as a remote control (I hope. I think
I can get this to work over the USB, but I haven’t actually tried it yet).

Bike Fit

August 6, 2003 at 4:59 pm


I’ve been riding my bicycle a fair bit in past months, and I’ve been having some comfort
problems. The first hour is fine, the second hour elbows hurt and my feet and hands
fall asleep (and my butt hurts). The third and fourth hours are more and the same.

I’m planning on doing a metric century (100 KM) in September, which will put me on
the bike for 6-7 hours, so I needed to address the comfort issue. I made an appointment
with Erik Moen, a physical therapist who works at Seattle’s Pro Sports Club (many
Microsoft people belong to the Bellevue Pro Sports
). He came highly recommended as “the great guy” by a friend I have who rides

So, Tuesday morning I drove into Seattle, and wheeled my bike in for the fit. The
nice thing about going to a physical therapist for a bike fit is that he can consider
modifications to either the bike or to the body. My expectation was that I would be
shopping for a new bike when I was done, or at least some new components. Another
big advantage is that it’s considered a physical therapy visit, so I didn’t have to
pay for the session. Ka-Ching!

The session starts with the usual medical history questions, and then a questionaire
about my bike-riding tendencies. Except for marking “spinner” instead of “cruiser”,
I’m pretty much on the lightweight side of all the questions. My session with Erik
then began.

Erik is a really nice guy, and he started by doing an evaluation of my body mechanics
and flexibility. That took about 15 minutes. We then went to one of the studios
and put my bike on a trainer for measurements. This starts with static measurements
of the bike (seat highet, difference between bar and saddle height, reach to brake
hoods, stem length, seat setback, and crank length). While he did this I watched and
generally got in the way.

Next are the rider on bike measurements, which include the trunk angle (37 degrees),
distance between elbows and knee, knee angles, and a few others I’ve forgot). My seat
was too far tipped forward (moved it back one notch), and my bars were too low (raised
them 1cm and tilted them back). Saddle height was good, as we my cleat placement.

We then worked on position, to see if I could get the handlebar inline with the stem.
He adjusted me on the bike to the position he thought I should be in, and found that
overall, things were set up pretty well for me.

The problem was that I wasn’t actually in that position, due to some inflexibility
in my hamstrings and back (there’s a note about a “probable ham challenge” on my fit
sheet, but I don’t think that’s about lunch).

His prescription:

1) New shoes to replace my very old Shimano ones

2) Stick with SPD cleats, as they’re more practical for my use

3) Insoles (superfeet or biosoft inserts) to make my feet happier

4) A number of trunk and hamstring stretching exercises to stretch my legs and cure
me of the “software slouch”.

5) A recheck in October

Overall, a very worthwhile hour. Interesting that the bike setup is fine, it’s the
rider setup that needs some work. I knew I had crappy hamstring flexibility (too much
soccer, not enough stretching), but the back part is a new one. I’m going to ask my
group to tell me to “sit up straight” if they see me slouching.

I was going to ride this morning but felt to sick, but I’m hoping to get in a few
miles tonight. I’ll post again with my impressions of the adjustments.


What I Ride, and learning to Ride

July 30, 2003 at 12:17 am


I mentioned a day or so ago that I have a motorcycle. A little clarification is in

I started riding in 1986 when my 1969
Citroen Safari
broke a timing chain at 70 MPH, and embedded a couple of valves
in the pistons. It was either a cheap car or a decent motorcycle, and a Honda
made its way to my apartment. After a few months of riding, I got my endorsement,
and started riding from time to time. Kim was also interested in riding, but the FT
was a bit tall for her, and her attempts were not successful.

Enter the Motorcycle Safety Foundation.
MSF was formed in the 1970s to provide, not surprisingly, motorcycle training. I took
their Experienced Rider
, and Kim took the basic
. The basic course is a wonderful way to find out if you really want to
ride a motorcycle – the course provides motorcycles, helmets, and a world-class
curriculum, all for a few hundred dollars or less. In many states, you walk
away from the course having earned a motorcycle endorsement (assuming you pass).

Kim’s success led to a 1988
Ninja 250
for her, which was soon followed by a 1989
 for me, followed closely after by an MSF instructor course for me.

MSF takes its instructor training very seriously, and I spent 10 days doing nothing
but motorcycle training. After that, I taught a lot of classes, and did a lot of riding,
commuting year round by motorcycle for about a decade. The Ninja 250 was replaced
by a CBR600F2 for Kim,
and a few years later, my EX500, having hit 50K miles, was replaced with a 1997
, my current bike (though mine is a bit more customized than this one).

Kim liked the power of her CBR, but it’s a little too tall for her (she’s somewhat
height-challenged). So, where do you find front-line sportbikes for people who are
a bit on the short side? The answer is
obvious. All the Japanese manufacturers make home market bikes that would be perfect.
A friend led me to somebody who imports Japanese-spec bikes and registers, and the
CBR was soon replaced with a very rare in the states Honda CBR400RR,
which is pretty much the perfect wife for Kim

Then, a few years ago I moved near the Microsoft campus and got a lot more busy, so
I had to give up teaching motorcycle safety, and I still have a hard time finding
time to ride.

I missed a few high points, including an introduction to the pavement, riding a GP
spec 125cc bike, and being a passenger around a racetrack at 130MPH, but that’s for
another entry.


The persistance of nomenclature

July 29, 2003 at 10:40 am

Yesteraday, I was struck by the fact that in a technological world, nomenclature
outlasts the items it refers to.

When I first joined Microsoft (“The year was 1994. The place was Redmond, Washington…”),
we used MS Mail for email, and for scheduling, there was part of it named Schedule+.
If you wanted somebody to schedule a time with you, you would ask them to “sched+”
a meeting with you.

That usage has persisted over the years, and just yesterday I found myself using it.
As I used it, I wondered if the person I was sending that message to had ever actually
used Schedule+.

There’s a similar situation with our bug tracking software. For years, we used various
releases of an internal product named “Raid”, and though we moved to Product Studio
(the “studio” term shows up a lot…), you still “Raid” a bug, and probably always

When new people start and you have to explain this to them, you feel a bit strange
(don’t worry about uncle Herbert. He does think that he’s a plant and insist we water
him every day, but other than that, he’s perfectly all right).

This morning, I was looking for more examples of this. Record/CD is one, though I
always use “album”, and I think that’s still true if you choose to buy your
music. Since IP pays for my motorcycle, my skiing, I buy all my music.

Are there other examples of this?



Unit testing and TDD

July 28, 2003 at 5:41 pm

Back in March, I wrote a column entitled “Unit
Testing and Test-First Development

I’ve been playing around with unit testing a bit more since then, and have a few tentative

  1. Unit testing is, overall, a “Good
  2. Unit testing works well for class libraries, especially ones that act fairly statically.
    If you create one of these, you should be writing unit tests
  3. Unit testing is hard with graphical applications and/or dynamic applications. I have
    an app that I’m writing that uses multiple threads, fires events asynchronously, and
    is peer to peer. There aren’t any unit tests for that section yet.
  4. Unit testing is great for tricky code that you wrote but weren’t sure that it really
    worked. I updated my Regex Workbench a while back,
    and in the process wrote unit tests for all the code that I have that interprets regular
    expressions to english. I found one feature I hadn’t implemented, and two that were
    implemented incorrectly. I’m now much more confident that it works.

I’e also been playing with Test-driven development. I’m not sure about it yet, though
it is true that if you write the tests up front, you’re much more likely to write

Higher Primates Can Program

July 18, 2003 at 7:08 pm

This came
to me from one of the members of the VB team.

Regular Expression Workbench V2.0

July 7, 2003 at 5:51 pm

I’ve finished a new version of my Regular
Expression Workdbench
, and it’s now available on gotdotnet.
If you use regular expressions on .NET, or you’ve heard about them but haven’t really
tried them, this tool can help you a lot. If I do say so myself.

As an old Perl guy (in both senses of the word “old”), I’ve spent a fair amount of
time writing regular expressions. It’s easy to try out a regex in Perl, but not so
easy in a compiled language like C#. I wrote the first version of this utility a couple
of years ago, and in the first version, all it did was let you type in a regex, a
string to run it against, and execute it.

Over time, it grew. The next version supported some fairly cool features:

  • A menu with all the regex language options, so you don’t have to remember what the
    syntax is for zero-width positive lookaheads.
  • Automatic creation of C# or VB code based on your regex and the options you choose.
  • Interpretation of regexes. Hover over a part of the regex, and the popup will tell
    you what that part of the regex means. This is very useful if you’re trying to learn
    regex, or you don’t remember what “(?<=” means.
  • Support for calling Split()

This version adds a few more features:

  • A nicer UI. Not a very high bar, given the previous design (“Who designed this UI?
    Vandals?”) (5 points to anybody who knows who wrote that line…). A real menubar,
    a somewhat-pleasant grouping of controls, etc.
  • Library functionality. Give the regex you wrote a description, and save it away into
    a library, so you can open it up later, or show it off to your friends. Chicks dig
    a well-crafted regular expression.
  • Unit tests for the interpretation features. Found 3 or 4 good bugs when writing the
    unit tests. These tests will get better over time.
  • Support for calling Regex.Replace(). Specify the replacement string, and you’ll see
    exactly what gets replaced.
  • Support for calling Regex.Replace() with a MatchEvaluator. For the cases where you
    can’t do your replacement with a simple substitution string, the Regex class lets
    you write a delegate. The workbench now allows you to write the function, which it
    saves away, compiles, loads and then uses to call Replace.

Comments & suggestions are always welcome.