r/programming • • May 08 '15

Five programming problems every Software Engineer should be able to solve in less than 1 hour

https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour
2.5k Upvotes

2.1k comments sorted by

View all comments

Show parent comments

3

u/johnw188 May 08 '15

I really dislike those questions as well. When I interview people I give them a codebase we set up with a couple of failing unit tests and say "fix the tests". It's a much better interview because it's a real life situation - any developer should be able to read a piece of code they've never interacted with, see the expected usage in tests, and find and fix the bugs that are causing issues.

1

u/gnuvince May 08 '15

fix the tests

So the candidate inverts the condition in the test?

1

u/johnw188 May 09 '15

I misspoke, the candidate should fix the codebase so the test passes. The idea is that we've assigned you to work on a new project and a test is failing, go find and fix the bug.