Javascript interview question/exercise

2 points by krumiro79 ↗ HN
The company I work is hiring a senior web developer with "strong" javascript skills. Our team develops websites using a popular enterprise CMS. During the interview, the coding quiz was about implementing a countdown.

I'm not sure it's a good exercise to test javascript skills... what do you think? Can you suggest a good 30min exercise where you can actually understand (if that) a javascript developer's skill level?

Thanks.

5 comments

[ 2.9 ms ] story [ 32.2 ms ] thread
"Can you suggest a good 30min exercise where you can actually understand (if that) a javascript developer's skill level?"

Read their CV, follow their links, study their code.

Stop trying to replace good recruitment processes with gimics.

This is good, but not always available, and can't always be judged.

For example, I write javascript and have used it in a bunch of project, but none of those projects have been successful so over time, they've been taken offline.

Over the last few months, I've been working for a national brand on their mobile apps. Written in HTML and Javascript served by Phonegap. Only available through the app stores, so you can't look at the code.

I write my resume/cover letter and put all my references into a website, customised for each job I'm applying for and host it on github pages. It's ok, but doesn't necessarily show my best work as I'm not building an actual tool that gets something accomplished. I'm just putting words on a page and using Backbone or Angular for presentation and navigation.

Is a countdown in any way related to your business?

I don't think a countdown is a bad way to start, but it is probably a bit basic.

I'd get them to do something that shows a level of understanding of OOP. Maybe just expand on the countdown.

Can they build a clock which would countdown, then countup either at the click of a button or if it reached a certain digit? Can they reset the clock, pause it?? Those sorts of things.

I think any programmer worth their weight should be able to do that in 30 minutes. In fact, I'm going to give it a try right now and see how long it takes.

So that was 25 minutes, and I have it working, though I admit, I am not a brilliant Javascript programmer, but I can get it done, and I made up the test, so... I probably had a head start.

I forgot what setInterval was, and had to look that up (I haven't used it in years, seems setTimeout is much more useful).

Hope that helps.

I recently posted on writing a UI component using only native javascript and a Model-View pattern[1].

Something like this can easily be written in 10-15 minutes, doesn't require previous knowledge of any library or framework, and serves as a good measure for code style, organization, design patterns, knowledge of javascript, the DOM API, and application architecture.

[1] http://ricardo.cc/2013/06/07/react-tutorial-rewritten-in-pla...