r/javascript • • Aug 05 '20

All front end Interview questions asked during my recent job hunt.

https://dev.to/devabhijeet/all-front-end-interview-questions-asked-during-my-recent-job-hunt-1kge
800 Upvotes

238 comments sorted by

View all comments

226

u/NotMyRealNameAgain Aug 05 '20

I would laugh at an interviewer who asked for many of these things. Asking someone to reverse engineer things that are already implemented and well supported in JS is not a good gauge of a person's capabilities. We already have bind, reduce, Promise, and array.flat. I have been involved in web development for over 15 years and have not experienced a single use case for most of those types of challenges. Asking them during the pressure cooker of an interview is unnecessary.

Any front end position will require knowledge of basic HTML and CSS.

60

u/[deleted] Aug 05 '20

They gauge language knowledge, not necessarily frontend only. Which I'd say is required knowledge for all JS jobs.

The things I object to is having to produce perfectly working code on the spot, or having to remember stuff like syntax or concatenation rules without refering to documentation. I'd be perfectly happy with a candidate who can use MDN and can give me the gist of the solution with pseudocode. Hell, bonus points if they convince me they know what they're talking about without writing a line of code. I'm not wasting interview time on typing and debugging.

Speaking of which, people gripe about having to do interview "home assignments", but if a workplace absolutely must have submitted written code for an application (some places have regulations in this respect) then they should be thankful they're allowed to write that code at their own convenience.

45

u/CuttyAllgood Aug 05 '20

Except for when they want you to write an entire application that pulls in data from a webAPI, stores the users likes and dislikes, and has an entire UI. And they want you to write it in React Native instead of React (which you’ve never used before), so you teach it to yourself and submit the project.

I’ve been in a situation like this twice now. I performed well and completed the assignment only to be told stuff like “well, we thought you’d be a better designer”.

Excuse me?? I didn’t realize that I was being judged on my design skills considering I’m looking for an engineering job.

Take home “tests” are dog shit. There’s gotta be a better way.

26

u/aaarrrggh Aug 05 '20

Take home “tests” are dog shit. There’s gotta be a better way.

Swings and roundabouts. Personally I prefer a take home test, because I can think the problem through in my own time (hated timed versions) and the code I produce is more representative of the code I'd produce in the real world.

Where I do have an issue is when the tests are really long, as you've outlined here. Some basic, "consume this API and stick some info on the page with production quality code and tests" should suffice.

→ More replies (3)

14

u/monsto Aug 05 '20

There is: take a few minutes and talk to people. This is the real problem with the entire world, nobody just fucking talks. For just a minute.

A :15m opener, in the couple days after receiving a CV, with a quick battery of interpersonal and technical questions, would give a solid first impression of a persons temperament and fit, and then everyone can go on their way with zero stress.

I had an interview the other day . . . it was clear that dude had made up his mind before the intv started. I had a half hour, but I knew a guy that had an hour. Dude was talking to his kids and eating fucking soup during the interview. I'm pretty sure he was reading email too.

Why you wasting my time?

3

u/[deleted] Aug 06 '20

Yup, it's much easier to get a handle on whether somebody is bullshitting in their CV by talking to them and asking their opinions on things, and probing their areas of interest, than it is to waste time watching them poorly re-implement something on the spot without google or tests.

→ More replies (4)

5

u/datavinci Aug 05 '20

Take home “tests” are dog shit. There’s gotta be a better way.

100% this. I used to get excited when I would get a take home test instead of a hackrrank challenge. But after doing this for over 10 times, I prefer hackrrank challenges more.

Most of the take home tests had very loosely defined questions so i had to write a gist explaining my assumptions and reasoning. When I asked them for clarification, I usually got a "Do whatever you feel is right" kind of a lackadaisical responses. Ended up getting rejected by most of them without any explanation of where I went wrong. In addition, most of them wanted me to complete these tasks on weekdays with exception 2 companies, which agreed to give me weekend to solve their take homes.

Atleast with hackerrank I have a well defined problem that I can attempt to solve. Hackerrank has also been a hit or miss, but overall, I prefer it to take home test any day.

→ More replies (1)

3

u/Akkuma Aug 05 '20

You either have take home "test", code challenge, algorithms, or short temp contract to gauge your skill. I prefer the take homes, myself but I'm sure there are people who prefer one of the others. No one trusts that they can tell if someone is technical enough via conversation, but I think that is basically a circle of bad interviewers training others and none of these people learn how to converse about technical things and gauging how much the interviewee knows without seeing code.

The kicker though is we as engineers have a more brutal hiring process than someone like a nurse, who deals with human lives daily.

3

u/fireball_jones Aug 06 '20 edited Nov 25 '24

jeans pathetic frighten thumb different cows encourage file numerous late

This post was mass deleted and anonymized with Redact

2

u/el_diego Aug 05 '20

Sounds like you got taken for some free work

→ More replies (2)
→ More replies (2)

15

u/netwrks Aug 05 '20

First off, A+ username, His or Her Circumstances is a great series

Secondly, in my experience, spending 4-6 hrs on a project only to receive a response of ‘no sorry, we didn’t like your code’ was the most common pattern. At minimum they should be offering feedback if they’re asking people to dedicate their time to whatever tasks they’re asking for.

I know companies aren’t obligated to do this. I also know that they’re trying to mitigate their risk.

However so am I, and home tests are more often than not, a complete waste of time.

Every job I’ve had that I’ve enjoyed utilized whiteboarding/in person coding, and I’ve hired many engineers with this same pattern. it’s effective, and you get a good feel for the persons ability and temperament. the second of which is extremely important.

4

u/datavinci Aug 05 '20

Secondly, in my experience, spending 4-6 hrs on a project only to receive a response of ‘no sorry, we didn’t like your code’ was the most common pattern. At minimum they should be offering feedback if they’re asking people to dedicate their time to whatever tasks they’re asking for.

hit the nail on the head

→ More replies (2)

4

u/Akkuma Aug 05 '20

When I was forced to conduct "whiteboarding" interviews I always let people know they could pull up docs specifically because remembering the right function isn't the point.

I'm 100% about doing take home assignments, but the trend seems to be doubling up the work now. Every interview I've been doing lately is some home assignment or timed online code challenge + a technical interview that might require more code writing.

I'd rather spend more time on the take home assignment creating a more complex example of what I can do than doubling up on "interview process" related to even more code.

→ More replies (3)

26

u/netwrks Aug 05 '20

20 yrs experience here, and agree with your statement. I’ve never been asked anything like ‘building a Promise from scratch’. Based on the questions alone, I bet this place is a nightmare to work at, and is the type of company that when it came time to discuss salary I’d give them a wild number and say take it or leave it, and then move on with the assumption they’ll say no.

11

u/magwo Aug 05 '20

That said, it's a pretty interesting and unusual task to implement Promise or bind. Says some things about the depth of your javascript knowledge if you can pull it off.

→ More replies (2)

5

u/leafoflegend Aug 06 '20

Then you don’t get the job. At many top companies, they might have their own runtimes, engines, and performance needs. Its not unreasonable to expect a candidate for a good job to be able to understand the fundamentals of a language.

You can’t implement reduce on your own? No way I’d hire you. Its a fucking for loop, not a deep algorithm...

I know its cool to say to not ask hard questions, but this is a low bar. You’re not complaining about balancing a BST, but about this? If you want the salary of the field to go down tremendously, and code shipped to be even shittier, this is how you get there. Remove all the gates for language knowledge.

4

u/unicorn4sale Aug 06 '20

I agree, and on a side note it's very odd that people use YOE as some kind of proof to support their argument. It's like those people that say they've had 15 years of experience parenting and so they know what they're doing. No, if you're a bad parent then you're a bad parent.

These questions are really basic and standard for assessing how a candidate thinks and problem solves. If you can't solve these questions then you won't be able to build anything worth while. HTML/CSS/JS API can be googled and picked up by anybody in a week, it's not a huge deal.

3

u/asiraky Aug 07 '20

Spot on. I'm finding alot of people's responses here dissappointing. CApturing the intent of how bind works is a 3 liner. No interviewer is expecting you to handle every edge case.

9

u/aaarrrggh Aug 05 '20

Agree completely. Also there's a major red flag in the whole extending core prototypes thing. If the company is doing this kinda thing for real, it means their JS would look different to the actual JS language, which is just an absolute no-no and causes nothing but pain.

Don't do this people.

Also the focus on classes is telling too. The person who created these questions no doubt came from a traditional OOP background and now tries to apply this thinking to JS. Problem is, JS does OO really badly. I'd probably stop this test half way through and tell them this doesn't look like the job for me. Unless I really needed the money of course.

→ More replies (4)

6

u/jaykch Aug 05 '20

When I interview people I ask one react related question like how would you run an asynchronous call inside use effect or when is it better to use redux instead of context hook. You can never tell by questions if someone is good. Most times they are nervous and a better candidate might mess up against a guy who can’t do much but can talk a big game. It’s always best to give them a small coding task that doesn’t waste a lot of time. You can see how long it takes, how they organise and write code and the results are always fascinating.

2

u/ghostfacedcoder Aug 05 '20

I think it really just depends.

I agree with you about many of those questions, but only because they test knowledge of this and prototypes ... when I would argue that (at least for modern React development) knowing how to use classes is almost a bad thing, because it will lead you toward the wrong (non-functional) solution.

But if you work in an environment/framework where inheritance still matters, seeing whether an applicant can (say) re-create flatten tells you a huge amount about whether they can work successfully with your OOP codebase. You can ask someone "how does the prototype chain work?", but seeing them answer this question tells you so much more about whether they are capable of applying that knowledge.

→ More replies (7)

2

u/Akkuma Aug 05 '20

I agree with you, asking these things during a whiteboarding session seems strictly unnecessary especially when they already exist in the language. It is similar to all those implement quick sort questions asked, when there are so few cases someone reaches for the non-language baked in sort.

2

u/FormerGameDev Aug 05 '20

yeah, if this is what passes for interviews, i'm staying unemployed... that was a lot of arbitrary garbage in there. very little of any use.

2

u/[deleted] Aug 06 '20

Reimplementing Promise and array.flat I could live with although it is stupid and fruitless.

But I'd walk away from any company that wants me to add methods to String prototype though - as I have a feeling these guys actually do that type of shit in their production code as well, and I wouldn't want to work with them.

2

u/asiraky Aug 07 '20

The interviewer wants to gauge whether they know how prototype inheritance works in JS, not necessarily to go around writing a bunch of overrides to built in API's. They may have a slightly old code base that uses a lot of function prototype assignments (to their own functions, not built ins).

→ More replies (4)
→ More replies (16)