Job's evil dream
Job's evil dream

At some point during the last few hours of riffling through CVs, my initial scorn for people who have obviously just applied for any old job they could turned to sympathy…..or maybe compassion….I don’t know. The role my organisation is hiring for is a developer role, with specific requirements for a Microsoft skill set. It is pretty clear from a lot of the CVs that we have received though, that people either do not understand what the role is, or they are just applying to every.single.job that they come across. Getting through a bunch of CVs is tough….and some very smart people have written about the process time and time again.

We had a few jokes initially, as you do, about the lawyer and accountant who submitted their applications…..but then suddenly, I was on page 4 of a very well written resume when my heart just melted. Something in the wording just made me sad. Sad that someone so completely unqualified for the job submitted such a good CV.

Is it the economic climate? Is it pure desperation? Is it simply a desire to move into a new career that prompts someone who does not code to apply? I have no idea. But sometimes I wish I could bring people in for an interview, just to chat. And if, you know, they fit, train them up. Because I’m pretty sure anyone can code, at least I’m pretty sure this one can.

Install Ruby on Rails on Windows with ‘gem’ behind a corporate proxy

Sometimes on a corporate network, you’ll be stuck behind a proxy and working away on a Windows box. Trying to install or update gems like Ruby on Rails with commands like

gem install rails

can give you strange errors. You’ll see various things at various points of bashing your head against the wall. Things like

ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
       bad response Forbidden 403 (


ERROR: Could not find a valid gem 'rails' () = 0) in any repository
ERROR: While exectung gem ... (Gem::RemoteFetcher::FetchError)
       bad response Forbidden 403 (

O hell. How do I fix this? You think.

Personally, I tried calling the inhouse IT department to get whatever was being blocked unblocked (I know very little about networking so don’t ask me specifics here). They couldn’t really help me out for some reason. So instead I grabbed a copy of ntlmaps which basically allows you to create and run a proxy on your local machine that will grab all requests and re-package them as if they were coming from IE, thus allowing the communication to go ahead.

ntlmaps is a neat little python utility so you’ll need to get that on your ‘puter. Then pop the ntlmaps into a nice easy to find directory and read the Install.txt and readme.txt to get a little background and basic info. I went ahead and changed my server.cfg file filling in the following bits:


Now I’ve got a nice little local proxy ready to run – give it the old runserver.bat at the command line – and wait for it to fire up. You should get something like

NTLM authorization Proxy Server v...blahblahblah
Now listening at COMPUTERNAME on port 5865

obviously, COMPUTERNAME is going to be your computer name.
Now, fire up a new command shell and type in


You’ll get no response from that command but don’t worry. If you want to verify the setting of the HTTP_PROXY variable, simply type


At last, you can try updating the gem again:

gem update rails

And you should be good to go

Android and Eclipse – Your project contains error(s), please fix them before running your application.

New to Eclipse?
New to Android?
If you answered yes to any of the above questions then this is a little annoyance you’re going to get now and them. Pretty simple to fix really, just use the “Problems” window which is docked at the bottom by default, right mouse button on the Error and choose Delete from the context menu.

Warning “may not respond to” in Objective-C

comfy chair
put him in the comfy chair

If you are new to Objective-C , this one will get you pretty much as soon as you veer off the beaten track of sample code or the ever present temptation of “cut’n’paste” that we all fall prey to when getting some simple apps going in a new environment. You’ll probably bang your head against your snazzy bluetooth connected keyboard for a while until you remember that no-one expects the Spanish Inquisition and you’ve been spoiled for too long sitting in the comfy chair-like coding environments of your scripting languages, and that in fact, in C, you need to declare your methods/functions before you call them. Damn!

So, the easiest way to get rid of the warning to move the method being called above the method doing the calling.

Alternatively, you can essentially declare private methods at the top of your .m file

@interface MainViewController ()
- (void) NoMoreWarnings;

The application is the framework

I find it interesting that some web applications have matured to the point that they basically become frameworks in and of themselves. Take WordPress as an example. Originally written as a blogging tool, it has evolved into a framework of its own through its various hooks and actions that, if you were feeling adventurous, allow you to do pretty much whatever you want, from creating new tables to creating entirely new functionality.

Playing with a system that’s evolved into a framework is very different to playing with a system that was written as a framework first and foremost. I’ve been developing a plugin for vanillaforums to allow classified listings on a forum site, and it’s interesting to look at the architecture. On some levels, vanillaforums feels over-complicated for just a forum. But then you look a bit deeper and find a whole MVC framework coded up, with the forum module essentially just an application written on top of the framework. I do wonder sometimes why someone would go to the trouble of re-inventing their own framework when there are so many available ones out there. But I can, at the same time appreciate the desire to create a framework that follows your own opinions rather than falling in line with someone else’s.

I wonder at what point we could consider an application to be a framework? Because any well designed system is or should be easy to extend. I think what makes an application into a framework is documentation. Good documentation that allows moderately skilled developers to jump in and be productive immediately turns a simple app into a framework in it’s own right. That and a .org domain name 🙂

Vanilla Forums plugins – escaping SQL strings on Setup

chemical element for vanilla

Vanilla Forums is basically built upon a customised MVC framework called Garden. It makes developing plugins for Vanilla fairly neat, but documentation is somewhat thin on the ground for the actual Garden framework. When working on the Setup() function of my plugin, I was doing some initial data insert into a new table I was creating. Since I was inserting a fair amount of data, I was populating an array which would subsequently be used by the Vanilla/Garden data layer to do the insert; something like this:

$ret = $SQL->Insert('eub_NewTable', 
          array('Name' => 'Grand father', 'TreeLeft' => 1, 'TreeRight' => 28, 'TreeLevel' => 0, 'LevelOrder' => 0, 'ParentID' => 1),
          array('Name' => 'Bill's father', 'TreeLeft' => '2', 'TreeRight' => '365', 'TreeLevel' => '1', 'LevelOrder' => '2', 'ParentID' => '0')

Woops….there’s a single quote in there….

Unfortunately, unless I am doing something very wrong, it seems that Vanilla/Garden doesn’t escape these for you. I suspect there is a function somewhere in the framework to do the escaping for you, but I decided to hack it for the sake of speed… this:

array('Name' => 'Bill's father',

And we have a winner. And I gan get onto more exciting things than populating my base data.

Principles not techniques

I like to think of coding in terms of principles vs techniques. I’ve met tons of good coders with lots of technique. Good technique. Rote technique. I’ve met very few coders who have good principles. A principle will let you look at anything code related…..and understand it….and if need be troubleshoot it.
Continue reading Principles not techniques

Dreamhost, Google App Engine and the naked domain forwarding fun

What are we trying to achieve:

We want a domain (both naked and with the www prefix) to point to our Google App Engine hosted project. For purposes of our demonstration, we will use the domain of my quick ‘n’ dirty project that I put together to play with GAE.

This doesn’t sound too difficult in theory. The gotcha is that google doesn’t support naked domains (i.e. the non prefixed version of the domain name) for some reason. The google documentation suggests that you add a CNAME record for your www prefixed domain to and then forward or redirect your naked domain to your www prefixed domain.

I’m going to assume you have your project in GAE all set up and that you have followed google’s instructions on getting the domain name through to google apps, insane though it is that you have to do that instead of just having it all in the app engine admin side, but hey….I’ll jump through hoops for a free hosted nosql implementation.

Ok, on to the Dreamhost side – problem is, choosing the “fully hosted” option at Dreamhost, I couldn’t add a CNAME record for my domain because there is a non-editable CNAME already added by Dreamhost. Choose the “Google Hosted” option, and the works, but I could not forward the naked domain to the www sub-domain because the domain was no longer hosted at Dreamhost and I couldn’t insert a redirect anywhere….. Arrrg!

This is what I did:

  • Enable the “DNS only” in Dreamhost.
  • Add a custom CNAME record for
  • Enable “Fully hosted” in Dreamhost with the “Remove WWW:” option.
  • Weyhey….now goes to the google app engine hosted project, and points to a directory at Dreamhost.
  • Last step – set up a .htaccess file in said directory to redirect the naked domain to

And it works!