Live data from Hacker News

When hiring developers, have the candidate read existing code

freakingrectangle.wordpress.com

71–80 of 565 posts

Re: When hiring developers, have the candidate read existing code

#71

When I did interviews @ Google (I only do hiring committee work now, thank god :-) I usually asked questions around bugs I added to an existing codebase, to see if the candidate can avoid the pitfalls I ran into by making bad assumptions. As I'm a pure C coder, my starter question was usually something like: a). What does malloc(0) return ? b). Why does it do that ?

Huh. My first answer was "I don't know", and then I googled it and apparently it's implementation defined. So...my first answer was correct? :)

True, it's implementation defined. But almost all implementations choose one of the two options. There is a reason for this.

FYI. I introduced a (bad) security bug into Samba a long time ago by expecting the wrong return (i.e. the one the implementations never return :-).

Re: When hiring developers, have the candidate read existing code

#73

I sometimes ask candidates "what kind of interview do you feel would best bring out your strengths?" and try to adapt the interview to their response if I can. It's helpful if they want to talk about side projects or war stories, but doesn't pressure them to. I still give my coding challenge after. Wonder why no one else does this.

Quoted post unavailable.

> where I'm supposed to talk to some HR girl instead of an equal

There's no need to be demeaning to people (not just "girls") who work in HR.

Re: When hiring developers, have the candidate read existing code

#74

I think we should just jump to the end game and make interviewees do ultra man triathlons while solving differential equations. Then at the finish line, they knife fight each other to find the one we let go to the next stage in the interview. That way we can be sure who has stamina and the best competitive programming problem solving skills. Something like squid game will truely find the A players. I mean, we wouldn’…

The only unbelievable thing in your statement was "oviously /s".. I read that and thought.. someone is taking notes.

Re: When hiring developers, have the candidate read existing code

#75

I like this approach. Far to often I’ve interviewed at places and been grilled by the interviewer only to find out when you start the quality isn’t great, what you where grilled on you won’t be working on “as that’s to hard” or “we don’t do that” despite being grilled on it and the level of skill not to great they just want senior people. It’s the bait and switch. At least being taken through existing code you know w…

> Bonus points for no PR’s and trunk driven development as that shows a very mature team. I'm not sure what Trunk Driven Development is, could you elaborate?

https://trunkbaseddevelopment.com/

Re: When hiring developers, have the candidate read existing code

#76

Earlier quoted context omitted.

I'm not anything other than a C tourist, and I see that the man page says it returns either NULL or a "unique pointer value that can later be successfully passed to free()." I'm kind of at a loss about why it can return either of those two things, somebody want to take a shot at explaining it?

Both NULL and a unique pointer value can be safely passed to free() :-). Answers to this question taught me about the candidates taste and understanding of good API design :-). Both NULL and "unique pointer" are correct answers, but all modern implementations only chose to return one of these. My follow-up question is "why ?" :-).

Candidate answers to this also tell me if they understand anything about malloc implementations, which is a very useful skill to have as a C coder.

Re: When hiring developers, have the candidate read existing code

#77

I like this approach. Far to often I’ve interviewed at places and been grilled by the interviewer only to find out when you start the quality isn’t great, what you where grilled on you won’t be working on “as that’s to hard” or “we don’t do that” despite being grilled on it and the level of skill not to great they just want senior people. It’s the bait and switch. At least being taken through existing code you know w…

Why no PRs?

Re: When hiring developers, have the candidate read existing code

#78

When I did interviews @ Google (I only do hiring committee work now, thank god :-) I usually asked questions around bugs I added to an existing codebase, to see if the candidate can avoid the pitfalls I ran into by making bad assumptions. As I'm a pure C coder, my starter question was usually something like: a). What does malloc(0) return ? b). Why does it do that ?

I find questions like this lack an on-ramp. Either you know or you don't. If you don't it gives you 0 indication of the skills.

I once flunked a faang interview because the interviewer mispronounced (or used the correct pronunciation I was unfamiliar with) of "arp protocol"

I had no idea of what was being asked and was racking my brain for something I didn't think I had ever used to down every computer in the library of my high school 12 years before.

Re: When hiring developers, have the candidate read existing code

#79

Earlier quoted context omitted.

Is it not for you? I’m at least 10 times faster at reading code than writing code.

Does "finding the source of a bug" and "figuring out the correct thing to write to fix a bug" fall under reading the code or under writing the code? I feel like the answer to those questions determines which is faster. One may say that you only compare (lines_read / time_reading) and (lines_written / time_writing) to find an answer, but if we remove all "time spent thinking" from both then it kind of feels like a mea…

I’m spend much more time thinking about what I will write than I do thinking about what I’m reading. In any case my reading is far faster than my writing.

Re: When hiring developers, have the candidate read existing code

#80

I think we should just jump to the end game and make interviewees do ultra man triathlons while solving differential equations. Then at the finish line, they knife fight each other to find the one we let go to the next stage in the interview. That way we can be sure who has stamina and the best competitive programming problem solving skills. Something like squid game will truely find the A players. I mean, we wouldn’…

[deleted]
Post reply on HN