6 ms·
Interviewing a front-end developer
- TempleOSV2 13y agoIf I were king for a day, what would I do? Some people get really carried away with power trips. God says... look_on_the_brightside I'm_in_suspense make_my_day guilty relax I_got_your_back threads umm_the_other_answer hi population delightful air_head Jedi_mind_trick fake beam_me_up ROFLMAO failure_is_not_an_option go_ahead_make_my_day gluttony you're_nuts basket_case What laziness do_not_disturb not bad everythings_a_okay ba_ha Obama This_is_confusing how_could_you theres_no_place_like_home zoot soap_opera Is_that_so what_planet_are_you_from have_fun I_could_be_wrong perfect crazy jealousy don't_even_think_about_it how_about_that funny experts big_fish do_you_get_a_cookie beam_me_up nerd Ramsay driving gluttony is_it_just_me_or It's_nice_being_God snap_out_of_it wishful_thinking well_obviously how_about_that I_see_nothing I_was_just_thinking exorbitant choose_one prosperity I'm_God_who_the_hell_are_you I_quit why_didn'_you_tell_me why_do_I_put_up_with_this God_is_not_mocked merry_christmas lift Mission_Accomplished chump_change hobnob do_it it_was_nothing battle yada_yada_yada outrageous soap_opera why_is_it What_I_want now_you_tell_me
- scarecrowbob 13y agoThis is interesting. These are things that I understand when pointed out to me, but off the top of my head, with no google, I'd have to think for a second. They are things that I implement most every day. For instance, the position fixed/absolute thing... I work with things like that pretty much every day, but usually it takes me 10 minutes of fiddling, or 50 seconds of googling if I've had to do it before, unless I get lucky and it just reveals itself as obvious. Oh well, I suppose that's why I live in the sticks and freelance instead of working for Twitter or Stripe :D I mean, this stuff seems esoteric to me, even though I work with it every day... it's neat to know that there are a lot of folks who have this stuff wired well enough to do it with no reference material.
- rymndhng 13y agoMy thoughts the same. Frontend dev is too forgiving as an interactive playground that I tend to iterate on the solution by getting some feedback from feeling things out rather than straight up knowledge.
- poseid 13y agoI agree, these question assume some kind of drill approach with the language syntax. I would think, this drill only is learned at a university/college level, and if you start programming from a different angle, these questions are hard to answer.
- RyanZAG 13y agoI don't think this kind of questioning is useful. Does it really matter if the dev knows all the strange intricacies of javascript, or does it matter if they can actually put together a well engineered application? I can easily see a more big-picture oriented dev who only uses the bare minimum javascript features fail this test yet create very well engineered code. I can also easily see a dev who likes to study manuals doing well on this test and then making code so difficult to understand he can't even fix it himself.
- lunarcave 13y agoNot necessarily. While I may agree that a good candidate can be put off if the line of questioning was only about quirky parts, I noticed that the questions actually help judge a candidate's js proficiency. A large part of this interview was based on testing the candidate on essential parts of the language like contexts, prototypes, etc.
- erikpukinskis 13y agoThat's my reaction too, but it's hard to know if OP is actually overzealous or I'm just not good enough for them. This line stood out to me: > it's important that anyone you hire has a comprehensive knowledge of apply and call To other Javascript developers: is this really true? I do use call every now and then, but it's pretty rare. Maybe that kind of stuff is more important if you're trying to functionally isolate components with richer interfaces between them? I tend to keep a pretty polluted namespace, so maybe that's where I'm going wrong. That said, I have a "I could learn that but I have stuff to ship" mindset about Javascript. That has its ups and downs. Maybe I should work on that a bit more.
- bulatb 13y agoYou should know that they exist and what they do. You can do a lot of things with higher-order functions just by making closures, but `apply` and `call` will give you flexibility and power there's no other way to get. For one thing, they're your ticket to manipulating `this`. The worst part is keeping them straight. My mnemonic is that `call` is just a function call, so arguments go in as normal. `apply` is the other one, so arguments go in as an array. (Maybe "A" for array, or something.)
- bulatb 13y agoThis interview could go much faster if it didn't use a laptop or a whiteboard. A strong candidate should fire off responses to those questions just as fast as you can ask them. Spacify: "Split on empty, join with spaces." Done. String.spacify: "Attach that function to String.prototype and call the split/join on `this`." Done. And so on. It does serve as a way to test if they can actually write code, but my guess is that there's not that big a difference between talking through the code you'd write and actually writing it. I'd be very comfortable with going through this verbally, but I'd be horrified to get an interview like this where they expect me to type code and talk to them while doing it. I'd honestly much rather have a whiteboard than a laptop—at least I'm used to writing with a pen while someone judges me. The laptop would just take away that comfort and make sure my brain turns off. Am I alone in that?
- duiker101 13y agoI think it's better to use the laptop because that is the "language" I should be mostly comfortable with to be a good candidate, unfortunately I am not half as good with expressing what I would do. I would be also pretty nervous which obviously won't help. Instead typing could make feel more secure.
- erikpukinskis 13y agoThe split on empty thing seems silly to me. It's a hack. If you weren't familiar with the specific javascript implementation, you might expect split to return ['hello world']. It's a nice hack, but it's a hack. It's something you can do if you offhand know about that quirk of split.
- bulatb 13y agoAlternatively: "Iterating through the string, take each character and dump it plus a space to a temp string. Return the temp string trimmed." I wouldn't say that's any worse, especially in this scenario. But they should get it just as quickly. Edit: trim the string. :)
- jaredsohn 13y ago
- jwarren 13y agoIt's interesting that the new definition of a front-end developer is increasingly JS first, HTML/CSS second.
- hcho 13y agoBootstrap and the like made HTML/CSS a second class citizen for business apps for a while now.
- jiggy2011 13y agoI guess HTML/CSS is something that can be done by a non programming designer, so if your team is large enough to have separate back-end devs , front-end devs and designers it's more important for the developer to be able to manipulate CSS than design it from scratch.
- michaelbuddy 13y agoyeah most front end devs I'm familiar with are layout first, and just have to hammer on the JS until it works. I like the front end engineer title for JS first.
- revelation 13y agoA lot of that stuff sounds like "my favorite list of code smells and anti-patterns". Yes, it's cool you know these things about JavaScript, and now please never use them.
- yeukhon 13y agoIdeally the candidate has a really full GitHub 'resume', and we can just go back through their open source projects together. Note not everyone is a Github user. Some brilliant Python projects that I use are still hosting on Bitbucket and/or Google code (and of course some on sourcegeforge) so we should be careful with that. I will assume OP is making an alias rather than excluding other service providers, though it is important to keep that in mind (in particular, if you are implementing a form with a field "github profile", please provide either a drop-down menu or a general field with multiple textboxes) Combining the rest, I can consider this almost a Javascript tutorial for experienced programmer. Bravo on the neat, concise writing.
- meerita 13y agoI guess he meant Githug or other places where he can dig on code. I have Github, Bitbucket & Google Code accounts too.
- davedx 13y agoOf course. Most programming interviews I've had over the years have asked for code samples. Github is just the first thing people think of, but companies will always in my experience ask for you to email them some code samples if you don't have a Github account. Although there's an argument to be made that owning a many-starred project or contributing to a big OS project is also an indicator :)
- taude 13y agoI've never once had a company ask for a code sample. What's the point in that? Lazy lame candidates will just go copy something off the internet.
- frankzinger 13y agoThat is why people say 'get them to walk through their code'. Also, it's not that easy to fake a project's complete git or other VCS history.
- jiggy2011 13y agoYou could probably skip most of these questions by asking "Did you read and understand 'Javascript the good parts'?"
- CmonDev 13y agoMisleading title: it's actually just about interviewing JavaScript developers.
- danceonfire 13y agoIt's about interviewing Frontend _Web_ Developers. I don't think someone who cannot write JavaScript can call himself a Frontend Web Developer.
- michaelbuddy 13y agoI guess front end designer then? Given that a complete javascript knowledge is encyclopedic, I'd say that you have to allow for a very wide gamut of experience for this. What about the front end web developers who can't seem to create original designs, they fight the design and artwork part as much as a layout designer fights with javascript. This isn't so cut and dry. Plus with the javascript libraries you can get quite far without writing your own js.
- CmonDev 13y agoNever mentions 'Web' in the title.
- danceonfire 13y agoThat is exactly why my parent and I are correcting the title based on the content.
- retrogradeorbit 13y agoWhat about coffeescript, or clojurescript, or any of the hundreds of other languages compiling to javascript and targeting the browser?
- randallsquared 13y agoWhat happens when there's a problem at the interface between your favorite compiles-to-javascript language and javascript? If you don't know javascript, how are you going to debug and/or fix that? I've never used coffeescript or clojurescript, so maybe they're so thin that this never happens?
- wooptoo 13y agoThe greatest thing about this article is actually the link at the bottom: http://bonsaiden.github.io/JavaScript-Garden/ http://bonsaiden.github.io/JavaScript-Garden/ Great resource.
- martin-adams 13y agoWhat's missing in the article for me is the ratio of candidates who scored well. I've learnt that you can have some excellent developers who get excluded which half a day of training when they start can bring them up to speed. In my experience, interviewing is a costly process and being too particular can simply mean you don't find the right candidate. Companies which have a brand reputation that attracts talent can get away with this, but smaller more unknown companies sadly can't.
- jaredsohn 13y agoI like how the article suggests letting applicants bring their own laptops (and only using the interviewer's laptop as a fallback.) Many people don't realize that is pretty hard to work on someone else's computer, especially in a stressful situation. (Different installed software, software configuration, keyboard, etc.)
- invalidOrTaken 13y agoI had a remote interview this morning using etherpad, and I was surprised how hard it was without emacs bindings. You'd think that because not everywhere has them (like, say, this HN comment box) it would be easy, but apparently when I'm typing code I really feel it. It really is the little things.
- jbeja 13y agoAgree, on my first ever interview i didn't bring my laptop and the interviewer let me use his, it was so hard because he has Windows in it and i am used to Linux, the editor was Sublime Text and i am use to my own configured Emacs, he was using a GUI tool to create the database when i am use to the command-line for such tasks, at the end that make the interview a lot harder to pass.
- csixty4 13y agoLast time I was involved in in-person interviewing, we told people to bring a laptop with whatever software they were most comfortable using for development. Or, we could provide a freshly-formatted Windows XP system they could install things on if they didn't have something they could bring. Worked out pretty nicely, and definitely made people more comfortable.
- michaelbuddy 13y agoI'm curious to assess if people separate front end designer / dev with front end engineer. I just don't know too many people with a rich design / artwork talent as well as heavy javascript programmer mind. Maybe I just don't know enough people. I suppose when you have a massive web app, you call your people front end enginers because there are twenty of them and they don't have to create an entire UI, they have been able to focus on specific issues and manipulating the DOM.
- dave_sid 13y ago"proxies its string argument to console.log()" - Think it's delegation rather than proxy. A proxy would have the same interface as the target.
- criswell 13y agoI understand all of these things when I use and see them, but when I have to call them by name I'm screwed.
- csixty4 13y agoIt doesn't get easier. I was taught C++ in college without terms like "encapsulation". It was just "hey, you can make one of the variables in your object hold another object, isn't that cool?". Took me almost ten years to sit down an learn modern OOP jargon, just in time for OOP to start falling out of favor.
- club7g 13y agoI don't mean to be pedantic; well actually I do. The spacify solution is incorrect as the sample suggests that a blank space is not replaced with 2 blank spaces. A correct solution would be: function spacify(input) { return input.replace(/([^ ])/g, '$1 '); }
- himal 13y agoActually, there are two spaces in the given example output as well. Additionally, you could also use, function spacify(str) { return str.split('').join(' ').replace(' ',''); } to remove the additional space.
- club7g 13y agoYep 2 spaces was the intention, where as the original implementation yields 3 spaces. My codes failure is that it appends a blank space to the end... I guess the real take away here is that there are many ways to achieve the same outcome. Knowledge of quirks is not essential. I would think the most important first step is understanding the requirements, what sort of performance is acceptable given the intended usage, coding for maintainability and ease of usage. For example, the solution for ensuring getCount has the proper context requires knowing how getCount was implemented then taking extra steps. A better solution may be something like this: var User = { count : 1 }; User.getCount = function() { return User.count; }
- thomasfromcdnjs 13y agoI would have done var spacify = function (s) { return s.match(/\w/g).join(' ') };
- hising 13y agoMy take on questions like these are that they most of the time focus on putting the focus on some niched skillset of the interviewer and has very little to do with real life problem solving. If a company hire based on how well a person scores on some niched test, I guess they will end up with a lot of internal nitpicking among the developer on who solves some obscure array sorting algorithm the smartest way instead of focusing on getting shit out the door.
- garethadams 13y agoAnd any interview technique that involves "real world" problem solving is criticised for being too contrived. And any interview technique that involves the candidate actually working on production code it criticised for being exploitative and effectively slavery.
- wturner 13y agoI would have got number 2 wrong. I would have assumed that adding to the prototype of String is hands down completely unacceptable bad practice.
- davedx 13y agoYou should say that. "This is how I would do it, but I would strongly recommend against doing this in a serious project of course because [reasons]"
- taude 13y agoThe problem with interview questions like this is that it looks for code-monkeys. I'd maybe have questions like this if I were hiring an expert consultant to crank out some short-term JavaScript for me, but for filling a slot on the team....probably not....as there's really about 10 other things I'm more interested in (assuming they have the necessary technical chops, which I feel these questions don't really answer). "At this point, if the candidate is doing really well, I'll ask them to implement currying arguments." Why? If they've already proven enough tech knowledge to do the job, why continue to ask more questions that might/might not use to server your hiring decision? (It sounds like you'd continue a different direction if they couldn't implement with currying). EDIT: I'd probably not be really hiring a short-term consultant like this either, though, now that I think about it.
- feulix 13y agoLots of these comments are the reason I read HN. I love an educated discussion, especially as a response to an article with breathes pretentions like this one.
- taude 13y agoNote: these questions aren't related to the article, but at sourcing.io who's blog is writing content. I'm trying to figure out how sourcing.io gets it's developers. As a techie, there was no obvious way for me to put up a profile or anything. There's an explanation that it uses the companies team's social networks, so maybe the employees have to share all their specific account profiles with the company (see below on more on this). How does this differ from something like TalentBin that scrapes together peoples various social profiles and aggregates them into a single "report/summary"? Also, do employees really give up their social graph to their employer? I keep mine pretty tightly locked away. I've built it, maintained it. I might or might not be with the company in six months (They might lay me off. I might get a better job.) Occasionally, I've dug into mine to find someone when one of those emails is sent around mentioning a hiring bonus for a certain position. Or when I need to hire someone directly. But I still don't openly share mine.
- Thiz 13y agoThe most important skill in a programmer is his search ability. I don't know anything, but I know where everything is. And I know how to search for it.
- douglee650 13y agoin light of the spirit of your post, i would like to point out: - segway: a personal human transporter - segueway: a transition from one topic to another
- strictfp 13y ago>> My interviews are very practical Cue list of the most obscure js tricks and gotchas the interviewer knows. Nice one.
- flipstewart 13y agoSeems strange that the interviewer would be so pedantic while showcasing their own lack of understanding... for example: "How they choose to center content inside the overlay is also revealing. Some of the candidates might choose to use CSS and absolute positioning, which is possible if the content is a fixed width and height. Otherwise may choose to use JavaScript for positioning." First of all, JavaScript... just... no. Stop. Secondly, hey, you don't need a fixed width or height, you just use: position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); I would really challenge the writer and anyone else interviewing for any position to consider that maybe they don't know everything.
- wkdown 13y agoIt seems as if the "github resume" is becoming more commonplace. I am married with a 2yo son. I currently do not have time to contribute to open source projects, and my company does not use git for versioning its codebase. Will having an empty github account effect me adversely these days?