Hit a wall?? step away from your keyboard written by: Lee Richmond posted on: 14 May 2010
I know a lot of people are already thinking what the hell is this man talking about?
Well recently while working on some tests for an application I've been working on, I found that I had hit a brick wall, in terms of I had to write some tests to ensure that some existing code worked as we intended however none of the tests I had written seemed to test this in the right way, after a while of re-writing said tests and re-writing them again, I finally decided to leave it and move onto something else. In doing this it gave my brain a break from thinking about the problem in hand and as a result when I came back to these tests I realised where I was going wrong and so write the tests which worked and not only that helped me to re-factor the code I was testing.
So my snippet of advice for anyone in a similar situation, if you feel like you're banging your head against a brick wall, don't get bogged down by the problem and let it impede your progress, take a break from it and come back to the problem later.
Life aint such a drag... written by: Lee Richmond posted on: 16 April 2010
This is something I have been meaning to blog about for a while now. In March I took a trip with some friends to Santa Pod Raceway in Northampton for an RWYB (Run What You Brung) day, put simply this is where you drive your car down there spend the day drag racing in your own car (or bike, there were tons of bikers there too) and then drive said vehicle home again. I already know what a lot of people reading this will be thinking "Oh dear! another boy racer" and I would like to dispell this myth, not everyone who drives a fast car is a boy racer. As anyone who has already had a look around my site knows I am a big petrol head I've loved cars for as long as I can remember and for me this day was more about setting a benchmark with my car still as standard as it possibly could be, with the intention of making modifications to it afterwards to see how much of an improvement I can make, so anyway back to what I was originally saying...
The day started at 6am when me and my girlfriend met up with some of our friends to convoy down, the drive down was pretty uneventful. Once we arrived at the track we paid our entry fee and found somewhere near the track to park up, we were eventually joined by other members of the MR2 owners club. It wasn't long before we were watching others taking their first runs of the day down the track, there were all kinds of vehicles in attendance ranging from standard road going vehicles to specially modified drag vehicles (including a huge Dodge pickup which blitzed the 1/4 mile in 12 seconds!)
After watching for a while (and getting some breakfast) we decided it was time to take the plunge, so we went to the signing on booth to give our details and pay our sign on fee, then we returned to our cars to remove any unnecessary weight this included spare wheels, jacks, CD's jackets, basically anything that would add even the slightest bit of weight to the car and finally giving our engines a quick once over just ot make sure everything was okay. Once we had finished doing this there was only one thing left to do join the queues, the drag strip has two lanes so as you can imagine ther were two queues, one for each lane, however as there were only three of us from my group of friends that were racing, so sadly my first run I was on my own. While sitting in the queue I could feel the nerves starting to take hold any slight noise from any of the other cars I was worrying it was mine, the closer I got to being the next down the strip the more the tension mounted,until finally it was my turn. Will I stall on the start line? Will I get a good time? What if my car suddenly dies in a cloud of smoke half way down the track? all of these questions running through my head but I couldnt back out now I'd pad my dues and was on the line ready to go! So I sat with baited breathe with one foot on the accelerator holding the rev's at 3,500 rpm, the other holding the clutch ready to release, 1st gear selected and steering was held straight to aid a decent take off, as I sat waiting for the green light I remember thinking "this is it!" suddenly the green light lit and I was off and before I knew it I was passing the finish line adrenaline surging through every inch of my body. This is where you are all probably thinking "but you didn't race anyone so what was the point?" well contrary to popular belief while it is fun to have someone to go up against to spur you on and even to see if you can beat them, drag racing isn't about beating the other person its about setting a time and doing your best to improve on that time, there are two times that are tracked the first is your response time (this is the time it takes for you to repsond to the green light and leave the start line) the other is the length of time it takes foryou to finish the run, my first response time of the day was 1.671 secs and my finish time was 18.9 seconds and during the course of thee day these times fluctuated around the 18 mark while my response time reduced dramatically until my second to last run of the day where I finished the run in 17.7 secs with a response time of 0.347 secs.
All in all it was a brilliant day out and I would urge anyone who is even remotely interested in cars or motorsport to give it a try at least once, I personally will be doing it again as I now have my benchmark on which to improve and here are some photos from the day taken by Pete Thronton:



Nokia ... the drama continues written by: Lee Richmond posted on: 15 April 2010
If you read my last post about the troubles I was having with the atrocity that is the Nokia 5800 then you will probably know whats coming next if not then you had better read this.
Since my last post I have spoken at length to my service provider who have sent me a replacement phone (the exact same model) at the cost of £15 to me for my handset cover. It only took a couple of weeks before problems started to arise in handset no.2. once again due to the cheap quality of the screen it is damned near impossible to do anything right the first time even using the stylus makes sending the simplest or typing a phone number a pain staking task, to the point where whilst composing a text message recently it took 3 attempts to type the word "about" as for some reason unknown to me when ever I typed this word it came up with "fant?" instead, now I'm no expert but seeing as the latter doesn't even begin with the letter A and as anyone who has seen an alpha numeric keypad before knows A and F are not even on the same key so the only way this would be possible would be if either I had monumentally big thumbs, the stylus was in fact a scaffolding pole, or the keys are doing a merry dance around the keypad.
Another issue I have with this phone is how slow and unresponsive the touch screen is when navigating the menus, it sometimes takes 20 to 30 seconds before the application or function you have pressed actually opens. As you can probably tell all my problems with this phone so far are to do with the touchscreen and the software and this one is no exception once again when typing a name or number keys occasionally stick meaning you end up with several of the same character in the message or phone number you are trying to type, now I know this is a hazard on a phone with a normal push button keypad where you push a key and it gets stuck meaning you have to try and free it before you can carry on but on a touchscreen too??? surely this is something that should have been eradicated with the invention of the touchscreen?
Despite having the handset replaced by my service provider, this has not and will not solve the issue of the battery becoming lose and moving around meaning the phone still turns itself off without warning. I also have so many issues with the OS on this phone, as I mentioned last time the communities app still bombards your image gallery with images it has decided to cache (including images from pages you haven't even visited, almost as though its trawling Facebook and caching images on the off chance you might go to that page at some point in your life), well I have since realised this is just the tip of the iceberg, when deleting apps from the phone they don't actually delete everything to do with them, instead you are left with various cache and config files and directories scattered across both the built in phone memory and the memory card, and as far as I can see there are no built in cleanup utilities to help clear this minefield of old unnecessary data.
Considering Nokia have labelled this handset a "smart phone" I have to say that I quite honestly cannot see anything smart about it. If you would like to actually use the phone for its intended purpose then do yourself a favour, DON'T opt for the Nokia 5800 as you will more than likely spend more time shouting at it and ripping your hair out than actually using it, I personally will be doing my best to steer clear of any Nokia devices from now on.
*EDIT* - since writing this article I have spoken to my service provider who asked me to perform a hard reset of the handset, this has not solved any of the issues mentioned in either of my blog posts.
Music the food of productivity (at least for me anyway) written by: Lee Richmond posted on: 27 March 2010
As you may have seen a few months ago I wrote and article on one of my favourite applications Spotify well I think its about time I start sharing some of the playlists I've created.
The first one is my most recent and I decided to post this one before any other for the simple fact that when I listen to it I actually feel inspired to work, so here it is simply titled Metaaaaaaaaaaaal!
enjoy!
How to: getting a rails 3 beta project set up with Rspec and Cucumber written by: Lee Richmond posted on: 27 March 2010
How to: get a rails 3 beta project set up with Rspec and Cucumberokay so I recently started my first Rails 3 project I knew there was probably going to be one or two issues getting up and running and one of the main issues I found was getting Rspec and Cucumber to play ball with rails 3, but never fear here is how I got everything working.
Step 1: Installing Rails 3 and setting up a new app
I'm not going to go into detail on this step purely because I think that if you can't improve on something then don't try, so for this step I used Ryan Bates' Railscasts on getting started with RVM and Rails 3 Beta which can be found here to get me up and running, For reference I am still using Ruby 1.8.7 for this tutorial and the app I'm building I have called "test_app".
Step 2: Setting up your test environment in your Gemfile
Once I'd done a bit of reading this was actually quite simple, all you need to do as Rails 3 uses bundler as standard is open the Gemfile for your app in TextMate if you are using Mac OSX or any other text editor of your choice and add the following:
1 2 3 4 5 6 7 8 9 10 11 |
group :test do gem "rspec" gem "rspec-rails", ">= 2.0.0.beta.1" gem "faker" gem "machinist" gem "sqlite3-ruby", :require => "sqlite3" gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git' gem 'database_cleaner', :git => 'git://github.com/bmabey/database_cleaner.git' gem 'cucumber-rails', :git => 'git://github.com/aslakhellesoy/cucumber-rails.git' end |
Step 3: its bundling time!
In your terminal window first cd into your application in my case this is:
1 2 |
cd code/test_app |
1 2 3 4 |
bundle install rails g rspec:install rails g cucumber:skeleton --rspec --capybara |
Now if we go and try writing some Cucumber Stories/features and try running them we can see that they work, if you are new to Cucumber I found that once again Ryan Bates' Railscasts on the subject were extremely helpful:
Episode 155: Beginning with Cucumber
Episode 159: More on Cucumber
I hope this blog post helps anyone out there trying to get set up with Cucumber and Rspec in Rails 3.



