TDD at interviews

Allan Kelly posted an article on DZone this week predicting that TDD would be a required skill for developers by 2022. Vishal Biyani asked on Twitter about how one might test TDD skills, and I promised to blog about my experience of using Cyber-Dojo in interview situations.

Screen Shot 2014-01-10 at 18.51.13

Cyber-Dojo is a browser-based dojo environment developed by Jon Jagger that supports a lot of programming languages and xDD frameworks. It’s great for dojos because it has few of the productivity frills that we’ve come to depend on over the years – no syntax highlighting; no autocompletion; no suggested fixes. That means we have to think about what we’re doing, rather than relying on muscle memory.

As Jon eloquently puts it in the FAQ: “Listen. Stop trying to go faster, start trying to go slower. Don’t think about finishing, think about improving. Think about practising as a team. That’s what cyber-dojo is built for.”

That might be what cyber-dojo was built for, but it turns out that it’s also excellent as an interview environment. Your interviewee writes real code and has to diagnose with real compiler/runtime errors. They’ll have to use a browser to remind themselves of all the basic knowledge that has atrophied during years of nanny-IDE development. And, best of all, there’s no save, build or run functionality provided by cyber-dojo. There’s only a single button and it’s labelled nice and clear: TEST.

Use one of the katas whose instructions have been helpfully included with cyber-dojo, or roll one of your own, and see how your interviewee responds. Every time they press the TEST button, all the code they’ve written is sent over to the server to be built & run and the response is returned, along with a traffic light: green for “all tests passed”, red for “one or more tests failed” and amber for “build failure”. You’ll get to see how they drive out a simple solution using BDD or TDD up close and personal. And my guess is that you’ll be surprised how few people can TDD their way to a solution despite all those bowling-game katas that have been recorded over the years.

Once your interviewee has left you can replay the whole session, because cyber-dojo keeps a copy of the code every time you press the TEST button. Uncomfortable using a public server? No problem. Download the virtual image and run cyber-dojo locally.

I used cyber-dojo during the coding loop when I worked at Amazon and it’s way better than either a white board or a ‘production’ development environment. Try it. My guess is that you won’t look back – and if you make a donation to say thanks, then Jon will use it to buy Raspberry Pis for schools.


Posted

in

, ,

by

Comments

One response to “TDD at interviews”

  1. Anthony Green Avatar

    Trisha Gee delivered some useful insights on hiring in her presenation ‘Making Interviews Rock’ at Qcon 2013: http://www.infoq.com/presentations/job-interview-tips

Leave a Reply

Your email address will not be published. Required fields are marked *