Hacker News new | past | comments | ask | show | jobs | submit login

> "If your candidate doesn’t understand getElementById, getElementsByTagName, appendChild and removeChild, you have a problem"

Why, because you can't reach the Mozilla docs? Reference based questions are no way to do an interview. It's easy to look this stuff up.




These aren't some obscure "nice to know" functions...this isn't a "you don't have the manual memorized" gotcha question. Those functions are fundamental to writing JavaScript web applications...particularly at that point in time, but even in today's world of DOM libraries. At this point in time (and even today to a lesser extent) JavaScript's raison d'etre was to manipulate DOM objects and those functions are key to that.

That's like saying "Heart surgeons don't need to be able to draw a rough diagram of a heart when asked...they can always consult a medical textbook".

Sure...I agree with you that heart surgeons don't need to have every obscure cardiovascular disease memorized...but they need to have memorized the basic cardiovascular functions, how the heart works, what it looks like, etc. The same is true for programmers of any type...there is a base amount of information that you should just know in order to be considered proficient for a particular field.

If a candidate comes in and doesn't know this stuff, that doesn't necessarily mean you shouldn't hire them...however it does mean they are not proficient in whatever field and will need to be trained to some extent.

Also of course, as with any other sort of question; it could be they just had a "brain fart" or off day...but not asking these sorts of questions doesn't make that issue go away.


Back when this article was written, you were using these methods about every 10 lines of code or so.

If they weren't embedded in your memory, you were probably lying about how much Javascript you had written or were really bad at it.


Agreed, but those should be considered early weed out questions, or a segue into deeper topics. For example, appendChild and removeChild, it's almost obvious what they do, but ...

1) What implications do those have on DOM performance?

2) Contrast appendChild when called on a DOM element, vs. an absolutely positioned DOM element, vs. a document fragment

3) Why do you want to avoid calling appendChild w/in a loop?

Keyword I'm looking for from candidates: Reflow, which requires a deeper level of understanding, and that's the level I'm really targeting in an interview.


Mozilla docs? If you can't tell what getElementById does just by the function name and a general understanding of what you are being interviewed for then there is a problem that goes beyond unfamiliarity.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: