3 ms·
Well this is exactly like a test I went through at one time. It even used the same reasoning pretty much. The job was fullstack node and react, I went in and t
by bryanrasmussen 7y ago
Well this is exactly like a test I went through at one time. It even used the same reasoning pretty much.
The job was fullstack node and react, I went in and they said we want you to look at this game written in Python which is really slow and tell us what is wrong with it (I hadn't done python in years and back then wasn't very good at it). We will sit with you. I said I was game, they said lots of people weren't - one guy evidently got offended and said he didn't do that language (I can definitely think of one friend of mine who is totally competent who would get offended at being asked to work in a language that did not have anything to do with the job he was applying for)
The game was using a big dictionary in an array and you had to look up words from it and it was slow (about 7 minutes to do searches). So I thought to myself, damn I cannot remember the name of that algorithm for this (binary search), ok let's stall a bit maybe I will remember the algorithm name.
So what's the first thing you would do?
Uhm how about checking a profiler.
So we checked and found some simple things we could optimize.
And then I looked through the code and I saw there were parts I could cache etc.
So after all those things were done the time to do a search was a little bit more than halved and I still couldn't remember "binary search", so I stared dumbfounded at the screen for I think about a 3-4 seconds and I started to say "uhm" and then the guy sitting with me I guess ran out of the time he wanted to spend and said "ok well there is an algorithm for this blah blah blah" showed how to do it in python. Thanks for your time.
I actually didn't want the job but still felt somewhat let down that I couldn't remember.
- js2 7y agoIf this was Python 2.1 or later, too bad you didn't check the stdlib: https://docs.python.org/2/library/bisect.html https://docs.python.org/2/library/bisect.html
- marvinjames 7y agoOf course there was pressure, but why not just say that you know an algorithm that can do this faster, but you can't remember the name of it, and then just provide the intuition behind it?
- hellisothers 7y agoIn my experience on both sides none of that matters, also none of the “how do they look stuff up” matters, what matters is did you just know what to do and do the right dance.
- peter_l_downs 7y agoMy experience has been the exact opposite.
- mixmastamyk 7y agoMost interviews and interviewers are poor, meaning jump thru ten hoops, miss any and disqualified. Highest score wins.
- bryanrasmussen 7y agobecause then I had to go through explaining the thing the algorithm did and I didn't necessarily want to do that, I just wanted to remember the name so I could say there is an algorithm named X for this case. At any rate that was why I said the last uhm, because I saw no other way and I was thus ready to go the long route, but then I guess I was out of time.
- mcguire 7y agoDon't feel bad. I completely lost the word "virtual" in a C++ interview once. Yet another interview where I looked like an idiot.
- shantly 7y agoYou're not alone. At this point I'm pretty sure the majority of reports that there are lots of people lying on résumés and also being able to convince people in conversation that they know how to write software but who can't actually do [basic programming task] or answer [basic programming trivia question] are just cases of interview-stress-induced stupidity in otherwise competent devs being taken for savvy and insanely competent (but not at programming) grifters who were trying to trick the interviewers. Because I don't believe such ultra-convincing liars are both common and trying for software jobs (fucking why? Go into sales!), in numbers significant enough to explain widespread reports of seeing them in the wild. I think it's the stress of not having any idea what you might be asked about over an unreasonably-wide field of topics, or how you will be judged on your answers, making people forget stuff or act dumber than they actually are, when asked to perform under such (unheard of in real work, "server's on fire at midnight" stress isn't even half as bad and certainly not as adversarial-feeling) conditions.
- perl4ever 7y agoWell, there also might be a selection effect in that most people who are competent and bad at that style of interview find other ways to get hired, so grifters could be at least overrepresented somewhat in those who bang their head against the wall. I have never been hired via a process that involves a technical quiz or in person programming, and the last time around, one such farce was my limit. If I was competent and not able to pass that sort of filter, then I kind of had to find another way.