text: .
  .
  Every year I write a humorous holiday letter to go along with the cards that we send out to friends and family.
  Well, let's be realistic. Each year I spend hours and hours writing, trying to come up with something that is at least amusing. Some years, it's fairly funny. Some years, not so much. For example, two years ago I wrote about why my roomba Alfred qualified as a pet. Last year, I co-wrote the letter with Sydney, our Australian Cattle dog mix (Sydney would like me to note at this point that he considers "mix" to be a derogatory term, but that at least it's not as bad as the speciest stuff that I usually write). I had hoped to put that one on my blog, but a contractual dispute nixed that deal. I don't care if he *is* a working breed, I'm not going to give him 30%.
  The one common thread through this process is that a) I agonize over what I write, worried that it isn't funny enough (it isn't...) and therefore b) it's rarely done when I would like it to be. Many people send out their cards around Thanksgiving. We sent ours out yesterday, which means that it is technically possible for some people to receive them before the 25th. This is only average performance - in our worst performance (well, *my* worst performance), they went out around New Years Day. Though I must admit that sending out cards at that time does make your card more noteworthy.
  So, here's the letter, which mercifully is only two pages this year:
  ‘oliday ‘05
  Greetings, and welcome to the Gunnerson holiday letter. We have a great letter for you this year, including appearances by our usual family members. But let’s start with this year’s list:
  Top 5 reasons the holiday letter is late
  5. Scarred by Brad & Jennifer, worried about Ashton & Demi
  4. On a European junket with Humor Action Committee lobbyists
  3. Too busy working on “Programmers: Pango Pango“ reality show
  2. Incessant bicycle riding produced dangerous pressure on comedy center
  1. NASA satellite detects enormous “humor hole” over the Seattle area
  If you watched any coverage of the Tour de France, you may have noticed that Team Discovery rides bicycles from Trek. If you take one of those bikes, add a little weight, and painstakingly eliminate all traces of talent from the rider, you have me on my new ride, a Trek Madone 5.2. Since such a purchase does not qualify as sufficiently expensive under subsection 8.3.4 (b) of the revised code of the male midlife crisis, I was forced to fall back on exception (iii), which says that “any purchase is acceptable provided it has flames painted on it”. They are yellow, on bright red paint.
  This summer, we decided to do something different for our vacation, something with a bit more adventure. A far as I have been able to determine in my extensive research, in the vacation-biz, “adventure” is a synonym for “give me a lighter and I’ll burn that thing off“ or, at the very minimum, “do you have all your shots?”
  Far be it for me to criticize those friends who embark on such adventures and think nothing of spending a week in the woods with only what they can carry. To criticize them would not only be uncouth, but would reduce the number of people I can depend on after the collapse of civilization.
  But for us, it’s clear that the Gunnersons are not, either by nature or nurture, campers. We’re all over the “go outside and do new, fun, or challenging things” part. We are not down with “I thought you packed the dishes did you put out the fire what’s that poking into my back I’m freezing in here my sleeping bag is getting wet OH MY GOD is that an animal outside the tent”.
  So, after intense deliberation, we chose a “Family Multisport Bicycle Tour” of the Columbia Gorge. For those of you who have forgotten your “Washington State History” (or worse, never had the chance to take it...), the Columbia gorge was mapped by “Meriwether” Lewis (so named because of his sunny disposition during the dark and damp Washington winter) and William “please name a candy bar after me” Clark. While in the gorge, they came across a group of native americans who navigated the river on cedar planks, holding wood frames with deerskin hides on them for propulsion. (think about it...). Our trip would mirror the original route taken by Lewis and Clark, in the sense that both groups would spend time both in Oregon and Washington (though they preferred Oregon because they didn’t have to pay sales tax).
  The trip included four days of biking (15-20 miles per day), two days of hiking, a morning of whitewater rafting (including a 12’ waterfall drop), an afternoon falling off a board at Hood River (they claimed it was a windsurfing lesson, but my understanding is that “windsurfing” requires standing up for more than 30 seconds), and countless hours of eating great food and lazing around. It was, to use Samantha’s words, “the best vacation ever”.
  Kim has been progressing well in her studies on her way to her PhD (Doctor of Philosphy), a holdover from the era when the philosphers ran the show. She is currently a PhC, which she says is short for “PhD candidate”, but is actually short for “Chauffer of Philosophy”. Earlier she was a PhB (Babysitter of Philosophy), and before that a PhA (Appraiser of Philosophy). In some countries, such as Vietnam, this process continues all the way up to the PhO (Doctor of soup).
  After a couple of months of negotiations, Samantha decided in September to leave her current position and accept a new one at Highland Middle School. Like many new jobs, this one included some initial qualification tests, including “tuna surprise”, “how many books can you carry”, and, of course, the state-mandated “malfunctioning locker” test. She’s having lots of fun.
  That’s all for now. Happy holidays from Samantha, Kim, and Eric.
  For years they have come, to watch and to marvel
  The old, the adult, and the recently larval
  With dogs and with cats (and even a mouse)
  To look at the lights on the Gunnerson House
  But there was one not entranced with the sight
  That greeted the viewers each long winter night
  The view did not fill him with joy and with wonder
  The one they call Zeus, god of wind, rain, and thunder
  The mortals had started a landscaping project
  Removing that air of decay was their object
  The backyard, to be fair, it did have some needs
  We are not fond of pea gravel and weeds
  In front, lay a deck that you travelled a-brisk
  For dalying on it would be quite a risk
  The decking decayed and the railings askew
  And a hole where someone had put her foot through
  So a plan was hatched to tear off the deck
  Go into the back and clear out the dreck
  Make it look nice, make some amends
  And not be embarrassed to show it to friends
  Our contractor started, in brilliant fall sun
  In no time at all the work was half done
  But the gods were a watching, and constantly scheming
  Within their heads a plan was a-teeming
  “We’ll do it with weather”, said Zeus with a sneer
  “The lights will not go up on that house this year”
  So on came the rain, and with it, the mud
  And everything stopped with an audible thud
  For weeks it went on, and our senses were reeling
  (though snow in the mountains did temper that feeling)
  And just when it looked like the forecast was better
  Cold weather and snow made us reach for a sweater
  And the lights are still nestled inside their containers
  This year we will not be part-time entertainers
  When it will be done we cannot estimate
  And things are still in a deplorable state
  Our only option is to just trust in fate
  And we’re quite optimistic about 2008. ]
  I.
  Find...
  Today,?
  Halo as a sideshooter...
  You can switch to english, but I find that french is a bit more fun...
  My...
  From a checkin I made today:
  I.
  What does this code print, and why?
  public class B: A{ public void F(object o) { Console.WriteLine("B: {0}", o); }}
  public class Test{ public static void Main() { B b = new B(); b.F(1);
  }}
  what about this code?
  public class A{ public void F(short i) { Console.WriteLine("A: {0}", i); }}
  public class B: A{ public void F(int i) { Console.WriteLine("B: {0}", i); }}
  public class Test{ public static void Main() { short val = 15;
  B b = new B(); b.F(val); }}
  We've been blessed with a bounteous harvest of spam on our home account, and I'm now looking for a good spam filtering solution.
  Needs to run on outlook express. Free would be best, but if I need to pay a bit, that would be OK as well...
  Match a floating point number.
  [Update: Fixed a cut/paste issue with the match for + and -.
  Many of the comments on the original post spoke of not having sufficient sample strings. I omitted them deliberately, so that the problem requires a bit more work and will, with any luck, be more educational. My hope is that a little more freedom will give me more issues to write about.
  Or perhaps I'm just lazy.
  Regardless, the floating point number I was thinking of was something like:
  -333.33
  It has an optional +/- at the front, at least one digit, and then an optional decimal part. And there's no internationalization, so you don't have to worry about characters between digits or "," instead of "." as the decimal point. (What is the term used instead of "decimal point" in such countries? Anybody know?)
  And, of course, the usual caveat that if you want to validate a floating point number, something like Double.Parse() is likely to be a bit more robust than a regex you write...
  So, to start, we need to match the optional sign character. We do that with:
  (\+|-)?
  Next one or more digits:
  \d+
  Optionally followed by a decimal point and one or more digits:
  (\.\d+)?
  which gives us:
  ^(\+|-)?\d+(\.\d+)?$
  As the final regex. If you wanted to, you could easily extend that to add in "E-038" as an allowable suffix.
  (yes, I know, I didn't get last week's discussion out there. It will be there shortly...)
  Fatty is talking about overtraining as a possible excuse for not riding, and mentions Friel's statement on overtraining ()
  Less than one-tenth of one percent of the general population is capable of attaining such a feat.
  That's a pretty powerful statement, and Fatty uses it to assert that only the upper level of pro athetes can overtrain (it's not clear to me if his statement is another Friel quote, or a paraphrase, hyperbole, or the product of too much of "the best cake in the world")
  To me, what it comes down to is this question:
  Is my overall fitness level going to be better if I:
  a) train today?b) rest today?
  If the answer is "b" and you train today *anyway*, you are overtraining. Of course, there are some caveats - your "training" today might be more "active rest" than training.
  So, how many cyclists overtrain? Well, my experience is that many people - especially those who like to push "until I start getting tunnel vision" - tend to have trouble controlling their intensity. Friel says:
  Generally, a week should have at least as many recovery workouts as hard workouts, if not more. Every third or fourth week there needs to be a period of greatly reduced training with an emphasis on rejuvenation.
  Carmichael says something similar.
  So, anyway, my point - and there is a point this time - is that many - if not most - serious recreational athletes are in danger of overtraining now and then. I have a friend (no, really, a friend...) who would ride his bike "all out" for 75 minutes every night for a period of months. I don't see how he could be anything but overtrained.
  Bob (of Bob's Top 5) has a nice post about layoffs. Here's my story (well, one of my stories - maybe I'll tell the second one some other time).
  Near the end of the 80's, I worked for MicroRIM (of R:Base fame). Trivia fact: R:Base grew out of software that was developed to track the heat-resistant tiles on the shuttle.
  R:Base was a very popular DOS program, and customers were clamoring for a Windows version (well, some for Windows, and some for OS/2...). Unfortunately, that request got a bit garbled on the way to management. Customers said, "Make R:Base run on Windows", and management heard, "You know what we really want? You should build a next-generation database product that runs on Macintosh and OS/2, and while you're at it, you should create your own database server and make sure you can interop with Oracle, Sybase, DB2, and all the other mini and mainframe databases".
  If ever there was a project that had delusions of grandeur, it was this project.
  They finally ended up naming it "Vanguard". (The irony of picking the same name as a rocket that only orbited 3 satellites in 11 attempts was not lost on any of us...)
  But the project was planned, millions of VC cash was raised, and groups staffed up - one to build the DB server, one to build the GUI layer, one to build connectors to other databases, and my group, to build the UI that sat on top of everything.
  Things went poorly for the first couple of years. Nobody had any experience building anything that big, and the groups weren't exactly tasked to help other groups out. After about 18 months, my group got called into a conference room one morning, and my manager Tom said, "Okay, is everybody here?", and somebody said, "Mike and Tim aren't here", and then Tom said, "Yeah, that's what I need to tell you guys...". That was the first layoff.
  The second layoff came about 3 months later, and I was putting together my resume. I survived the third one, and got moved to the database connector team, working on the connector to one of the VMS databases (and, IIRC, the only piece of software that ever shipped out of that project).
  Then one day, I got up from my desk to get something to drink, and noticed that everybody on my team was in a conference room. Except me. I got a drink, went back to my desk, and started packing...
  So what's your story?
  Regex 101 Exercise I1 - Match a floating point number
  Sample strings:
  You know what a floating point number is.
  Here's a description.
  From Bad Astronomy Blog
  Regex 101 Exercise S6 - Change the extension on a file
  Given a filename including path, change the extension to .out.
  Input string example:
  C:\utility\Processor.cs
  *****
  I said in the exercise description that this take a bit of care. One first blush (what a weird turn of phrase), one might think that this is a simple problem. But when you dig into it a little deeper, you will find that it remains a simple problem, mostly because the regex defaults give you the right behavior in this case. But not always, so I'm going use this as a stepping off point to talk about something that is close to many people's hearts this time of the year.
  I'd like to talk about greed.
  Though Michael Douglass may have said that "Greed is Good" in Wall Street, things aren't so clear-cut in the world of regular expressions. I started to write something about greediness and non-greediness, but then I realized that I already had. So go read that, and get back to me.
  Now, back to the exercise. :
  If you are a seasoned regex professional, you are likely used to writing non-greedy expressions more often, because they are on the whole more well-behaved than greedy ones. So, here's the first thing you probably wrote:
  (?<Path>.+?)\.(?<Extension>.+)
  Which works fine on the example I gave, but if you add in a few more test cases:
  C:\utility\processor.test.csC:\utility\fun.stuff\processor.cs
  You'll find that it not working correctly. The problem is that the first match is a non-greedy one, so it's giving you a minimal match - a match up to the first period, not to the last one. If you switch to greedy on the path match, things work right:
  (?<Path>.+)\.(?<Extension>.+)
  and the replacement string to use with this is simply:
  ${Path}.out
  that was less than earthshaking, but I did notice that most of the respondents to the original post got the answer wrong, so at least it wasn't totally trivial.
  Bonus exercise. Change the "Extension" match to be non-greedy (.+?), and explain the results.
  So that's the last of the simple exercises, though looking at the intermediate ones, they don't really get that much harder.