3 ms·
I once had a job interview where they wanted to evaluate my C knowledge. They showed me a printout of some pointer arithmetic and said spot the bug. (It may act
by bjackman 5mo ago
I once had a job interview where they wanted to evaluate my C knowledge. They showed me a printout of some pointer arithmetic and said spot the bug. (It may actually have been the old puzzle where it turns out that /* is always a comment opener and never a division by the referent of a pointer).
I said "well first, this is a mess, I'm putting parentheses here, here, here and here". They said "well you've fixed the bug but can you tell us where it was?"
I gave them a hypothesis but I said my "real answer" was that it's not worth our brain cycles to figure it out, you just shouldn't write code that requires knowing operator precedence. It's just such desperately boring information that I can't hold it in my head.
Interviewing such an insufferable smartarse was probably quite annoying but they did give me the job and I do stand by the underlying principle!
- SoftTalker 5mo agoI've never had to write or read code in an interview. I wonder how common that is?
- bjackman 5mo agoIt's very common, I believe all the Big Tech firms have you write code. I think the example from my story was the only one I've had where I had to _read_ code. (I have heard of people doing "code review interviews" though). I've also had a job interviews with no code though. For startups or non-FAANG type companies.
- Groxx 5mo agoLiterally all of them, for at least the past decade, afaik. Obviously it'll vary a lot outside those though, the field employs all kinds in all kinds of ways.
- r_lee 5mo ago> I gave them a hypothesis but I said my "real answer" was that it's not worth our brain cycles to figure it out, you just shouldn't write code that requires knowing operator precedence. It's just such desperately boring information that I can't hold it in my head. this is exactly how I think. and it goes for a lot of stuff in general, we have limited bandwidth and wasting it on useless stuff like this has no real purpose. yet sometimes I see people show off about how they know how to deal with it but I just don't see the point.
- oleganza 5mo agoYour response was more correct in a professional sense than producing the piece of knowledge you've been asked for. I'd prefer to work with people who value everyone's time and write programs accordingly. If the interviewer was looking for a valuable expert, they were lucky to get you on board.