5 ms·
I'd love for you to try to explain to me how it's relevant to my front end javascript to write a moving window algorithm in 45 minutes on a white board. I have
by dclowd9901 11y ago
I'd love for you to try to explain to me how it's relevant to my front end javascript to write a moving window algorithm in 45 minutes on a white board.
I have no problem with thinking engineers should be able to understand and implement algorithms. I have a real problem with thinking they need to know them off the top of their head.
Wouldn't a more reasonable approach be to give an algorithm and ask the person to implement it? If that's what they're actually going to do (since most of us aren't PhDs) day-to-day, and they may more likely find an appropriate algorithm on Wikipedia and implement it, isn't that more relevant?
- stale2002 11y agoGladly! Lets say your software as a service website has a real time analytics graph, so that customers can look at statistics of how much they are using the service in real time. One potential question a customer might want to know is "How many API calls have I made over the last hour". This is a moving window average question, and it needs to be displayed/done on the front end. My company that I work at has such a feature. Algorithms questions come up all the time in javascript development.
- dclowd9901 11y agoThank you for the example, but this is not a generalized problem, and is very specific to your domain, so it would be silly to receive such a question from companies that are not your company, which I have had happen. If I were applying for your company, I would expect to have to implement an algorithm like this on the job, but I don't see why I should have to know it to get the job. As long as I was capable of implementing algorithms as described, wouldn't that be the most important factor?
- chillacy 11y agoHow would you demonstrate that you're capable of implementing that algorithm? Isn't the best way to have them implement that algorithm? (I will admit that this is best done when the candidate has their favorite text editor and internet, and I have had an interview in the past where this was the case, which went well)
- dclowd9901 11y agoI would suggest that you provide the algorithm in process or through formulae, and have the candidate implement it. That's what they'll be doing anyway.
- chillacy 11y agoWhat kind of job do you have where someone tells you the algorithm? I can't imagine my PM saying "Let's count recent events by storing it in a hashmap and using a linked list to track which elements have expired, can you code that up?" Instead, the PM might say "We need a system which can count how many unique events of each type has occurred in the last 100k requests, with small impact to time, high accuracy, and up to 100mb of space" But even that would be unusually specific. It would usually be: "the service breaks sometimes, can you figure it out?" And then the engineers figure out that it's because of unusual event distributions, and they figure out what needs to be done, how much space / time they can afford to do it, etc. For instance, do you trade off accuracy by having a periodic job flush old events out of the map? Do you quantize by time to save space at the cost of resolution? That's what I do at my job, and that's the kind of question I see in interviews. If a candidate is expecting to have the algorithms dictated to them, then I would not consider them to be a software engineer.. coding up a program from a specification would have been a technician's job 30 years ago (now largely automated by compilers, synthesizers (for HDLs), and other tools). The software engineer should be coming up with solutions, which often involve using algorithms and data structures.
- dclowd9901 11y agoAnd, again, I ask "are you under some kind of arbitrary time constraint when you have to create a novel problem solving approach?" Listen, most data theory problems have been solved, but for the ones that haven't, in work, we're asked to come up with a solution, but not in any weird arbitrarily short amount of time. If your goal is to simply know how someone explores a problem, fine I guess. I don't agree with your approach but I can see your point. But if you expect a working implementation, that's unreasonable in my opinion and I believe you'll be rejecting many fine candidates using that method.
- infinite8s 11y agoAnd how would the company know you were capable of implementing algorithms as described? Perhaps by asking you during the interview how you might go about implementing it?
- dclowd9901 11y agoPrecisely!
- tptacek 11y agoWe agree about the whiteboard thing. I'm only pushing back on the argument that these things aren't relevant to front-end.