News for hackers. Stuff that matters.
Re:Tech Interview Handbook by PeterisP on Sunday August 18, 2019 @05:12AM (#20729133)
Your problem actually is a good illustration of the whiteboard test problems.

I just tried it, and it was trivial to do in a minute or two on my laptop. However, I did took note of two syntax mistakes that I made in the python REPL that were immediately obvious there and took seconds to fix, but which I most likely would not have noticed on a whiteboard.

So there's quite a bunch of problems where if the acceptable "format" of the answer is "hey, I'll just pull out my laptop from the backpack and push the solution to github in 15 minutes" then it'd be okay, but it'd be hard to do it while 'whiteboarding' without access to immediate feedback and easily accessible API documentation.

For example, I work in many languages, and for many APIs I can't remember whether in this particular language the same thing is called add or append or something else; e.g. I've worked on Java code for a dozen years and would be a quite productive Java developer, but since I haven't written any new code in Java for quite some time recently, I can't remember off of my head what's the right boilerplate to open a text file for reading in Java - it's something that a Java tutorial might have in the first pages right after Hello world, but I'd still have to look up the incantation to pass the encoding properly - there's like three Reader classes to instantiate and I don't recall their names off the top of my head.

Re:Tech Interview Handbook by deanclatworthy on Sunday August 18, 2019 @08:49AM (#20729867)
Nobody is punishing trivial syntax errors in whiteboard interviews. Nobody is taking your code and checking it runs.

It’s about your approach to problem solving and your ability to communicate that.

Re:Tech Interview Handbook by JustSomeNobody on Sunday August 18, 2019 @12:34PM (#20731213)
Is this really true though? I mean, I've been in development long enough to know that people go just plumb ape shit over the silliest things.
Re:Tech Interview Handbook by davidjnelson on Sunday August 18, 2019 @03:41PM (#20732348)
A cs professor at Stanford that hired at google said they _absolutely_ care if your code compiles and works correctly. This is the “coding fluency”[1] metric. The author of cracking the coding interview also touches on this.

1. https://www.programmercoach.com/2017/04/interview-insider-co...

Re:Tech Interview Handbook by new299 on Sunday August 18, 2019 @06:14AM (#20729342)
Do you think you could rough out an answer on a whiteboard that would have roughly the right structure?

When I used this question I wasn't looking for accurate syntax. If it was a solution that looked like it would work, after some debugging etc. I'd consider that a pass.

Regardless most people couldn't answer it, which I considered surprising.

Re:Tech Interview Handbook by PeterisP on Sunday August 18, 2019 @06:33AM (#20729408)
Sure, the structure is obvious; one was an issue of a method being named differently than I remembered, the other was an off-by-one error that'd show up in testing.
Re:Tech Interview Handbook by new299 on Sunday August 18, 2019 @11:58AM (#20730973)
So, it wasn’t obvious to many candidates I interviewed. For example, one candidate tried to create a solution involving 3 nested for loops.
Re:Tech Interview Handbook by itronitron on Sunday August 18, 2019 @02:00PM (#20731757)
Assuming these candidates already made it past an initial filter it would be interesting to ask the filtered out applicants the same question and see how well they do
Re:Tech Interview Handbook by b3b0p on Monday August 19, 2019 @02:30PM (#20740375)
I also was able to solve it in a couple/few min after seeing the comment. I did have a couple issues, index was off by one, and didn't catch an issue if I had already seen the substring using a brute force nested loop, but otherwise it works (Python). Edit: I also did it without a nested loop using a dictionary. Why I didn't think of this initially I don't know.

I've also had a couple FAANG onsites and get nervous as can be, but that's just a practice more and be more confident with my abilities problem I feel. No offers though yet. Still trying and practicing.