

Ask HN: What's an effective programming test? - kator

For a medium to senior level position do you expect to work on a problem that could take several hours to develop (plus the test harness, etc. etc.)?<p>Any suggestions on developing a good test for medium to senior level developers?
======
freework
The best code challenge I was given was to build an infinite scroll
implementation. The company gave me an API endpoint that spat out JSON, and my
assignment was to create a page that would show the items and render more
items from the endpoint when you scroll down to the bottom of the page. I was
given no time limit. They just said "send us the code in email when you're
done". I was allowed to use anything I wanted. I finished in about 6 hours.
Most of the time was spent going through the bajillion endless scroll jquery
plugins (99% of all jquery plugins are total crap). It was fun for me, and I
was allowed enough time to polish up the code to get it looking like code I
normally write. Now if I ever want to implement infinite scroll in any of my
personal projects, I know how to do it.

The worst code challenge I was given was by a company that basically gave me a
huge dump of data (a 60 line string in a very peculiar format) and told me to
write a function that took the data, processed it, then outputted that data in
another peculiar format. I was given one hour to complete this assignment. It
was tedious and in no way fun, so I just didn't do it. I probably could have
gotten it, but I don't like doing things like that. If the interview contains
high-stress speed coding, then I can only assume the job contains the same. No
thanks.

Good developers like to take their time, so don't timebox (at least not in
units of hours, a one week deadline is fine). Also, good developers don't like
doing tedious things. Give them something meaningful to do, not just busywork.

------
rm999
I think a programming assignment is effective at determining how they can
perform in a real-world setting. Let them use the internet and any other
resources they want (except of course plagiarism), and give them a couple of
hours of alone time. An example of an problem I've seen is to implement a
program that suggests spelling corrections given a dictionary file and a word.
It's simple and easy to understand.

~~~
russell
No plagiarism? Why not? If s/he can download a piece of open source software
that can do the job, I would call that a pretty successful test. That's what a
good developer would do on the job. And it isnt plagiarism if s/he leaves in
the original copyright/whatever.

~~~
rm999
This isn't a literal simulation of real-life work, it's a programming test.
Certainly gluing together free components is an important skill for any
developer, but I would expect anyone interviewing for a medium to senior level
position to be able to trivially do that.

------
orangethirty
Sit them down in fron tof your system. Have them work on something. If they ca
nmanage to pull through, hire them. If not, don't. If your system is so
finicky that a newcomer can take down, then having this person break it for
you will allow for a stronger system to be built. I don't get the fascination
with asking stupid interview questions. Sit the person in front of a computer,
have them look at your code, have them write some code, and then have them
explain the code. After all, it is that very same code what they will be
working with. Why not show it right from the start? To add, most applications
out there are just front ends to databases. Why do they need to know X or Y?
All they need to know is how to write a query and process the results. No big
deal.

------
kator
I guess the bigger question I have is how much time to you think is
reasonable? I recently did a test one of my clients uses and to do it "right"
took many hours.. but I also built test scripts, makefile, time testing
scripts etc. But still I wonder what people think is reasonable?

