May, 2011

The Iffy Tractor (Can they code OO?)

Wednesday, May 11th, 2011

A Simple OO Refactoring Problem That Can Be Solved in under One Hour

When interviewing developers I like to use have a variant on the Rover problem (posed by Thoughtworks during their interview process) . The main difference is that the problem is specified as an existing class that needs refactoring. (essentially it’s a ‘Replace Conditional with Polymorphism’ refactor) and, as such, can be done in around 30-45 mins.

The problem is named “The Iffy Tractor” and you can download the full source for it here: TheIffyTractor or take a quick look at the main class here. It consists of a single class with a test that moves a tractor around a field. The class contains a few large ‘if’ statements that offer a variety of opportunities for the candidate to show off their OO skills. In addition the problem of rotating through the ordinals N/E/S/W to track direction presents a pleasant problem that has a variety of interesting solutions.

It helps to keep the scope of the problem small. It’s easy to get to grips with and start refactoring meaning that you can get something significant out of the candidate in under an hour. Its downside is the outcome is affected by weather you’ve used the refactor before and you can see that in the candidates approach (the test worked very differently in India to in the UK). I don’t find it matters that much though. You just have to interpret the results differently.

Like all tests it’s hard to say for certain how accurate or useful they really are. However the results from different candidates has been varied so they are at least a useful yardstick that provides some empirical measure of the candidate’s ability.

 

TheIffyTractor


The Business Analyst Test

Wednesday, May 11th, 2011

This test is designed for the Business Analyst interview process. Like all tests it covers a core skill. In this case writing up a requirement/story. However, like the developer test (here), it probes something specific in a bit more detail; whether they think about the existing system, not just the requirement to be covered. The test is short and simple:

Online Calculator

We have some developers who are working on an online calculator. Currently the site only supports add, subtract and equals. The users are looking to add multiplication to the application. Write a use case to describe this work which could be presented straight to the developers.

Obviously this provides an opportunity to show they can write. Does the BA know how to structure a requirement/story, can they articulate themselves etc? However the test goes a little deeper than that. The average candidates will jot down a story that describes how the new functionality (the multiplication button) should be developed. Better candidates will take into account existing functions in the system, describing how their new function should relate to the existing ones. For example they’ll specify how the multiplication button behaves when it is pressed after each of the other functions or numbers. Better ones still will refer to BODMAS etc.


ALL


Talks (View on YouTube)