Got the O2 modifiers

Cool! These are Evoluzione's O2 modifiers for the BMW K1200R. The new generation K-engine is notoriously rough on fuelling in the low rpms, this makes it quite difficult to take slow corners smoothly (Think Wehrseifen, Adenauer Forst, Roundabouts, etc). This piece me kit tricks the computer to richen up the fuelling and thus smoothens the bike up. Can't wait to get it onto the bike! :)


First real bike ride this "summer".

As it's now summer time i think we can call today's bike ride the first one for this summer. The weather was simply too nice to spend the whole day indoors. The ride wasn't long, just up to Silverstone (Poor Caz; her bike doesn't take kindly to those incredibly bumpy roads) to check my new suspension. The verdict on the suspension is that they're way too hard. Luckily I can adjust them now (which is the whole point of fully adjustable suspension). In this short ride I backed off 6 clicks on the high-speed compression damping, and 4 clicks on the low speed compression damping; both front and rear. It's getting there. I'm just a bit worried that the bike will star wallowing in the corners and I can't figure out how to dial that out. I guess I can always return to standard set-up and start over.
Either way, it was a lovely ride, wish it would have lasted longer.


Using Helpers in Models in Rails

This one caught me out a bit, so I'm typing this in here in the hope that nobody else would be caught in the same bit of stupidity.
I had a little method in my application_helper.rb file, it only performed a simple calculation. As an example we could use a method such as:
def addone(value)
value + 1

I use this in my views where I need it, but I also wanted to use this same calculation. I started out the right way and I went into the Rails console to try something like:
onemore = addone(10)
but it complained that the method was missing. My mistake was that I tried to use the method as a function without any context. So, here's what you do.
You move your method from application_helper.rb to a file in lib/. In my example I'd create a file like:
module SimpleCalculationHelper
def addone(value)
value + 1

name the file simple_calculation_helper.rb and put it in lib/. In my application_helper.rb file I add include SimpleCalculationHelper just after the module declaration (typically after line 2). Then in my model where I want to use the method I also add a include SimpleCalculationHelper after the class declaration (typically after line 3).
I can now create a method in my helper that uses addone(), but I can't open console and use addone() - which was my mistake. You can do something like this in your model:
def next_id

Or something.
Remember to fully restart your web server and your console to make sure there's no evil monkeys in the closets.
It really was as easy as that. Nice and D.R.Y.

PS, only use this if your helpers are non-visual. I.e no HTML or anything signifying style or layout. Just calculations and such.


Weirdest Ring trip ever.

This was the weirdest trip to the Nürburgring, ever. Or at least I hope it will be the weirdest one ever. It's been wet, snowy and salty. When the sun has been out, it's been lovely. When it's been snowing and windy it's been bitingly miserable. The journey home was rocked by the Espace throwing up some engine management errors and refusing to start. I need to find the electrical seep and buy a new battery (again) for it.
Other than the weather and the fact that we did a big fat zero laps, it's been great. The people has been wonderful (as always). We went for a walk to Steilstrecke, in the snow! :) Quite coool.
Back home, all well, work now.


A lap in the M3 CSL

So it finally happened. I've known Steve for a long time, but it's never worked so that I could have had a lap in his BMW M3 CSL. There's been offers, and I've asked, but something has always come in between. But today it happened. And I can tell you that this car is wonderful, from the sound to the ride via the speed. As a biker it's a car where I even have to start paying a bit of attention instead of looking at the scenery. :)
Huge thanks to Steve for letting me passenger in the car. I'm attaching a shot of the speedo at Schwedenkreutz. I don't know if it was before or after he braked, because it was quite bumpy. Hhehehehe!
Now off for our final Easter evening here in Nürburg. See ya at Pistenklause?!


Northloop Easter Dinner

You know that it will only in downhill from here! We're not even at the main course yet, and Ed is already in that shape!!


More snow II

Yes, yet more snow... and quite a lot of it. There were people stranded on the track. It was so bad that they had to go back down the track to get off it. We've been taking it easy and we also headed up to Adenauer Forst only to notice that the fences they've put up there are now incredibly obscure and spectating is going to be very difficult, not to mention the problems with taking pictures. Sad, sad... Chilling now and then food and drinks.

More snow.

We've been toying with the idea of renting a car, as bike riding seems off the chart, but today I can't even see that happening. Sleep!



Max gives good head to his wife. Good lad. :)

Yes, just snow... no riding

This day has been very relaxing as we've not been out on the bikes on the 'Ring at all. Reason being the weather. It's snowed several times during the day and bikes haven't been allowed on track, and when they did get on track, it was only Kim and Tony who went out. Good lads!

Here's a pic of how close I got to going out! (Thanks Matt!)


Greetings from a snowy Nurburg! The weather is really awesome, until you remember that we're here to ride bikes, fast! :-)


Made it to Folkestone!

This has been by far the most stressful journey, ever! Just leaving the Espace sprung a diesel leak! A hope had come off. More about that later. I need to destress and get going.

We're off!

Bang on the dot, it's 8am and we're off.


Alles Klar 2, well almost

As Tony already posted; he's done and ready for the Easter trip to Nürburg for the Season Start. We are almost ready over here too. And we're almost ready in the good sense that we're on or ahead of schedule. The bikes are tested and ready. We'll need to strip them off mirrors, screens and exhaust to get them into the car, but that's as scheduled. We'll need to do the packing etc as usual tonight.
However... there's a bigger problem.... And it looks like this:
Ouch... it's 24 hours till departure from home.. expected arrival about 8 hours later. I've been saying this to everybody I've spoken with; I hope, for my liver's sake that it'll be dry!
Either way; Alles Gut!


They are here!

I can't believe it. It's now 45 days since I ordered these. It's been a very long and exhausting journey. What are they? More about that later...


Forcing Row Version Migrations to add the fields

A quick note... The Red Hill on Rails plug-ins are invaluable if you're using a non-dinky-toy database with Ruby on Rails. One of the plug-ins that I use is the Row Version Migrations one. It adds these fields to all tables by default:
 :created_at,   :datetime,  :null
:updated_at, :datetime, :null
:lock_version, :integer, :null
However, one thing had changed somewhere on the way. I had a many-to-many table declaration like such;
create_table(:manufacturers_suppliers, :id => false) do |t|
t.column :manufacturer_id, :integer, :null => false
t.column :supplier_id, :integer, :null => false

What I didn't know was a) if you don't have an id (:id => false), the plug-in doesn't create the fields, but b) just as you can disable the fields with :row_version => false, you can also "force" enable them with :row_version => true. Hence, changing to:
create_table(:manufacturers_suppliers, :id => false, :row_version => true) do |t|
t.column :manufacturer_id, :integer, :null => false
t.column :supplier_id, :integer, :null => false

Made the fields appear and it solved my problem. Sweet!

undefined method `current' for Engines:Module - fixed!

This post is a bit of a Part II to my previous undefined method `last' for {}:Hash-post. I was following Nathaniel's Gotcha post, but at some point I apparently fell off the wagon.
I got this error:
vendor/plugins/datetime_toolbocks/init.rb:25:in `evaluate_init_rb': undefined method `current' for Engines:Module (NoMethodError)
And I just could not figure out what the problem was, until today, when I went back and re-re-re-read Nathaniel's post. I spotted this paragraph:
"Engines.current.version no longer exists, so if you want that sort of functionality to see what version the engine is..."
I had read it many times before, but it just didn't make any sense to me (as a non-seasoned Ruby/Rails developer). I had no need "for that sort of functionality" in my head. But the "Engines.current.version" caught my eye, as that was the line that was giving me a kick [] in my... either way. It's now very clear. In vendor/plugins/datetime_toolbocks/lib/datetime_toolbocks.rb somewhere within the DatetimeToolbocks module, add these two lines:
mattr_accessor :version
self.version = false

Then in vendor/plugins/datetime_toolbocks/init.rb replace
Engines.current.version = Proc.new { File.open(File.join(RAILS_ROOT, 'vendor', 'plugins', 'datetime_toolbocks', 'VERSION'), 'r').readlines[0] }
DatetimeToolbocks.version = Proc.new { File.open(File.join(RAILS_ROOT, 'vendor', 'plugins', 'datetime_toolbawks', 'VERSION')
, 'r').readlines[0] }

Crystal clear!
Now you should be able to run something like:
user@box $ ./script/runner 'puts Rails::VERSION::STRING'
user@box $

without getting any errors. Tickety-boo! I hope this clarifies things for someone out there.

What puzzles me a bit is that these changes are made in the DatetimeToolbocks, which is built by Nathaniel.... wouldn't it have been smarter to update DatetimeToolbocks...? I'm sure that'll happen, and I'm sure there's a valid reason for things being the way they are (there always is). And I really don't want to come across as some ungrateful pr*ck; I do like DatetimeToolbocks and I am grateful for Nathaniel's work (and underlying Date widget). :)


undefined method `last' for {}:Hash - fixed!

Right... I've now spent several days carefully trying to get rid of this error message:
undefined method `last' for {}:Hash
when using Rake in my Rails application. It seems like it's quite a common problem, and some info out there even suggest rewriting some of the code. I tried this, but it didn't work. In the process of finding all this out, I also found out that despite Rails 2 was installed, I was still huffing-and-puffing on with the steamy 1.2.x version. Well, that was easy to solve once my rearmost memory banks had been accessed thanks to a few Google-rounds; in your environment.rb change
RAILS_GEM_VERSION = '1.2.4' unless defined? RAILS_GEM_VERSION
RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
and you'll be using your new electric Rails.
Then, the next problem I seemed to have was that Rake still refused to run, and it all lead me to figuring out that I've got an old version of the Rails Engines. I just could not get my head around how to upgrade from 1.2.2 to 2.0.0 of the engines.
I tried this:
user@box: $ ./script/plugin install http://svn.rails-engines.org/plugins/engines/
already installed: engines (http://svn.rails-engines.org/plugins/engines/). pass --force to reinstall

To no avail. Andrew was pointing out that "I should use --force" but I'm no Jedi, so I don't tend to use the --force unless I'm really in a pickle. As this was on my staging machine, after a good while, I thought that I should get my funny boots and the light saber and use the --force. Said and done...
user@box: $ ./script/plugin install --force http://svn.rails-engines.org/engines/trunk
user@box: $ rake
(in /var/www-virtual/myapp/releases/20080307144118)
rake aborted!
Could not locate the following plugins: engines and *

Success! The Hash-error is gone, now all I have to do is to configure my system as explained by Nathaniel Brown (whose Date Time widget I'm also using, thanks!) in Engines 2.0 and Rails 2.0 Upgrade Gotchas.
Checking the engines CHANGELOG file, confirms that I have v.2.0.0. Sweet!
But right now I need lunch.

PS, no I don't have a light saber! I might have a computer in my garage, but I'm not that sad.


Chad loves the iPhone!

Been at the LRUG meeting and now we're in some sort of gadget competition. Chad loves the iPhone!

Weekend toiling; brake lines and battery relocation

Been busy all weekend (and all morning, hence me not posting this earlier) working on the bike (not this morning). I started fitting the brake-lines from Earl's on Saturday, and unfortunately that didn't go without problems. There's a few tweaks we want to do before I'm happy with the brakes, not to mention that one banjo-connector is leaking, probably due to that we had to twist it. It was also a b**ch to bleed the brakes, especially the rear one *sigh*.
After I got the brakes bled on Sunday I proceeded to make a battery holder for where the ABS system normally sits on these bikes. Relocating the battery from it's default position; between the filler cap and the handlebars, to under the petrol tank gives a bit better weight distribution, but more importantly, room for gadgets where the battery used to be. Phil was kind enough to manufacture the cables for the battery relocation. Thanks!
You can see quite a few pics of the battery relocation in my Picasa gallery; K1200R Battery Holder. I'll attach one here just to tease you.


Hanoi Rocks Live in London!!

We've been to see Hanoi Rocks Live at the Astoria 2 in London. What a gig! What energy! The set was laced with old and new songs, and oh my did thaw all just sound fantastic! The energy is absolutely stunning!! I was also very glad to see that the Astoria 2 is quite an intimate venue; you get to see and feel the power of the band. Wonderful! Sadly I didn't manage to get hold of Conny before the gig so I was unable to say Hi. Either way; fantastic concert!!!


Interesting day; Earl's at Silverstone and Nitron in Witney

It's been an interesting day and I must say that I really appreciate being able to do things like this. Today has revolved over our bikes, and by "our" I mean mine and Phil's, and by "bikes" I mean our BMW K1200R bikes. Both Phil and I are performance oriented (with a bit of vanity thrown in), so in the search of K1200R performance we've visited two companies today. First we visited Earl's Performance Products at Silverstone. The reason was to get new, better brake lines. The BMW solution to our bikes brakes is a bit of a compromise, partially because the bike can be eqiupped with an ABS system. Our front brakes are pretty normal, but they've got an "upside down" bridge at the front fork which we didn't like. The rear is a bit weirder as there's a brake pipe from the master cylinder going to a connection block at the inside of the frame, then there's a hose going from there to the rear caliper. We're guessing that this is because the ABS system is at this spot. We wanted rid of this funny set-up.
I'm delighted to say that Earl's is a company that really seem to care about what they're doing. We put my bike in my car and drove up there. Greeted by friendly Earl's staff we got the bike measured, tested, and worked over. Very impressive! We ended up leaving with a kit of brake hoses each and if you're a K1200[R/S/R Sport and possibly GT] owner without ABS, you should be able to order this set-up from Earl's very soon. I've not fitted my kit yet, but when I do, I'll let you know. We were very delighted with the service of Earl's. Top notch!

We then headed over to Witney to Nitron. Nitron is a top notch manufacturer of racing suspension. My problem with my bike's suspension is that I have the ESA (Electronic Suspension Adjustment) shocks, and they are, apart from the electronic variant, totally non-adjustable. And to top that off, the only thing the shocks adjust at the front is the rebound damping. My main problem is that the compression damping is too harsh. Till today, no manufacturer is willing to build shocks for the DuoLever front suspension that are fully adjustable. Not even the "almighty" Öhlins; their shocks don't even do rebound damping on the K1200R and K1200S version. I've not been very impressed.
Earlier this week I submitted a web form enquiry to Nitron, you know those enquires that never ever, ever, ever get answers, and if you get an answer you get a duff one that just makes you want to get the staple gun and staple yourself in the leg a bit to make the pain from the enquiry reply go away.
Not with Nitron, I got straight through - within minutes - and after a few emails, I was invited to the factory. We arranged to meet on the same day as the Earl's meeting as the bike was already in the car. When we arrived we had a chat, and we got offered "to take some bits with us to try out", but we had a better suggestion; We can drop the shocks right here and now. This resulted in us trying on shocks for both the front and the rear. To our delight the front shock fitted straight away, and the remote reservoir's hose was not the slightest of a problem. Perfect! Guy Evans, the MD of Nitron suggested that we'd try the hydraulic preload adjuster too, "as we were there and the bike's stripped". Scott, who was helping us out did a fantastic job and tested our OEM shocks, brought us different shock variations to try out and so forth. Again, very impressed!
The purpose of our visit was to see if one could mount a fully adjustable shock onto the K1200 series bike's front end (rear is no problem), and thanks to the guys at Nitron we now know that the answer is "Yes". Naturally this isn't anything that you can order just yet, but hopefully in the future you might. At least there's hope from now on!

All this has given us a bit of faith in the enterprising people of UK; these people really do seem to care about their business, and despite us being "nobodies" (we're not, for example, Honda MotoGP team or Subaru WRC team) these guys treated us with respect and we got answers to our questions and we came away with, in the Earl's case perfect brake lines, in the Nitron case a firm reassurance that there are people out there willing to help us improve our bikes and our riding experience.

Hats off, and thanks! We've had a great day!


Listening to Eiji Taguchi

We're at Coventry uni at a talk about F1 and racing engines. Very interesting!!
Yes, it was very interesting, especially as Eiji Taguchi (of Ricardo Plc) is such an enthusiast about the subject. You can just see how he loves his engines. Eiji told us he's been in the business since 1961 and has worked with a high spread of engines, cars and drivers, including the almighty Senna (and Berger). Either way, Eiji presented us with history, trends etc of engine development, we were showered with graphs (which I love). I'm not an engineer, so most of the technical backgrounds I will never ever get, but I do understand the results of it, and to me it was fascinating. :)

Especially as we got to know the reasons behind why this Moto GP piston and con rod looks and is designed just the way it is. Feeling it makes one realise how light it is and also being able to look at it close up, seeing where they've added strength and where they've shaved off weight.
I also had the chance to play with a few other bits of engine, but didn't get my camera out for all of them.

Eiji concluded with these two slides; His personal opinions... ...followed by his final message for the future:

(The background for this message is that some areas in production engines are far more advanced than a racing engine; for example fuel economy)
Thanks to I MECH E Coventry Automobile Division Young Members Panel for arranging this.
We had a great time.

Our Ring Season 2007 book has arrived.

Not too long ago Caz and I sat down at my computer and collected a bunch of pictures from last season. Using iPhoto we assembled a "book" and clicked a few buttons and it was ordered. The two copies arrived today and they look good!! The books are quite expensive, but the quality is good. I had expected them to be a bit "heavier" with glossier paper etc, but the quality definitely is good.
It's nice to have the 2007 season "archived" now. :)


Monday morning

I don't hate Mondays as some people seem to do, but I do like a good start to the working week. Usually on Mondays I get woken up by the bin lorries coming to collect our rubbish, but not to day, and then usually, in England, you get this grey sky when you wake up, but not today.
Today the sun was shining, Patch was playing around, it all seemed fine. I got downstairs, put some water in the Tassimo coffee machine, popped a T-disc in and waited for that wonderful coffee aroma.... Aaaah... not bad at all... Then I put milk in the coffee, and the milk was bad... I now had a cup of coffee with bad milk in it. Aaaargh!! I really hate this; the fist cup of coffee kind of sets the standard of the day. This is why we have spent so much money on this coffee machine; to get good coffee. And now this was all destroyed by this bad milk.
In microseconds before I whisked the mug to the sink to wash it out, I had time to turn my all good thoughts into all negative... bad, bad stuff...
Anyway, trying not to hang myself up too much about this I've been trying to get into a more positive vibe, and I think it was working until the neighbourhood kids were out kicking that bl**dy football again (balls are round by the way, so figure out which 'football' for yourself). Anyway (No. 2), they've now gone, and I'm about to make another cup of coffee... I'm hoping this one will be perfect from first try.
And I can't believe I'm "blogging" about my Monday morning escapades... Pathetic! Either way; I'm trying these positive waves, so don't make me lapse into those dark thoughts. Thank you, drive through!