3 ms·
Ask HN: How do you answer technical questions in interviews?
As a recent graduate, I've interviewed (for front-end positions) with a fair number of companies, though I have not gotten any offers. I have done a couple mock interviews and I realized that the format in which I answer technical questions is really scattered and leaves the interviewer with a sense of doubt, even though I know what the right answer is!
The types of questions are usually specific and almost rapid-fire. For example, the interviewer will ask me a gamut of HTML, CSS, and Javascript questions. I'm looking for a format that I can answer these questions (similar to the STAR method in behavioral questions).
"Explain the difference between absolute and relative positions in CSS"
"Explain what promises are in JS"
"Describe how client-side rendering works"
"Describe what the 'clear' property does in CSS"
"How would you go about writing your own HTML templating language?"
- byoung2 11y agoHere's how I would answer these, and how I would expect a candidate to answer them: Absolute positioning defines the placement of an object based on the boundaries of its parent. Relative positioning defines placement as an offset from where the object would have appeared in the normal document flow. Promises are a way to handle asynchronous events...you can define now what you want to happen in the future when an expected condition is met in a way that is cleaner than nested callbacks. Client side rendering inserts data into templates and pieces them together in the browser using Javascript rather than generating html on the server and sending the rendered page. Clear specifies whether other objects can float next to the current object or whether they have to go below it. Html templating is best left to the professionals. I doubt I could do better than one of the popular open source ones. Source: I am a director of engineering
- isuck_interview 11y agoThank you byoung2 for your answer! Although those are the correct answers, I was looking for a format to answer these. I guess I'm really scattered brain in terms of answering open-ended questions.
- byoung2 11y agoI guess there is no set format, just answer concisely and confidently. If you don't know something, say so, like I did with the last question. The last 5 job hunts I did I got the job after interviewing with only one company.
- lollipop25 11y agoFrom what I've been through, it's not about your answer, it's how you answer them. - Being able to answer immediately means you have a good background on what the matteris. - Being able to wait for the question to finish before answering means you are not a "hit-the-ground-running" kind of person, and you wait for full detail before resolving the issue. - Knowing or not knowing the answer to the question is just half the story. The other half is how you deliver your response. A critical skill needed is to respond sensibly, especially on project estimates. It's normal to face unknown technology and learn as you go. - General knowledge is preferable. Specialization is good, but you will be under the microscope if you aren't capable of being moved to say, another language or technology. - Confidence. Seriously, I've seen friends pass interviews like it was a walk in the park - and they don't even know what they were talking about. - Interview is just to know what you are on the surface. Companies will tend to take you in and test you out for a few months. That's where the real challenge is. Do your best there. My advice to you: Do some light reading, and work on your communication skills (though knowledge is preferrable).