Live data from Hacker News

When hiring developers, have the candidate read existing code

freakingrectangle.wordpress.com

21–30 of 565 posts

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

#21
post #10

Earlier quoted context omitted.

Unfortunately, not everyone has time or desire to work on personal projects. Being an engineer outside of work should not be a pre-requisite to being one at work.

That's pretty weaselspeak.

>>That's pretty weaselspeak

as a more concrete example, as I get older I'm less interested in working on the computer off hours. I've noticed I don't even play video games as much as I used to. I actually started doing wood working a couple of years ago, and playing with 3d printers. It does go in fits and starts though - sometimes I get an itch to play with something just for fun...

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

#22
post #3

That's interesting, I've never heard testing code skills by reading instead of writing. An example would have been nice though, as I'm not sure how to find a piece of code that does something standalone that is too large to grasp in 20 minutes yet make a reasonable prediction at the output. That combination seems kind of weird. I wonder how well it would work to modify OP's idea and present a candidate with some code…

Good idea. I'm not sure I know arg parsing libraries in every language though. Even so, hopefully talking about where to make the change and finding some good documentation on an arg parsing library would be good enough start for 20 minutes.

> I'm not sure I know arg parsing libraries in every language though.

In my opinion, you should be free to look that up: that's what you'd do on the job as well. I also google it every time I need to use arg parsing in literally any language because I need it fairly infrequently, and frankly that's how this code came to be: too lazy to look it up again, too easy to write myself, and enjoying the writing of code. Any other solution would also be fine, this test would be about seeing if you can read and write code rather than if you come up with the (what the interviewers think) is the perfect solution.

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

#23

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.

That sounds terrible. That just implies, "if he doesn't have an amazing interview now, he's definitely an idiot".

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

#25
This is my standard practice - I give a real world data fix script that has been simplified to understand and comment on in 20 minutes. The interviewee is the code reviewer before it gets run in production. It covers things like performance, security, typical syntax mistakes, and working with sensitive data. The best part is actually not the script, but the stories it triggers about past challenges.

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

#26
My one big tip: One vice that I see among hiring managers is an unwillingness to ask tough follow-up questions. If you ask a question and there is any vagueness in the answer, you need to drill down deep until all vagueness is eliminated, so you understand exactly what the person knows. Follow up on what's said, but also follow up on what is not said.

Here’s a real-life example. I asked a recent applicant (for a fullstack software job, where we were hoping to hire a novice-to-mid-level engineer):

Me: How would you improve a situation where a page is loading slowly and you suspect the problem is related to the database?

Applicant: Well, I’d start by checking the HTML, is it correctly done, and then the CSS, is there any redundancy? And then the Javascript, is it correctly written, is it minified? Can we speed that up at all? Check the timeline, the API calls, see what is slow.

Me: Okay, great, that’s a good start, but what else? If the problem is not on the frontend, then what?

Applicant: Uh, well, then, I guess I need to look at the backend database model code. Is my database model code concise? Am I fetching the data needed, without any excess?

Me: Okay, great, that’s a good start, but what else?

Applicant: Uh, what else? Well, uh, we really need to look at that database code. Is the model bloated? Can we slim it down?

Me: Yes, okay, you basically said that already, anything else?

Applicant: Uh, well … uh, you need to check the HTML and the CSS and the Javascript and then, uh … API calls … uh ... the model code, make sure that is cleaned up. That needs to be lean.

Me: Yes, okay, but you said all of that already, anything else?

Applicant: Uh … well … the model code … and uh …

Me: Have you ever worked directly with a database?

Applicant: Uh … not much?

Me: If you get unexpected results from your model code, do you know how to debug the query?

Applicant: Uh … I guess I could … not really.

Me: Have you ever looked at the “slow query” log?

Applicant: Uh … no?

Me: Do you know how to run EXPLAIN or ANALYSIS?

Applicant: Well … uh …. no.

Me: Have you ever written SQL by hand?

Applicant: Uh … no.

Me: Are you aware of any differences in dialect between the SQL of MySQL and the SQL of PostGres?

Applicant: Uh … no.

Basically, they were somewhere between a novice level and a mid-level engineer, so they knew the frontend reasonably well, but they didn’t know a thing about databases. Which was okay, because that was what we were looking for. We still hired them and they turned out to be great in some areas, and they were eager to learn about the things they didn't already know. But obviously, if I'd been hiring a senior-level engineer, and it turned out they knew nothing about databases, that would have been a problem. The crucial thing is that I kept asking the question, over and over again, until I had the full answer. In this case it was easy, but sometimes it can feel aggressive, asking the same question over and over, which can leave either you or them feeling uncomfortable. But you will never be any good at interviewing people until you learn how to tolerate uncomfortable moments. The goal is to find out if you want to hire someone, without wasting their time or yours. And asking questions like this, directly, and digging deep, is a much faster method than handing out homework assignments and then waiting a few days for them to complete it, then reviewing it yourself, then discussing it with them. And such direct, factual questions, as above, are at least as objective and as any “objective” test that you might invent.

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

#27
post #10

Earlier quoted context omitted.

Unfortunately, not everyone has time or desire to work on personal projects. Being an engineer outside of work should not be a pre-requisite to being one at work.

That's pretty weaselspeak.

You don't have kids, do you.

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

#28
post #14

This is exactly what I started doing at my company a few years back. You are presented with a complete app written in the stack we use. This app has some bugs we will solve to get it working (nothing that's a trick... actual, commonly encountered bugs that have all the error messaging you need to solve them). Once it is working you will walk me through a particular flow of the app, explaining what is going on and why…

"Bugs we will solve" seems to imply there's still a coding component. Is that correct? That's a different thing from what OP describes (and FWIW I'm pretty sure I like yours better).

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

#29
post #21
post #10

Earlier quoted context omitted.

That's pretty weaselspeak.

>>That's pretty weaselspeak as a more concrete example, as I get older I'm less interested in working on the computer off hours. I've noticed I don't even play video games as much as I used to. I actually started doing wood working a couple of years ago, and playing with 3d printers. It does go in fits and starts though - sometimes I get an itch to play with something just for fun...

I think swayvil's original point was that you could still speak of work you've done in the past. They said 'show' and 'personal', but I wouldn't take that so literally if your favorite project wasn't personal. Even if under NDA, and I'm a security consultant so I know all about those, usually it's still possible to discuss the general problem being solved and how you solved it, and have a good conversation about that.

That said, I do find this hard in interviews (when asked about past experience) and prefer to just be given a web application riddled with every type of bug and try to bingo them all in the time given to show that I understand them all. That one was my favorite interview. But that might just be a different style of interview for a different type of job.

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

#30

My one big tip: One vice that I see among hiring managers is an unwillingness to ask tough follow-up questions. If you ask a question and there is any vagueness in the answer, you need to drill down deep until all vagueness is eliminated, so you understand exactly what the person knows. Follow up on what's said, but also follow up on what is not said. Here’s a real-life example. I asked a recent applicant (for a full…

This is a "Guess what I'm thinking" question.

Non-psychic candidates will struggle with this challenge, so you might find it produces some false negatives.

Since you already seem to know so much about debugging slow performing database queries on your particular RDBMS stack, though... what was your thinking in looking to bring on board someone else who duplicates that exact knowledge?

Oh, and it'll be a missing index. It's always a missing index.

Post reply on HN