4 ms·
I've been interviewing pretty much non-stop since last April. I feel like I've become somewhat of an expert when it comes to interviewing processes. First off,
by freework 14y ago
I've been interviewing pretty much non-stop since last April. I feel like I've become somewhat of an expert when it comes to interviewing processes.
First off, as I've become a better programmer, I feel this fact is best shown in my opinions. When I first started out, if you had asked me my opinion of PHP vs Python, I would not have been able to say anything coherent. Now that I've worked with both technologies, my opinion is much more coherent.
Instead of asking puzzle questions, ask candidates their opinion. "What is your opinion of Mongodb?" I've spent enough time in the trenches with Mongo to have quite an opinion of that technology. Same with Postgres, Django, Javascript, Coffeescript, etc.
I think hands down, the worse type of interview questions are the ones where you're told to solve a problem, but you can only solve the problem in a certain way.
Its become a interview idiom for me. One recently was to reverse the words in a string. In comes "This is a string", out comes "string a is This". No problem. In python this can be done with one line:
the_string.split()[::-1]
It takes me 5 seconds to write that out. The interviewer telle me "good job", then he asks me to do it again, but this time to do it without using any standard library functions such as split or reverse.
At this point, I can almost with 100% certainty that this company will be a terrible place to work. It wouldn't piss me off it it wasn't for the fact that like 90% of all interviews I do end up like this.
I've through about this a lot, and what I've come up with for an explanation as to why I can;t do these types of questions is because my algorithm writing process is very subconscious. When I'm writing code and I come to a problem that requires a lot of thinking, I usually stop, do something else and let the problem float around for a bit in my subconscious. I got my best ideas when I'm in the shower, on my bike riding around time, even while reading a news article. When people are watching me (especially strange people I don't even know) I don't do my best thinking. At this point I'd do anything to be able to think in front of people. Because its keeping me from being able to get jobs.
- mattstreet 14y agoI think you're wrong about the 100% bad place to work just because someone asked you to reverse a string without using library functions. I would think your computer science education would have prepared you to plan out such an algorithm. Sadly, its pretty had for a place to confirm you have subconscious skills by asking a question and then waiting for you to come back the next day with the answer once it popped into your head.
- freework 14y agoFirst off, I'm self taught, I don't have any computer science education. Secondly, it wouldn't be too hard to give me an actual problem that the company is actually having, and letting me think about it for a few days, then come back with my solution. Why must all interview problems be made up?
- kragen 14y agoYou mean ' '.join(the_string.split()[::-1]). Which is a totally reasonable thing to do, but doesn't exercise the same kind of thinking as doing it letter by letter. Can you solve it letter by letter, even now that you're not in an interview?
- freework 14y agoDoesn't exercise the same kind of thinking as doing it letter by letter? So what? Solving this problem in haskell doesn't show the same kind of thinking as solving it in PHP, whats your point? You basically saying you have to solve this problem they way I say you have to. Thats a sure-fire way to tell if the company is worth working for or not.
- kragen 14y agoMy point is that there's a difference between the knowledge of how to call a library function and the knowledge of how to write one. It appears that you lack both.
- bearmf 14y agoThe question is not hard if you are allowed to use extra memory: just tokenize into words, put them into array and reverse, then join them back into a new string. It is harder to do it in place. I actually did not believe it was possible until looking up the answer on StackExchange. That solution involves a "trick" which one might not figure out under pressure.
- kragen 14y agoI think you can do it in place with four pointers. The "trick" is somewhat generally applicable.