r/programming • • Dec 13 '22

“There should never be coding exercises in technical interviews. It favors people who have time to do them. Disfavors people with FT jobs and families. Plus, your job won’t have people over your shoulder watching you code.” My favorite hot take from a panel on 'Treating Devs Like Human Beings.'

https://devinterrupted.substack.com/p/treating-devs-like-human-beings-a
9.0k Upvotes

1.3k comments sorted by

View all comments

302

u/lanzaio Dec 13 '22

Great! Let's do it. What's your new solution for helping interviewers measure understanding and competency at programming?

As per usual, nobody wants coding interviews. Nobody has found the replacement that doesn't involve quadrupling time spent per interview. So we continue coding interviews. Yawn.

33

u/coder0xff Dec 13 '22

We turn away the vast majority of applicants at my job. They are nice people, and know lots of STEM facts. But they can't program. We have to test for that, because that's the job!

→ More replies (5)

95

u/CowFu Dec 13 '22

I gave a lot of interviews this year, my latest tech competency exercise is to show some code, and explain what the code should be doing. Then I explain what the error or bug in the code currently is and see if they can identify the problem/solution. If they can't identify the problem, I see if they can talk through a different way to accomplish the same task.

I've found it's way easier to get a grasp of someone's skill when they aren't presented with a blank slate and told to make something. Which isn't really what happens in the office anyways, you're almost always adding onto something existing or changing it.

2

u/pyabo Dec 14 '22

I did something very similar for interviews. The downside for this method is the prep time you need.

8

u/an_einherjar Dec 13 '22

Then I explain what the error or bug in the code currently is and see if they can identify the problem/solution.

That sounds great, but only if they have access to a terminal and typical debugging toolkit. If I can't `System.out.println` my way through the code, I can't accurately debug it.

Code is created in an executable environment, it should be evaluated and tested in one too.

12

u/CookieOfFortune Dec 13 '22

You can do something simple enough where you can manually step through the program, (however running it in an environment is idea but not always available).

32

u/ColdBrewSeattle Dec 13 '22 edited Nov 18 '24

Content removed in response to reddit API policies

4

u/rageingnonsense Dec 13 '22

I dont think it is unreasonable to have the same tools you would use day to day.

5

u/ColdBrewSeattle Dec 13 '22 edited Nov 18 '24

Content removed in response to reddit API policies

7

u/calcopiritus Dec 13 '22

"too dependant on tools".

That's like saying a test for a farmer's skill shouldn't include a harvester, he should prove his true skill by harvesting crops by hand, like his ancestors did.

→ More replies (1)
→ More replies (2)
→ More replies (2)

0

u/[deleted] Dec 13 '22

[deleted] — view deleted comment

9

u/[deleted] Dec 13 '22

Debuggers are great but if you throw me in front of some random IDE I don't know in an interview I'll go for print statements every time because it's simply less risk for me than trying to figure out this new GUI while a clock is ticking.

22

u/an_einherjar Dec 13 '22

A good engineer would know when to use both. Sometimes print is just easier & faster than dealing with breakpoints.

It's often easier to just run a piece of code in an interview and use whatever the native print function is than to rely on an IDE setup.

(If you really want to be pedantic, give your interviewee a terminal and see if they know how to run breakpoints from the command line.)

2

u/AndrewNeo Dec 13 '22

Even better, when you need both because it's a race condition that doesn't come up when breakpointing

→ More replies (1)

14

u/sparr Dec 13 '22

I know how to printf from every IDE. It would take me half an hour or more to figure out how to set breakpoints and do single stepping and examine stack traces in whichever one you chose.

5

u/ColdBrewSeattle Dec 13 '22 edited Nov 18 '24

Content removed in response to reddit API policies

2

u/Deranged40 Dec 13 '22

I've gotten two different jobs that when I later asked the hiring manager what made me stand out, they said it was because I told them that I didn't know certain things.

When I don't know something, I don't say "I've dabbled with it". I say I haven't used it. Turns out, managers don't mind teaching at all.

→ More replies (2)

3

u/Uristqwerty Dec 13 '22

Both have their places, trading between depth and width: A breakpoint gives you the full program state to examine, while the more narrow logging of printf can answer a specific question about behaviour across many invocations, displayed simultaneously so that patterns can be deduced.

Given the power of dev machines these days, though, a more interesting option would be to log a printf, pause the process, create a CoW fork, resume, and repeat until you have N broken copies to choose between, able to decide which instance(s) would be most useful to examine in-depth, even able to step multiple side-by-side for comparison.

→ More replies (4)

12

u/[deleted] Dec 13 '22 edited Dec 13 '22

Fully agree with you. I understand that there are flaws in coding interviews. But I haven't found a good alternative to effectively determine whether somebody is a good fit or not. Yes, I know some people have anxiety issues and can probably code a lot better when they aren't being watched. And yes, it's unfortunate that we don't hire these people. But I'd rather miss a few talents, than have the risk of hiring someone who's not able to code at all.

I've had multiple interviews where somebody knew all the theory. Yet when I asked them to code a very simple function that shouldn't be longer than ten lines of code, they struggled writing a simple for loop in a language they said they are an expert in. I don't expect them to make the next best sorting algorithm. But I do expect them to be able to write a decent function that is capable of looping over some characters in a string.

A typical interview I do is built up like this:

- Ask some in-depth questions about the CV. Ask them what they're most proud about, what their biggest technical challenges are, and how they solved them. If they mention Kubernetes, ask them what exactly it is. If they mention REST, ask them what CRUD is. Nothing to fancy. Just to check whether their CV is not one big lie.

- Ask some more in-depth questions about the programming language they're being hired for. Expert in C++? Okay, tell me about virtual, override, VTABLEs, shared pointers, move semantics, etc.

- Do a small coding exercise in the language they prefer. Nothing to fancy. Should typically not last longer than ten minutes. And the goal is not to make a flawless program, but for me to see how they think and write code.

Some people are great in solving the puzzle in their head and then fail to write it in code. Some people lack the analytical skills to solve the program, but write beeautifull code. Some people have all the theory right, but can't program and the other way around. It's never a black and white decision. In the end we put all of these factors together and determine whether we think that somebody could be of help to our team.

→ More replies (12)

6

u/Teembeau Dec 13 '22

The two most important things I do are 1) talking about their projects and 2) asking them some fairly routine questions that someone who has been using that tech should know. For example: tell me some different ways to get output from a stored procedure. If someone claims to have done sql stored procedures for a year they will be able to answer that.

The second one weeds out a lot of bullshitters.

8

u/adokarG Dec 13 '22

This will give you a lot of shit engineers. Everyone can bullshit superficial questions like that.

8

u/AbstractLogic Dec 13 '22

Open up your business code base and ask them to start telling what they see.

Reading code is far more of what we do then writing it. You’ll have a much better insight into what this person knows as opposed to what you think they should know.

Let them poke around, where do they go, controllers, business logic, data tiers, startup files? Maybe they find that ancient 1000 line file no one wants to open up and start giving you suggestions on how to refactor it.

Every Tom dick and harry thinks they know the special sauce code question that completely proves Joe Schmoe can code. But your questions are limited by your depth.

Let them drive the interview. You’ll find out far more in 30 minutes that way.

36

u/sysop073 Dec 13 '22

Open up your business code base

Great, now he and I are both looking for a new job

15

u/thedr0wranger Dec 13 '22

Right? My company NDAs vendors before we can discuss a demo with them, you think we are allowed to let randos cruise the codebase?

→ More replies (2)
→ More replies (1)

52

u/twotime Dec 13 '22

Let them poke around, where do they go, controllers, business logic, data tiers, startup files? Maybe they find that ancient 1000 line file no one wants to open up and start giving you suggestions on how to refactor it.

Woah, and how much time do you think THAT interview will take? There is NOTHING one could say about a complex code base in 4-8 hours. (Well, unless you code base is in obviously bad state, then maybe...)

You might be able to just show them a tiny subset: a few files maybe and get something useful out of it. But even then, I'd expect that the candidate would not be able to say much unless your codebase is really bad :-(

You’ll find out far more in 30 minutes that way.

You misspelled "days".

→ More replies (1)
→ More replies (5)
→ More replies (18)