I read today's Coding Horror blog titled "How to Hire a Programmer", then followed a link to another titled "Why Can't Programmers... Program?" It was in the second one that I read "[...] 199 out of 200 applicants for every programming job can't write code at all. I repeat: they can't write any code whatsoever." The author meant that quite literally. He then suggested a simple coding test to weed out the non-programmers:
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".
The comment that got me to write a solution was "Most good programmers should be able to write out on paper a program which does this in a under a couple of minutes." Could I write this in just a minute or two (or three)? I wasn't too surprised that I could, and I expect that many of y'all can, too.
This would be a good test for folks that are just beginning (students, I'm talking to you). Perhaps you've passed the CLAD (or CLD) and are feeling pretty good about yourself. Try it, you may like it.
A nice task I hope I solved without any Rube Goldberg code![]()
Mine was similar:
I haven't tested it for speed, however I wanted to avoid two quotient&remainder vis ![]()
How about a one line regular expression someone?
Mine's v.similar to jcarmody's, but slightly more convoluted thanks to the select VIs ![]()
@Henrik Volkers wrote:
I haven't tested it for speed, however I wanted to avoid two quotient&remainder vis
I was referring to your first solution.
@Henrik Volkers wrote:
How about a one line regular expression someone?
Hmmm...
@ChrissyC87 wrote:
Mine's v.similar to jcarmody's, but slightly more convoluted thanks to the select VIs
Don't be
. You just beat 199 out of 200 people applying for a programming job. ![]()
@Even Deejay wrote:
A nice task I hope I solved without any Rube Goldberg code
![]()
Still small thing you have that kind. You could have used instead of
.
![]()