News for hackers. Stuff that matters.
Re:Things I Learned from a Job Hunt for a Senior Engineering... by thomascgalvin on Tuesday April 24, 2018 @03:33PM (#16915823)
CSV is really fucking hard to parse. There's tons of edge cases. "I'd just use a well-known, well-tested library" is a very valid answer.

One of my go-to questions is "sort this array", and if the candidate types `Arrays.sort(input)` they get bonus points, because it shows they have useful knowledge of the language they'll be writing in.

Re:Things I Learned from a Job Hunt for a Senior Engineering... by always_good on Tuesday April 24, 2018 @07:41PM (#16917643)
Here's how their scenario would actually play out:

    > I took my sunglasses off, looked him dead in the eye,
    > and said "Why? Why write your own method in
    > a vanilla language? Give me a good reason."
Interviewer: "To see how you might approach it."

It's a synthetic interview question. Why does it suddenly need to be a production-ready CSV parser?

We don't have enough information to say whether these are bad interview questions, and it's really not the point.

Maybe the interviewer just wanted to see if you'd use good fd hygiene (`with open('file.txt') as f:`) and that you can stub out some toy parser code and speak of it intelligently. And that you wouldn't throw a fit when asked to write some code that a library like `npm install fizzbuzz` can already solve.

Re:Things I Learned from a Job Hunt for a Senior Engineering... by ascorbic on Thursday April 26, 2018 @02:13AM (#16929232)
That's a bit unfair. I agree that Array.sort is the best answer, but array sorting is such a classic interview puzzle that most candidates will expect that that's what you want. So instead of the bonus answer, they'll slog away trying to remember the algorithms that they learnt at uni years ago (or codecademy last month).