Author Archives: Chris

Trying a month of 8hrs sleep a night

For more than the last 12 months, I've got into a habit of rarely getting more than 6 hours sleep a night, except on the occasional weekend. I've done this to try to maximise the amount of waking hours available to me to as get things done as I want, but when I look at the [...]
Posted in Journal | 3 Comments

Virtual servers and false alarms

When you start looking after virtual machines instead of buying shared hosting, you very quickly realise how important RAM is to making a server run properly. I’m using a machine with a fairly heft chunk of free memory, but recently when shelling into the box to check memory usage I’ve have some pretty scary stats that [...]
Posted in Journal | 1 Comment

Setting environments with Rails: how Rake and Capistrano differ

Annoyingly, Capistrano and Rake do similar jobs, and have similar syntax, but have different ways of declaring the environment they should be working in. Her

Posted in Coding | 1 Comment

Setting up wordpress to update itself

Wordpress’s auto update feature is incredibly handy. However, not every webhost automatically has accounts setup to allow for this, and if click the promising looking auto-upgrade icon, you’ll often be face with this screen here: You get this screen when the folder containing wordpress belongs to the user, instead of the apache daemon; this is normally either [...]
Posted in Coding | Tagged , | 2 Comments

Fixing old gits

How to stop git whining too much when you commit to an old repo.

Posted in Coding | Leave a comment

Money is fertilizer, companies are soil

I spent a fair chunk of yesterday working on a redesign of the new ORG website, with Felix, Chris, Mike, Harry, and after we had finished for the talking with Felix about the recession and worthwhile work. We both have friends who work in the financial sector, we both get nerdily angry about bad design, [...]
Posted in Journal | Tagged | 1 Comment

Looking for a green host – concluding the search

I think I can finally stop searching for a good, green virtual private hosting company in the UK.

Posted in Journal | 12 Comments

On the new Star Trek movie

I chuffing loved it. Clever, funny, well paced, and brilliantly shot. If you take the film as a typical summer blockbuster it delivers; it's immensely entertaining, the cast unformily photogenic, and the special effects are thrilling. If you have any knowledge of the previous series though, there's a whole extra layer of in-jokes and references to the [...]
Posted in Journal | 2 Comments

Frustrating and Cryptic Ruby Idioms (#1 of a series)

I keep coming across these FACRI's (Frustrating and Cryptic Ruby Idioms) in my work, so I'm jotting them here in the hope that I'll remember them better in future. Ruby idioms Ruby is a wonderful, if somewhat slow and memory hungry language, with an incredibly flexible and expressive syntax. However this flexibility leads to the creation of [...]
Posted in Journal | Tagged , , , | 1 Comment

How to set up a debugger with mod_rails/Passenger

Anyone who's worked on the web will know easy it is to end up constantly refreshing pages to see if the content delivered from say, a database driven site is the indeed content you want to show.

This is one approach, and while simple to understand, there are often other approaches available to this.

One example is using the ruby debugger, and break points in your code to inspect and control what is happening at each step, to see what variables are available.

This, combined with the more traditional tools for debugging a view using @object.inspect or debug(@object) methods make fixing bugs less of a pain.

As many of us transition from using Mongrel as our server to Passenger, we find ourselves missing this useful tool. This post outlines one way to setup a debugger for Passenger.

Posted in Journal | Leave a comment