Thursday, March 1, 2007

Can you cut the mustard

This was a totally interesting article by Jeff Atwood. I mean this is a very trivial exercise yet many programmers can't do it. I have met quite a few.

In interviews I have often been asked the standard questions like explain a left join. The problem with these is that people memorize the answer with no understanding of the concept. The real question would be can you write some SQL that will join table A to table B while making sure to pull back all the rows of table A and inserting blanks if table B has no data. Or something like that

Why Can't Programmers.. Program?


After a fair bit of trial and error I've discovered that people who struggle to code don't just struggle on big problems, or even smallish problems (i.e. write a implementation of a linked list). They struggle with tiny problems.


So I set out to develop questions that can identify this kind of developer and came up with a class of questions I call "FizzBuzz Questions" named after a game children often play (or are made to play) in schools in the UK. An example of a Fizz-Buzz question is the following:



Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".


Most good programmers should be able to write out on paper a program which does this in a under a couple of minutes. Want to know something scary?

powered by clipmarks

No comments: