views:

473

answers:

14

We are in the process of hiring a HTML/JavaScript/CSS web developer, and we are looking for an objective programming homework that they are able to complete 24 hours before the actual interview.

There are few questions in SO about programming homework but nothing related specifically to HTML/JS/CSS. Ideas?

Reference 1

Reference 2

A: 

You could ask them to implement quicksort using Javascript. Such an implementation can be found on the Internet. If they come back, whether or not they cheated, at least you know they can be resourceful :)

karim79
Isn't JavaScript's sort method implemented as a QuickSort?
Nosredna
I'd have them implement a sort using a primary and secondary key, using the built in sort method. A surprising number of people run into trouble doing that in JavaScript.
Nosredna
@Nosredna - could well be, if they spotted that then great. If they didn't get intimidated then great. So much fun to be had...
karim79
If they say "Why would I bother doing that when Array has a sort method already?" then at least you know they won't waste time re-inventing wheels ;-)
NickFitz
+2  A: 

1) Ask him/her to do 3 column layout with various combinations of fixed and fluid widths.

2) Ask him/her to make all columns in 3 column layout same size.

3) Ask about knowledge of javascript frameworks.

4) Ask about making ajax request using XHTMLRequest objects and with the frameworks they know.

5) Ask to validate a form using javascript.

6) Ask to dynamically create and add html elements into DOM tree.

7) Ask to do total of values entered in text boxes as user types.

TheVillageIdiot
#3 through #7 would only test javascript knowledge; #1 and #2 would only test ability to use google (or SO) :-)
ChssPly76
+6  A: 

Have them create a website (2-3 pages) based on a (reasonably simple) JPEG mockups you give them and your description of functionality. Make sure javascript is involved somewhere (simple menu or something along those lines).

This tests HTML / CSS / javascript, and - perhaps more importantly - it tests their ability to understand requirements and deliver a product.

ChssPly76
+1 because its not really google-able. They have to know how to do this, its harder to cheat. :D
CrazyJugglerDrummer
I like this too because it's a *simulation* of a real-world project. Poor coders fall down, and maybe great coders show off.
willoller
I'd only recommend this idea if you can do it yourself in no more than 20 minutes. Otherwise you'll scare off potential candidates who don't want their time wasted.
Spencer Ruport
@Spencer Ruport - I don't know about 20 minutes, but yes, it should definitely be something that can be done within reasonable amount of time. Exactly what is "reasonable" varies depending on circumstances. I'd say within 1.5 - 2 hours, possibly up to 2.5 - 3 hours IF this replaces a whole round of interviews.
ChssPly76
JPEG? Give them PNG and PSD so they don't cringe at all the artifacts.
kmiyashiro
@kmiyashiro - yes, because the difference in image quality between original and JPEG compressed at 55+ quality is SO important for a TEST PROJECT that I'd much rather get 25+Mb PSD in email than 300Kb JPEG :-)
ChssPly76
A: 

Some basics about CSS, like how to center a div on a page. Which javascript frameworks does he/she know about? Which of the following html/css could be problem in browser X?

My general tip is to look at what your company develops, find out what general problems the programmer has to fight every week, try to summarize those and put them in questions.

Your customers, have they come with any feedback of previous or current work, any wishes? See if the person looking for the job have qualities that your customers might find interesting.

And another general tip not relating to programming are the usual stuff like how he handles stress, is he a teamplayer? (do you have a team for him to play in), is he a solo-star? (do you have the space he needs?) and so on.

Good luck

Daniel Persson
+7  A: 

Don't do challenges...

They are weak at best. The question is not "can you do this off the top of your head", it is:

Can you do this with the resources available to you in your job.

People come from all sorts of backgrounds and the resourcefulness is way more important to me. Ask them extremely basic stuff like how would you change the value of a checkbox with javascript or add a CSS class to a table row with javascript. But don't force them to write code.

I've also seen code put in front of candidates and they were asked to describe what the code did and to potentially point out issues they saw with it. Far better gauge.

RSolberg
that's why they give the candidate 24 hours to prepare their solution :)
Jiaaro
You are right Jim. We don't want memory, we want the right person that is able look the for the right answer. Thanks Solberg.
Geo
Whether it is 24 hours, 48 hours, 2 weeks, etc., my point remains the same. A challenge is not necessarily a measure of one's ability to do the job. Giving them 24 hours may be more than the 1 or 2 you need it done in. Hell, they could even post the question on here, have it code reviewed and bring it back to you the next day and you're like, dang, you are a senior level developer (not)!
RSolberg
I doubt anyone doing simple HTML/CSS/javascript could be consider senior level developer no matter how well put together the example was.
Frank V
+1  A: 

Give them a breakout, and have them make the finished product. Give them a mockup in image form, and have them reproduce it with the image pieces.

That will show that their CSS and HTML skills are good. If you are looking for Photoshop skills, you could even have them breakout the mockup itself.

As for JavaScript, I would have them implement a few mid-level excercises using whatever libraries you use. For example, have them take the breakout from before, and add slide in effects for all the menu items using jQuery. Or have them implement some tabbed controls.

If you need a JavaScript Guru, I would ask to see any code they have written, and see how it works. have them explain it to you, reflect on their work, and maybe see what could be improved.

Maybe as a bonus, ask them how they would improve your own website, and how they would go about doing it using the aforementioned technologies!

Good luck!

SkippyFire
I agree, Javascript is a complete programming language. If you are looking for an expert HTML/CSS candidate with intermediate Javascript skills, give them challenges with the popular libraries.
kmiyashiro
A: 

Have them make a calendar. Assure them that you don't expect them to finish, because they won't, because they are so bloody difficult.

Bonus points if they are able to switch between months that have a different amount of weeks where you have to hide and show rows.

Points off of they forget that months in the date object are zero based :)

mwilcox
Asking someone to write a calendar in 24 hours can have 3 outcomes: a) s/he will point me to one of tons of already available implementations; b) s/he will quietly copy one of already available implementations and pretend s/he wrote it; or c) s/he will try to write their own and fail miserably or come up with half-finished mess that's nowhere as good as one of already available implementations. Guess whom I would hire? And all things considered, what exactly did I test?
ChssPly76
This is more for a javascript candidate and barely tests html/css knowledge. It is also a soul crushing task.
kmiyashiro
A: 

Find an example from your companies past where a developer had to deal with rendering problems due to browser implementation differences.

Without mentioning that problem, show them a mockup/storyboard of the what you want them to make for their assignment (be sure it includes the aforementioned issue). Be sure to let them know that you want it to work on browsers X, Y and Z.

See how they handled the cross-browser problems. In my experience, a very large % of time that developers spend on web gui work is making sure it looks properly in all the browsers you intend to support.

Lastly, have some prepared questions and go over their code with them, asking them to explain why they used the implementations that they used. This will reveal how well they understand it, and separate the pros from the schmoes.

TM
A: 

I like to ask about simple things. Given that they are simple I would rather asks questions rather than let them take it home. My goal is to see if they have traveled the well worn path of developing sites with a database backend. If they say they are senior then they should be able to quickly answer the following:

HTML - How would I center a button on a web page?

JS - If you wanted to have the user click a button and then update a text box with the time, what would the JS code look like?

CSS - Tell me how a CSS file and inline CSS are different and when would you use each.

SQL - You have a table of projects and a table of developers. How would you setup the tables so that you can have many developers working on many projects and vice versa.

These are just 1 question per category but we have about 20 for each. About 70% of the applicant’s that claim to be senior Dotnet developers can't answer 1/2 of the questions like these.

JBrooks
A: 

I was asked to name all the sublements of an TABLE I could think of. I liked that question - I think it is a good indicator of how experienced an HTML developer one is. No newbies are gonna give you CAPTION and COLGROUP, let alone THEAD and TFOOT, but a more experienced developer is likely to have come across that at one point.

I think a high percentage of web devs are going to be able to name a couple IE6 bugs from memory.

I'm pretty good with Javascript so I can be EXTREMELY evil with closure-related questions. I just like to see how far interviewees can get. For the record, the first question asked of me when interviewing as an user interface engineer intern at Google was "define Javascript closure".

The best question, though, is probably to show a mock up and ask them to walk through how they would create it. Very open ended and a good way for the interviewee to show how they think.

Triptych
A: 

Ask them to do what questions appear on stackoverflow so many times:

  • How do I get this div to take up the full height of it's parent?
  • How do I center this thing?
  • Why does this look different in IE6 and how do I fix it?
  • Various simple interactions with Javascript.
  • Convert mockup to HTML/CSS with the most semantic and clean HTML possible, with the most efficient and clean CSS possible. Give them a PSD or PNG, no JPG or GIF... I hate it when people give me low quality stuff to work off of.
kmiyashiro
A: 

Ask them what resources they use to help overcome development issues...an experienced programmer no doubt has a wealth of resources or a standard pattern where as an in-experienced programmer will have none (or google).

Just hearing someone answer this question regardless of what they say will likely give away there expertise...an in-experienced person likely hasn't built up such a list or method...and won't know what to say...

davidsleeps
+1  A: 

One of the key questions I ask is 'How do you keep up with web technology, such as changes in the HTML5 spec or when there is a new Firefox beta you need to test against?'

If they can't rattle off a list of blogs and sites like SO that they read regularly, then I'm not so interested. I'm looking for people that always want to know what's going on. Even if they can build a perfect 2005-era website, it's only half of what they need to know to build my 2009 website. The web is a different place every year, and if you don't keep up with it, you're useless to me.

Elocution Safari
A: 

What is the result of a.foo(2)?

var a = (function(y,x) {
    var x = null;
    return {
        foo: function(x){ return this.bar(x * y) },
        bar: function(x){ return x + y; }
    }
})(3,4);

Answer: 9, as the scope of x is from the return object's functions.

Jason