Live data from Hacker News

Front End Developer – Interview Questions

github.com

141–150 of 152 posts

Re: Front End Developer – Interview Questions

#141
post #9

Earlier quoted context omitted.

I was thinking the same thing. I've built manys a website in pretty much every front-end language imaginable and I would struggle to answer many of these. Yet I feel little shame in saying that I believe myself to be a very competent programmer. What is the significance of having memorized a bunch of arbitrary terms? If you don't know what the difference is between and that doesn't mean you aren't a competent develop…

All these questions test my google skills, not necessarily my front end skills. I was stuck in many even though I write JavaScript everyday.

When I was younger, I knew how do simple things like checking the length of an array or joining a list of strings together or dividing two integers with various kinds of rounding/truncation. I could have told you instantly the correct syntax to do this in every language I knew.

Today, I probably couldn't tell you with bet-my-life-on-it confidence how to do those things in any language I know. There are a lot more languages, about half a dozen of which I currently use in professional work several times per week, but the five-second documentation search to check the right syntax* is completely auto-pilot behaviour now.

This was quite a disturbing realisation the first time I noticed it, but I've since concluded that with modern on-line help systems, general awareness of what tools will be available and what kinds of tricky issues to look out for is far more practically useful than being able to reliably recite specific details for specific contexts five seconds faster than a search would have told me.

*In the case of JavaScript, please allow five seconds for the initial search, followed by another thirty seconds checking sites like MDN or caniuse to see what is actually likely to happen in real browsers and whether some mundane functionality amazingly still needs a polyfill or other library-based alternative to work sufficiently portably. :-)

Re: Front End Developer – Interview Questions

#142

Earlier quoted context omitted.

Most full-time, permanent jobs have a 3 month probation period at the start of the contract where the employer can fire the new employee easily.

In my experience, most full-time permanent jobs are at-will, there is no contract, and you can get fired for snapping your bubble gum in the cube farm just as easily as you can be fired for being bad at your job. There may be more to the story, but in the absence of other information, "fired for using Notepad to write code" strikes me as being more on the arbitrary and capricious end of the scale than the rational an…

I guess it depends on where you are. There is a surprising amount of employment law at (least in NZ and Australia) to protect employees. I believe the EU is similar, but I don't know about U.S employment law.

Employers need to be very careful about the termination process; employees can claim compensation for unjustified or constructive dismissal. The employee might be glaringly at fault, but if the employer does not follow process (or even fails to document that) then a ruling can go against them.

Claims are very common here; there are various law outfits which just specialise in this area (e.g. the 0800 SACKED toll free number).

Re: Front End Developer – Interview Questions

#143
post #17

Earlier quoted context omitted.

Call and apply are core concepts to writing good javascript. I would not hire someone (at least for any sort of senior role) that could not tell you exactly how both of them work. Many of the other things on this page are certainly "trivia" that could be addressed by google when they come up, but not those.

Well, they are both exactly the same. The only difference is the particular way each accepts arguments, and it's easy to forget which is which. So yes you should know how they work, but the distinction between them is contingent and difficult to remember.

This sounds like a very good answer to that question.

Re: Front End Developer – Interview Questions

#144
post #74
post #62

Earlier quoted context omitted.

The only solution I could think of is this: function foo(n) { var result = []; for (var i = 0; i What are the two others?

You could use Function.prototype.bind in a couple ways, or even Array.prototype.map (though sadly you can't really do new Array(n).map, if that was true you could make this a one-liner). // new Array(n) could just be [] in all examples // // using Array.prototype.map // sadly you can't do new Array(n).map // because it doesn't iterate over undefined functions function foo(n) { for (var ret = new Array(n), i = 0; i

If you're into one-liners, CoffeeScript is your friend :)

  foo = (n) -> (-> i) for i in [0..n]

Re: Front End Developer – Interview Questions

#145
post #139

Earlier quoted context omitted.

Or you had other ways of indicating scripts were meant for processing after the document had been parsed (which might be smart or even essential depending on your support targets). That might have been something that senior devs only did 5-10 years ago, rather than something senior devs do now, though if that's the case one might wonder exactly what we mean when we say "senior."

Even if you chose a different implementation in the end, you'd still be aware of what defer is.

I've seen it for the first time.

But it didn't seem too obscure to me. Deferring execution is a known technique, so I would have probably guessed it right or switched it up with async.

Re: Front End Developer – Interview Questions

#146

Earlier quoted context omitted.

Most full-time, permanent jobs have a 3 month probation period at the start of the contract where the employer can fire the new employee easily.

What's your source for "most"? Also, why would I leave my job where I'm not on probation for a new job where I am on probation?

In Germany there is a probation time of 6 month for full-time jobs. Normally you have a 6 week period of notice, in the probation time employer and employee only have 2 weeks.

Re: Front End Developer – Interview Questions

#148
post #80

I don't really care for this style of interviewing. A technique that really works is to take a problem the company is currently facing, slim it down and present it to the candidate pre-interview. Then when he comes in you ask him to explain his solution, and the choices he made. It allows the candidate to be far more relaxed and puts him in a situation a lot more akin to the work that he will be doing for your compan…

It's also kind of sleazy as you're getting them to do work for you for no pay. I've been in interviews where similar questions were asked, and they had me go into more detail as I was actually solving problems for them.

Less sleazy would be to ask them to solve an already solved problem (whether you tell the candidate it's already solved or not is up to you).

Re: Front End Developer – Interview Questions

#149

Earlier quoted context omitted.

In my experience, most full-time permanent jobs are at-will, there is no contract, and you can get fired for snapping your bubble gum in the cube farm just as easily as you can be fired for being bad at your job. There may be more to the story, but in the absence of other information, "fired for using Notepad to write code" strikes me as being more on the arbitrary and capricious end of the scale than the rational an…

I guess it depends on where you are. There is a surprising amount of employment law at (least in NZ and Australia) to protect employees. I believe the EU is similar, but I don't know about U.S employment law. Employers need to be very careful about the termination process; employees can claim compensation for unjustified or constructive dismissal. The employee might be glaringly at fault, but if the employer does not…

In the U.S., employee protections (or lack thereof) are largely determined at the state level rather than the federal level. What protections that do exist in law are practically unenforceable.

Decades of union-busting lobbying has resulted in "at-will" employment being the default in many states that formerly had better employee protections. Contracts are now uncommon, and contracts that do not heavily favor the employer are rare. This was sold as making it easier to hire and fire employees, but my observations suggest that it has not made it easier to hire.

Working in much of the U.S., aside from a few specific states, is toiling under the Sword of Damocles. My worst-case anecdote was being laid off with 3 days of notice with no severance. In theory, that should have triggered a federal penalty, since the entire office facility was laid off, but the company did some sort of legal sidestep to avoid that, which amounted to "You're not being laid off; we're just not giving you any work or paying you." When I found a new job 2 weeks later, the company demanded a resignation letter in order to release my security clearance responsibility to the new company. I refused, but I still had to write a note for their records explaining how layoffs work.

I'm continually surprised at people who come from Europe or Commonwealth countries to work in the US. Perhaps they just don't know?

Re: Front End Developer – Interview Questions

#150

Earlier quoted context omitted.

I guess it depends on where you are. There is a surprising amount of employment law at (least in NZ and Australia) to protect employees. I believe the EU is similar, but I don't know about U.S employment law. Employers need to be very careful about the termination process; employees can claim compensation for unjustified or constructive dismissal. The employee might be glaringly at fault, but if the employer does not…

In the U.S., employee protections (or lack thereof) are largely determined at the state level rather than the federal level. What protections that do exist in law are practically unenforceable. Decades of union-busting lobbying has resulted in "at-will" employment being the default in many states that formerly had better employee protections. Contracts are now uncommon, and contracts that do not heavily favor the emp…

Well, I didn't know. Thanks, I learned some things.
Post reply on HN