Wednesday, April 01, 2009

Only Cowards Hit And Run

In the past two weeks there have been two seperate incidents where cyclists have been critically injured in hit-and-run collisions in the Salt Lake City area....

The rest of this post is on my new blog -

Tuesday, March 31, 2009

Moving Day

I am moving!

I recently set up a couple of domain names that I have owned for a while. I felt like one of the things that was keeping me from blogging as much as I wanted to (besides the laziness) was that I was losing focus on this blog. I never knew whether a particular topic was too 'cyclist' for the geek side, or too 'geek' for the cyclist side.


I have split my blog into - primarily tech topics - cycling and the rest of my varied interests

I am sure there will be some crossover, but it is my intention to keep an appropriate focus for each blog.

Jump on over to which ever (or both) suits your interest and update your RSS feed.

Thursday, December 11, 2008

Log4Net ConversionPattern Strings

Several months ago we began to transition from an in-house logging framework to Log4Net in our primary web applications. For the last couple of days I have been trying to troubleshoot some production problems in the two of these applications and I noticed that my Log4Net logs were using a 12hr clock for the timestamp, and didn't include an AM/PM indicator. It also used old style parameter names rather than the newer verbose parameters.

Seeing as how I tend to cut and paste code for things like that, and I know other programmers do as well, I figured I would blog about what I am switching to, as well as a couple of other options. In case you are not really familiar with log4net, this setting is changed by editing the value string for the ConversionPattern param in the - log4net --appender - section of the web or app config file:

<param name="ConversionPattern" value="your string here"/>

The old:
value="%-5p %d{yyyy-MM-dd hh:mm:ss} - %m%n"
Results in:
ERROR 2008-12-03 01:28:38 - login.aspx submitted for 7234

Besides the timestamp problem, the format string is difficult to understand. It is not at all obvious what 'p', 'd', 'm' and 'n' stand for. Well, maybe the fact that 'd' is followed by a date format string you could guess that it stood for Date.

The following link lists both the shortcut and the verbose fomat values from the Apache log4net documentation.

The one I am switching to:
value="%-5level %date{yyyy-MM-dd HH:mm:ss} - %message%newline">

Note the more obvious setting names. This value string results in:
INFO 2008-12-11 14:06:59 - login.aspx submitted for 7234

Other choices:
value="%-5level %date{G} - %message%newline">
Results in
INFO 12/11/2008 2:15:07 PM - login.aspx submitted for 7234

value="%-5level %date{yyyy-MM-dd hh:mm:ss t} - %message%newline">
Results in
INFO 2008-12-11 02:06:59 P - login.aspx submitted for 7234

value="%-5level %date{G} - %message%newline">
Results in
INFO 12/11/2008 2:15:07 PM - login.aspx submitted for 7234

value="%-5level %date{u} - %message%newline"
Results in (not this is UTC time)
INFO 2008-12-11 14:06:59Z - login.aspx submitted for 7234

Those of you familiar with date string formats in the .Net framework will recognize some of these strings. The Log4Net framework allows you to use any date format that is valid in a ToString() call in the .Net framework. For additional format strings see the MSDN Format String Documentation.

Monday, December 01, 2008

Adding A New Label

I am long past due for an update to this blog. Part of my lack of motivation is knowing that most of the people who subscribe via various readers came here for the cycling posts. Unfortunately, other than my sporadic attempts to attend my local spinning class, I have reverted to near non-cyclist status.

This is not my preferred lifestyle, but represents a trade-off based on life long passions and priorities. Perhaps a little history is in order...

Many, many years ago in the very late years of the fabulous decade commonly referred to as the '80s', I met a fabulous woman. This woman became my wife, and led me to exclaim jokingly that in my life, she ranked right up there with Basketball and Subway Sandwiches. While she is clearly (at least I hope it's clear to people other than me, and to her most of all) at the top of my list, basketball remains a deep love, one that after years of devotion has come to return my favor.

My New Gig
About two months ago I was approached by the head coach of my son's high school basketball team about the possibility of joining his staff. It took several weeks of negotiations with family, bosses and my own insecurities, but approximately 3 weeks ago I became an assistant basketball coach and the head (read 'only') sophomore basketball coach for the high school. I run practice for 2-2.5 hours after my regular job each day, and will be on the bench for 20 soph, 21 JV and 21 varsity games.

This is truly a labor of love, because so far all I have been paid is 4 t-shirts and a pair of shorts. I am sure that the income will never come close to the costs. It probably won't even cover my gas money for the season. But already, having lost our first game by 20, and watching as the varsity lost by 50 to one of the premier programs in the state, I can't help but smile and say to myself, "Tomorrow is going to be a great day...I get to coach basketball again."

Monday, September 08, 2008

See and Be Seen

At work we recently switched from a standard 5x8 schedule to a 4x10 schedule. Among the other complications of this change is one of particular concern for cyclists. While in the past there was a major portion of the year where I could ride without lights, it seems I will need to use my lighting system year-round now.

A couple of co-workers have asked what kind of lighting system I use so I thought I would share my experiences here.

See or Seen
There are really two issues with bicycle lighting. Can you see, and can you be seen by others. In an 'urban' setting you may only be worried about being seen since street and building lights may provide plenty of light for you to see. Your speed can also be a big factor in this as well, as the faster you ride the more important your ability to read road conditions becomes.

For 'being seen' almost any reasonably bright white light will do and one that flashes may be better than on that only has a steady-state mode. On the bikes my family owns I have used several different manufactures and models, but have been very satisfied with several models of Cateye brand lights.

For my commute, I typically ride through a couple of industrial areas that are not well lit. I also ride at an average speed of around 16-18 mph through those areas, so the AA battery driven lights don't typically cast enough light an an appropriate pattern for my commute.

A wide range of lights are available that are more suitable for this use.

Eddy's bike shop in Ohio put up a great light comparison page. You can click on various systems and see the illumination, beam pattern and light color.

My Recommendation
The difference in cost between a AA or AAA battery driven system and the brighter rechargeable systems is significant. Unless you know that your speed and the road conditions require the brighter, more expensive systems, I would recommend you start with a low-cost light with a flashing mode. Then, if you decide it's not bright enough for your needs you can still use it in flashing mode, or as a helmet light when you upgrade.

Monday, September 01, 2008

Sarah get your gun

I try not to get too political in my posts unless they fall into one of three categories:
  1. I am absolutely outraged by something and just can't keep it to myself;
  2. There is a political point to be made about transportation or cycling policy;
  3. I see/hear something funny that has to be shared.
Today's post is a category 3 post.

I was just surfing the net, not really paying attention to the TV, which was tuned to the Larry King Show (clearly Mrs. GeekCyclist was in charge of the remote). There was a panel of 4 talking heads going on and on about the selection of Sarah Palin and the emerging complications related to her daughters pregnency. It was then I overheard this gem by one of the blatherers:
It's a good thing she's still a member of the NRA because it looks like it's going to be a shotgun wedding.

Saturday, August 30, 2008

What Kind Of Bike Should I Buy?

If you were paying attention I bought a bike about three months ago. My bike budget is zero, so the question here really isn't about me. In one week I was asked that by two neighbors and two co-workers. It seems like a get this question at least once every couple of weeks. I figure it must be gas prices. Even better, that question gives me a reason to write a new post.

It's not what, but where that counts the most...
The first thing I tell anyone asking about buying a new bike is that the best choice they can make is to go to their Local Bike Shop (LBS). There are a number of advantages to buying from your LBS rather than a department or discount store:
  • Qualified sales staff - if you ask them your question they should ask about the way you plan to ride and can match you to the right bike.
  • The bikes are higher quality, even at the bottom end of the catalog.
  • The bikes have been properly assembled by qualified mechanics.
  • Service is available after the sale, usually for free for a year or at a steep discount.
  • Usually any accessories you buy with the bike will be discounted.
What are you going to use it for?
Before you head to the LBS you should have a good idea of how and where you are going to ride your fancy new bike. Most people who are buying a first bike are looking to:
  • Ride around the neighborhood for fitness and fun
  • Ride parkways and paths (remember a car carrier to get the bike to the parkway if you live more than a couple miles away)
  • Ride in a charity ride like an MS-150 or a Tour de Cure
  • Replace local/short car trips and errands with bike trips
  • Commute to work
You should figure out what you think will be your primary use and then your top secondary uses. With the broad range of bicycles available you should be able to find something suitable within your price range. Sometimes the only thing that would need to change for one use to another would be accessories. For example if you want to ride paths and do charity rides but think you may also want to commute or run errands you may want to consider a rack and fenders.

The Test Ride
For most of the uses listed above, a bike in the 'cross' (not cyclocross), 'comfort' or 'hybrid' categories would be perfectly suitable. The key is to take as long a test ride as the store will let you. Bring your helmet, and wear the clothing you will normally wear when riding for your primary use. You want to make sure you are comfortable on the bike. Go back to the shop and have it adjusted and try again if something doesn't feel right.

Other Categories
The uses above are what most people list when they say they want to buy a first bike. There are other uses, and a lot of other categories. You may want to do technical or long distance mountain bike rides where a full-suspension bike would be appropriate. You may want to commute only, and might have a fairly flat route to work, in which case a trendy single-speed may be just the ticket.

The key is to tell the worker at your LBS what you want to do, listen to their suggestions, and try several models before you buy.