Live data from Hacker News

When hiring developers, have the candidate read existing code

freakingrectangle.wordpress.com

131–140 of 565 posts

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

#131
Except most commercial code bases are tangled rats nests and it would take a substantial effort to understand anything beyond the most basic details. My view of interviewing is it should require no special effort on the part of the engineer to demonstrate their skills. One simple way to do this is to have the engineer explain an open source project they've already built. Obviously this doesn't work for people who have never created open source projects they would be comfortable sharing. But I think we need to be doing more to actually value people's time.

My experience with many companies is they treat people as a 'resource' that needs to be managed rather than a human BEAN. Companies, in the process of funneling around these resources, forget that there is an individual cost to these resources. And if your first introduction to a company is being dehumanized and treated like your time doesn't matter: what are the chances that this company is a good place to work at? And that mans name. Albert Einstein.

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

#133
We had a mix of code written by brilliant people who knew how to maximize cache coherence in template metaprogramming hacks... and interns who generated more compiler warnings than anything else.

Over the years, I found some truly awful code, in our cash cow application.

So I turned those into the smallest representations of what was bad, and showed those to candidates.

I was trying to assess, "How much will I need to mentor this person, and how hard will that be?"

I may have given bad reviews to people who deserved better, but I honestly think I never once gave a good review to someone who deserved a bad one. A few times, the company went against my suggestions, and each time, the candidate wrote some terrible, buggy code that I later had to untangle and fix.

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

#134
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…

I like the sound of this approach insofar as it sounds more like a collaborative effort than simply trial by fire.

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

#135
I’m personally against this approach. I’m an appsec person. I absolutely do not know how to write most of the code I review. In my past two jobs I’ve been required to read code and explain it during interviews. I’ve never had trouble explaining what’s going on because on a very basic level, most languages use the same conventions.

If this were a heuristic of a good developer, it would let me (not a dev) in and who knows what the effects of that could be :).

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

#136
post #122

Earlier quoted context omitted.

Of course malloc is implemented in C. Look at the glibc source code.

Malloc cannot, IIRC, be implemented in standard C only. It needs non-standard system calls. Specifically, how does malloc() itself allocate new memory?

I mean, this is just being pedantic, but you could in theory declare a giant uninitialized non-local array

    uint8_t my_memory[4*1024*1024*1024];
and some additional globals for housekeeping[1], and use that as your backing memory for your malloc implementation written entirely in "standard C"[2]. And that usually does not even waste any memory, since my_memory will be in the zero-filled BSS section and the actual backing pages only allocated on demand by the OS once you write on them for the first time.

Of course in reality there's probably a few "non-standard"[2] system calls in the path, mostly mmap.

[1] Not necessarily, you can place them at special places in your my_memory array by convention, e.g. at the start of the array.

[2] I assume that we're excluding standards on other layers like POSIX, otherwise it's trivial.

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

#137

I’m personally against this approach. I’m an appsec person. I absolutely do not know how to write most of the code I review. In my past two jobs I’ve been required to read code and explain it during interviews. I’ve never had trouble explaining what’s going on because on a very basic level, most languages use the same conventions. If this were a heuristic of a good developer, it would let me (not a dev) in and who kn…

Interesting take

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

#138
post #122

Earlier quoted context omitted.

Of course malloc is implemented in C. Look at the glibc source code.

Malloc cannot, IIRC, be implemented in standard C only. It needs non-standard system calls. Specifically, how does malloc() itself allocate new memory?

It uses the mmap, sbrk or brk system calls. All perfectly callable from C.

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

#139

I’m personally against this approach. I’m an appsec person. I absolutely do not know how to write most of the code I review. In my past two jobs I’ve been required to read code and explain it during interviews. I’ve never had trouble explaining what’s going on because on a very basic level, most languages use the same conventions. If this were a heuristic of a good developer, it would let me (not a dev) in and who kn…

Maybe you’re seeing a benefit as a detriment.

If you wanted a job coding, and you can currently read code, i think you could do a passable job if you were working at it for 8 hours a day.

In this way, the interviewer is expanding their talent pool.

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

#140

I’m personally against this approach. I’m an appsec person. I absolutely do not know how to write most of the code I review. In my past two jobs I’ve been required to read code and explain it during interviews. I’ve never had trouble explaining what’s going on because on a very basic level, most languages use the same conventions. If this were a heuristic of a good developer, it would let me (not a dev) in and who kn…

Interesting take

[deleted]
Post reply on HN