On occasion you meet a developer who seems like a solid programmer. They know their theory, they know their language. They can have a reasonable conversation about programming. But once it comes down to actually producing code they just don’t seem to be able to do it well.
You would probably think they’re a good developer if you’ld never seen them code. This is why you have to ask people to write code for you if you really want to see how good they are. It doesn’t matter if their CV looks great or they talk a great talk. If they can’t write code well you probably don’t want them on your team.
After a fair bit of trial and error I’ve come to discover 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.
In this game a group of children sit around in a group and say each number in sequence, except if the number is a multiple of three (in which case they say “Fizz”) or five (when they say “Buzz”). If a number is a multiple of both three and five they have to say “Fizz-Buzz”.
An example of a Fizz-Buzz question is the following:
[quote]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”.[/quote]
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 ? – the majority of comp sci graduates can’t. I’ve also seen self-proclaimed senior programmers take more than 10-15 minutes to write a solution.
I’m not saying these people can’t write good code, but to do so they’ll take a lot longer to ship it. And in a business environment that’s exactly what you don’t want.
This sort of question won’t identify great programmers, but it will identify the weak ones. And that’s definitely a step in the right direction.
Name:
Anonymous2010-01-04 23:16
>>160
You should only include headers, not source files.
Name:
Anonymous2010-01-04 23:46
>>161
Bollocks. Tons of great reasons to use #include to include source files.
That's it. It's at best a workaround for limitations in C++. So many fucking hacks for backwards compatibility with C...
Name:
Anonymous2010-01-05 10:17
>>164
Come to think of it, do you guys believe that if it wasn't Stroustrup's intention to keep backward compatibility with C, would the C++ be any good?
The reason Sepples failed isn't because of backward compatibility.
But of course! Actually, that's the reason it's used at all.
And so, history repeats itself.
Name:
dasuraga!8GgBtN/zr.2010-01-05 14:08
what's with people and hating c++? It's syntaxically pretty ugly, but not at all unusable(at least I enjoy using it more than it's "safer" C-likes)
Name:
Anonymous2010-01-05 14:24
>>171
That's because you're either retarded or know no other languages. That's related to the discussion; it's my way of saying, "Have you read your FQA today?"
Name:
Anonymous2010-01-05 14:30
>>172
Yeah let's get back to hating proper /prauge/ style. Hate on FOIC and retarded ass Lispers and Haskallers
fizzBuzz x | mod x 15 == 0 = "FizzBuzz " | mod x 5 == 0 = "Fizz " | mod x 3 == 0 = "Buzz " | otherwise = show x ++ " "
main = print [x | x <- [1..100], x <- fizzBuzz x]
Did you know regular (non-class) functions can't have default template arguments? I didn't. I was also surprised to find that GCC's default template depth is 500.
>>190
Occasionally sites will tempporarily go down so the admins can perform kernel updates, moving databases, updating caches, etcetera. The best thing to do is spend time with family and friends.