• Mountain Mayhem 2009

    The first in a series of ‘better late than never’ postings.

    The Glencroft Rabble invited me to ride the 2009 Mountain Mayhem with them, a race I had never done before, and indeed my first 24hour since I swore off them after bad experiences in 2006. Queue a road trip with the boys down to deepest England in Gav’s Dad’s ridiculously powerful VW van. We entered the event arena with the ceilidh music blaring, much to our own amusement. After a few rude folk insisting their barbeque would take up five tent spaces, we settled next to some of the army crowd.

    For some reason I was volunteered to do the Le Mans style start. This was pretty brutal, as running on hard ground in race shoes is not something super comfortable. After finding my bike I pushed on to pass loads of folk and eventually come in 16th or so after the first lap. The course was pretty awesome, though as we later found out, the chicken run on one steep descent was about 30s faster.

    Geoff broke his mech on his first lap, resulting in him losing a few minutes. This was OK, but it resulted in me being a few minutes late to meet him after his next lap as I didn’t adjust his lap time for the mechanicals. My fault, but luckily it was one of only a few minor troubles we had.

    During my first night lap it rained, which turned the dry dusty ground into an icerink due to the putty-like clay on top. We were all running dry-tyres, but were managing to ride everything with ease, only losing a few minutes a lap compared to the dry times. Gav did have a bit of a mega crash on a cattle grid on his wet lap, but being the legend he is he got straight back up to finish his lap then report to the first aid tent.

    The weather turned nice again, and the course soon dried up as a result. This didn’t stop the organisers taping out one fun part of the course as someone had broken their pelvis. Shame, as I was loving the roots and mud on that section.

    Someone told me we were in third in expert and fifth overall before my 6am lap. This was the boost I needed to crack on with the rest of my laps. I passed George Budd from Team Salsa, who were in second at that point, on the steep forestry road climb. I said hi, and kept the pressure on for the rest of the lap. The rest of the guys did the same for our remaining laps.

    In the end we were fourth overall, and the second expert male team. Great performance all round.

    On the way home we were pretty sleep-deprived. Geoff and I amused ourselves by texting BBC Radio One’s “The Surgery” with our own definition of ‘success’. Well, they did ask.

    About a week after the event, I discovered that I had the fourth fastest climb time for the steep forestry road I mentioned above. Not bad since this was just the place on the course I was using to make up time, rather than specifically targeting it.

    Thanks to Geoff, Gav and Jack for the brilliant weekend. Also thanks to Andrea for the cups of tea and food between laps and afterwards.

  • Clearing a File Input Field Using JQuery

    While working on some file uploads today, I was in need to a way to clear a file input field if a user changed their mind after selecting a file. I came up with the following simple solution.

    In my example I place a ‘clear’ link next to the field, but a modified method could be called from anywhere.


    Wrap the field you intend to clear in a span, with a descriptive ID so we can find it.

    We’ll also want our ‘clear’ link to be descriptively IDed.



    Now in our JavaScript (JQuery) we want to add a click event to our clear link which will clear the file input field.

      var fieldSpan = $('#myfileinput');


    Since we can’t write to the value of a file input field due to security concerns, instead we overwrite the contents of the span, with the contents of the span (itself), thus creating a new file input DOM object which doesn’t have a value set.

    A crude but working example can be found in this Gist.

  • Kona Kula Deluxe 2008 Dropout

    Last night I snapped the replaceable deraileur hanger on my 2008 Kula Deluxe, and was looking for a replacement.

    Kona don’t list it in the technical guides on their website, and the hanger is merely marked with ‘S9’ or ‘6S’ depending on which way you hold the hanger. Thankfully after a bit of looking around, I discovered what I wanted in the form of a BETD 197 hanger.

    Phew, now I can be riding in two days, while my dealer-ordered one can be a spare.

  • 2009 in Review

    Just like I did for 2008, 2007 and 2006, I bring you my review of the year, in the form of one of those annoying round-robin email type question things. Yeah!.

    This year I’ve changed some of the perennial questions to more appropriate things.

    1. What did you do in 2009 that you’d never done before?
    Bought a car.

    2. Did you keep your new years’ resolutions, and will you make more for next year?
    Yeah, I beasted it on the bike. Next year; Do the One Hundred Push Up Challenge by my birthday (February 20th), and learn to juggle by the years end.

    3. Did anyone close to you give birth?
    Not that I noticed.

    4. Did anyone close to you die?
    Magnus and Emma’s Mother, Margaret Bean. May they both rest in peace.

    5. What countries did you visit?
    Pretty poor this year, only Cyprus.

    6. What would you like to have in 2010 that you lacked in 2009?
    Less paperwork.

    7. What date(s) from 2009 will remain etched upon your memory, and why?
    8th October; Driving through the night to Newcastle after Margaret died.

    8. What was your biggest achievement of the year?
    Minor race positions probably.

    9. What was your biggest failure?
    Crashing on the Forth Road Bridge while looking totally the wrong way (the truck I was looking at was pretty exciting).

    10. Did you suffer illness or injury?
    Had a sore throat for a week, been lucky this year.

    11. What was the best thing you bought?
    My MSC Koncept Carbon frame.

    12. Whose behavior merited celebration?
    Kirsty, my sister, who graduated. Again.

    13. Whose behavior made you appalled and depressed?
    Davide Rebellin. At least with Schumacher it was predictable.

    14. Where did most of your money go?
    Bikes, despite buying the car.

    15. What did you get really, really, really excited about?
    Seeing Up! at the cinema.

    16. What song will always remind you of 2009?
    Black Eyed Peas – I Gotta Feeling.

    17. Compared to this time last year, are you:
    i. happier or sadder? Happier.
    ii. thinner or fatter? The same, as always!
    iii. richer or poorer? Richer.

    18. What do you wish you’d done more of?

    19. What do you wish you’d done less of?

    20. How did you spend Christmas?
    Mum’s for Christmas day, Dad’s for Boxing day.

    21. Who did you spend the most time on the phone with?
    My dad, getting updates on the happenings in his world.

    22. How’s the big romance going?

    23. How many CDs did you buy this year?
    Probably only about five. Hello digital music era.

    24. What was your favorite TV program?
    The Big Bang Theory, second season just keeps the laughs coming.

    25. Do you hate anyone now that you didn’t hate this time last year?
    Nah, I’m pretty mellow with everyone. Same again.

    26. What was the new best book you read?
    A Dog in a Hat – Joe Parkin. Pure comedy.

    27. What was your greatest musical discovery?

    28. What did you want and get?
    A car. A nice watch.

    29. What did you want and not get?
    Sledging, despite all the snow.

    30. What was your favorite new film of this year?
    Burn After Reading.

    31. What did you do on your birthday, and how old were you?
    I was 24, rode my bike and had a birthday meal..

    32. What one thing would have made your year immeasurably more satisfying?
    Retiring to become a full time cyclist.

    33. How would you describe your personal fashion concept in 2009?
    It was the closest thing to hand when I wanted to put clothes on. Same as last year. Again.

    34. What kept you sane?
    The bike, Emma. Same as last year.

    35. Which public figure was the biggest loser of 2009?
    Tiger Woods. What an idiot.

    36. What political issue stirred you the most?
    The car scrappage scheme coming in right after I swapped cars.

    37. Who did you miss?
    Magnus the Dogoid!

    38. Who was the best new person you met?
    Steve Deas, he helped me out loads this year.

    39. Tell us a valuable life lesson you learned in 2009:
    Have more than one compass, so you can find it when you really might need it.

    40. Quote a song lyric that sums up your year:
    “It’s times like these we learn to live again, it’s times like these we learn to love again”

  • SXC Round 4 2009 Fort William

    The fourth round of the SXC was also the Scottish Champs. I was hoping to reasonably well, maybe get myself a top five. This didn’t happen for me, as on the day my legs were not enjoying the three big-ring flat sections, and I lagged quite a bit towards the end, eventually ending up in eleventh place.

    The course was awesome though, with the super steep start section, then some of the climb from 10 Under the Ben two weeks before. Then into an awesome natural descent, full of stumps and dropoffs to catch out the unwary. I honestly wonder what it would have been like had it rained for several days before the event.

    Muchos respect to Andy Barlow for finally adding the Scottish Champs to his Palmares.

    The SXC site has results, and images are available from Colin Robinson.

  • 10 Under the Ben 2009

    No Fuss yet again put on a sterling event for the 2009 edition of 10 Under the Ben at Fort William. And they got the weather right, with 30C heat beating down on the riders in the middle of the day.

    I was riding with Allan ‘The Love Machine’ Love, taking it easy, and generally having some fun. This didn’t stop me having a go at the fastest lap. I thought I had it in the bag, even though on my first and fastest lap my front mech cable slipped leaving me unable to get into the big ring. No worries really, it possibly stopped me from pushing to big a gear. It looked to be in the bag, until Mr Andy Barlow popped in to do solo, and pushed out some of the quickest laps of the day, beating my times be a few minutes. Not to worry, it’s all a bit of fun.

    Like last year I felt the event was slightly over-subscribed, with far too many people on the course at any one time. Despite the good humour of those I passed, I did have one crash when someone stopped right in front of me at a water trough. I expect a little inexperience from people, but it was so busy it was feeling almost dangerous at points.

    The course was a cracker though, definitely the best so far, with some of the World Champs descent used as a climb, and lots of nice natural stuff thrown in.

    I wasn’t on my own for the weekend; Emma came up for a mini-holiday, along with Magnus (who got lost briefly when he went to insect the sausages cooking across the carpark). Murray and Vo were riding solo, with Dawn and Tracey supporting them respectively. Murray did six laps, which was mightily impressive since he underwent brain surgery less than a year ago. Vo beasted it up for eight laps, resplendent in his Molteni top.

    Photos from the weekend can be seen on Flickr.

  • SXC Round 3 2009 Laggan

    Laggan is not usually one of my favourite races, the big-ring climb straight up a forestry road with a man-made descent straight back down is usually pretty unexciting. But for 2009, a few hundred meters of natural singletrack had been added to the climb, making things a lot more interesting, and leaving a few people like myself on the ground.

    First lap was straight up the forestry road, with the singletrack climb only being ridden for the remaining laps. Thankfully everyone kept their heads on at this point, and we cruised up before having a bit of a sprint in the final few hundred meters for the holeshot into the descent. I got into fifth position, which I held all the way to the bottom.

    Onto the climb again there was a little group of five of us, with four riders up ahead. I blew apart the group I was in with a big effort on the steep part, so as I could be first into the singletrack. This worked well, and only Jack Richards and Bruce McLeary were able to come with me. Jack had a little tumble on the exit to the forestry road, leaving Bruce and I to our personal battles.

    On each of the remaining laps Bruce would gain about five seconds at the top of the climb, and I’d take it back on the bottom of the next climb. This continued until the last lap where I caught and passed him before the singletrack. Unfortunately I followed Jack’s example, and went over my bars on the exit, meaning Bruce could put a couple of seconds into me.

    Bruce ended up taking 4th place by the misfortune of James Fraser-Moodie who had a puncture. I rolled in in 6th place overall, first Expert.

    The SXC site has results, and images are available from Colin Robinson.

  • Simple Rails Config

    There are a lot of Rails config options around, but despite this, I thought I’d share mine.

    My design goals for this were:

    1. Once the configuration was loaded, it would be stored in memory for the next time it was required.
    2. Nice usage syntax, like config.authentication.password rather than the oft-used config[:authentication_password].
    3. Zero dependencies outside what is already included in Rails.


    # Rails Config.
    # Copyrighted(c) Douglas F Shearer 2009
    # Licensed under The MIT License.
      password: myhackproofpassword
      api_key: d3c3576398a4876c920553b714bc177f
      username: flickrusername
    # Akismet.
      api_key: 876c920553b7


    # Rails Config Loader.
    # Copyrighted(c) Douglas F Shearer 2009
    # Licensed under The MIT License.
    module Config
      class ConfigStore
        # Takes a hash as an argument.
        # If this hash contains other hashes, these too will turned into
        # ConfigStore objects.
        def initialize(contents)
          @contents = contents
          @contents.each do |k, v|
            if v.is_a?(Hash)
              @contents[k] =
        def method_missing(sym, *args)    
          @contents[sym.to_s] || super
      def config
        @@config ||="#{RAILS_ROOT}/config/app.yml"))
    include Config


    With both these files in place, we can now call the config from anywhere in our app:

    >> config.authentication.username
    => ""
    >> config.authentication.password
    => "myhackproofpassword"

    I’ll probably add overrides for environment specific configuration in the future, but this covers most of my needs for now.

  • BMBS XC 2009 Round 2 - Dalby Forest

    The second round of the BMBS was held at Dalby Forest, a venue that shall host the first round of the 2010 World Cup. After my top 10 result at the first round, I was hoping to have a similarly good result. Dalby forest is an off place to get to, the last quarter of the journey takes half the time, due to a combination of rural roads and a massively long forest drive to finish.

    The course was a good one, steep climbs, with similarly steep descents. Much was made of the steep drop at Worry Gill, with queues of people watching as I rode down it without even looking. Some people even went home on the Saturday, so unsettled by the course were they.

    A fast start was required to make sure that there wasn’t many riders holding me up in the singletrack. This didn’t all go to plan, as starting from the right side of the front row, with a long left hander right of the start line, meant I got into the first section in about tenth. Patience was the key at this point, as I slowly worked through the riders over the first few sections. This wasn’t enough though, as several hesitant riders allowed the first few riders to get away while i was stuck behind. This is nicely evidenced on Vimeo starting at 9:54. The top three can also be seen running away in this video as several riders wuss out on the drop in front of me.

    Going into the last lap I heard the announcer say I was in 5th, so I put the hammer down for the last lap. About 3/4 of the way round I could see the rider in fourth place ahead of me. I caught and passed him on the last steep climb, he was unable to respond to the pace I was setting. So I finished in fourth place, definitely an improvement on the last round.

    Results can be seen over at Timelaps.

  • Drumlanrig Tearfund Challenge 2009

    The Drumlanrig Tearfund Challenge is a road sportive based at the wonderful Drumlanrig Castle. The entry is very limited, and unlike other sportives, you don’t pay to enter, you make a donation to Tearfund. With an entry of 300 the event feels very low key and friendly, and everyone seemed to be keen to chat and swap stories before, during and after.

    A unique feature of this sportive is the un-timed rest-stop in the middle. Here you can eat cakes to your hearts content, or at least until the final departure time, without this affecting your overall time.

    As per Team Macchiato directives, I was there with Vo, resplendent in our matching (well, not so much these days) Bianchis. I was also wearing an Innerleithen MTB Racing top, just so people would know what to expect when we came to the climbs.

    The first half was expected to be the hardest, with a big climb up to the UK’s highest village, Wanlockhead, followed by a section back into a headwind. Up the climb I left the group Vo and I had started with behind, and chatted to the Team Colnago team manager, who was wearing a peaked helmet in an effort to show off his roots. Up over the top of the climb I was on my own down the first descent to Elvanfoot. On this descent I was caught by Vo who unfortunately punctured as soon as we turned into the headwind.

    The headwind was a bit of a nightmare for me, as I couldn’t see any groups coming up behind, and all the small fragmented groups of riders I caught up with were going slower than me, so much so they couldn’t hold my wheel when I went to the front. After another descent a fast group came past, mostly made up of Ayrodynamic members. I latched onto this group and we chainganged it back to the castle. I was surprised by some of the big guys missing turns at the front, but maybe they were saving themselves for the second half. Vo appeared about 10 minutes later, having been lucky enough to meet a fast group just as he finished fixing his puncture.

    After the cake stop, Vo and I set off again. Two of the riders in our group were riding rather pimped-out Storck bikes, carbon spokes, the works. Both guys evidently were aware of the fragility of their steeds, as rough sections were approached at a far slower pace than what I would call normal. At one cattle grid I almost became a human suppository, as both riders on the front failed to warn those behind, and braked rather suddenly and excessively. On the first climb I was glad to leave them behind, with the sound of crumpling carbon and swearing as poor gear adjustment on one of said bikes left the rider to walk back with broken spokes, mech hanger and seatstay.

    The second half was a different beast to the first. Wind played little part, and steep climbs (one was 25% for some considerable distance, and resulted in lots of people walking) were followed by rough gravelly descents. Just my cup of tea. I was on my own for the first twenty miles or so, but in the second half I joined up with a lad of similar age and build to myself who superbly fast on the flats. We worked together for the remaining twenty miles, taking turns on the front on the flatter sections, and me driving the pace on the front up the climbs. Having someone to work with made the pain of pushing so hard a lot easier.

    I rolled in at four hours and eighteen minutes, I thought comfortably within the ‘gold standard’ time. Unfortunately the event was slightly shorter than last week, and the correction the the times was not made until after the event. I missed out by a minute, but that’s always something to go for next year.

    Without a doubt the Tearfund Challenge is an awesome event, and to make it even better you receive a ‘virtual goody bag’ at the end, being a record of all the things your donation will provide for those in need. I was most glad to see that they will be receiving t-shirts with the image of Che Guevara as a badger, definitely something everyone needs. I wonder how early I can enter next year…