Ask HN: Do interviewers expect this much expertise or am I that bad a programmer?
Hi everyone,
So I recently had an interview at a unicorn startup for a software developer position (SDE3 as I recall). I have about 5 years of experience, mostly in php and rails.
It was a programming round. They gave me a problem to code in about an hour. This was the problem (Imgur link) :
http://imgur.com/gallery/osqJx
It was expected that there shouldn't be any data loss.
I have no professional experience in Java, and my CV was quite clear on it.
Do I have to prepare myself for this kind of stuff? I’m not in the valley but is this the general expected standard? I was quite stunned that I had to code this in an hour, really wasn’t expecting this.
11 comments
[ 2.8 ms ] story [ 41.1 ms ] threadTheir test was written for Java before they contacted you for an interview. They think everyone knows Java, and that is not always the case.
Writing the code in an hour is very hard to do and follow all the guidelines as well. You'd have to have a photographic memory on Java and how messaging works.
For a candidate with 5 years experience, if I was the interviewer, I would expect you to plow through this problem with ease, even on an awful whiteboard. The reason is that pub/sub is one of the systems that are quite important to know and understand for non-trivial enterprise applications. If you understand it well, you should have no problem in implementing a basic solution within an hour.
I'm a big proponent of the idea that one shouldn't have to prepare for an interview beyond the curiosity of what the potential future employer do and which technologies do they use.
Maybe you're really good at what you do and the question asked is too different from the kind of problems that you've been working on in the past few years. Are you good ? I don't know. I don't know you. Moreover, failing one interview does not answer that question for you. Neither is failing at 2 to N interviews...
I've written threading and worker queue code in Java so I can kind of "see" what solution they are aiming for. But they are specialized domains, so if you have mostly written web code, you won't have had any experience with them.
Never the less, if you work on this problem in Java and you write a thread-safe solution, you will become a better programmer for it.
One thing I may have pushed back on is "the requirements say this should be thread safe, but it does not say it must use threading. Can the server be single threaded?". If they are ok with that, writing an async IO server in a language geared for it would make things a bit easier (Erlang, Go, Python + Gevent, Node, etc). If feeling cheeky, you could ask if you just write a basic server sitting in front of Redis or using 0mq since the specs did not explicitly disallow 3rd party libs or apps.
At the end of the day, this may be one of those problems where they see how far you get, and don't expect most candidates to finish in 60 mins. It could also just be not the best test question relevant to the job you were applying for. I think it's fair game for anyone w/ previous experience writing low level networking code and servers from scratch, which is generally not what PHP/Rails devs are doing.
I tried this in java anyway and didn't get very far. Defined the classes for publisher, consumer and queue. Then was grilled about the reliability and all the other requirements.
This blog post does a pretty good job of describing the problem:
http://bravenewgeek.com/you-cannot-have-exactly-once-deliver...
I would not feel bad about missing this question. Distributed systems are hard!
Java is just to make their own life easier, because they readily know the Java solution.
I once interviewed at a game/graphics startup and they asked me to implement a non-trivial graphics algorithm in a take-home test. I completed it successfully, but only because I've done graphics programming for decades, and in fact had implemented this very algorithm just months before in a side project. Someone without experience in that specific area of graphics programming would probably not have passed.