Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What was your question? Is it “please split a string by whitespace”, and do you accept s.split() as a correct answer?

One google interviewers ask me a question that starts with “implement google search” and ends with my implementing splitting a paragraph. Of course I failed the interview, but I have to think he has failed me way before we get to write any code.



I'd rather not post too many details about the particular question, but it's only slightly more complex than String#split. It has multiple valid solutions, from regex matching to for/while/do&while loops to String#substring. If you have even a basic understanding of your language of choice's standard library, at least one solution is obvious and implementable within minutes.

I'd say about half of the candidates that interview are unfamiliar with the String#substring equivalent of their language. This is for a senior position, and everyone has multiple years of experience on their resume. It's... interesting.


My point is: are you sure the candidates failed because of their programming ability (unable to use substring), or was they confused due to the question itself? It is very easy to get to the situation in a interview where the candidate is just straight up unsure on what the question is about. The candidate might fumble not because of not understanding #substring, but rather whether you would accept it as an answer.

Many people would say those candidates should be failed anyway due to X, Y, Z reasons. But I want to highlight that in those cases, the interviewers should realize they are assessing something else, and not programming skill.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: