33 ms·
> Sadly there's (seemingly) no way to interview people for this ability I think there is. Show the candidate some bad code. Not WTF code, but something you w
by ska 11y ago
> Sadly there's (seemingly) no way to interview people for this ability
I think there is. Show the candidate some bad code. Not WTF code, but something you wouldn't be proud of but is realistic. Bonus points if you're comfortable enough to pull this out of your own production system. Ask the candidate about adding some functionality, but be clear that cleanup and refactoring changes are fine (even encouraged). The conversation should be enlightening.
- vijayr 11y agoThis happened to me once. I went for an an interview at a huge real estate company. They had a chat with me for exactly five minutes, then gave me a computer (an old one, with keyboard not working properly) and some legacy code. I wasn't asked to fix it, but I was asked to make a small change and given half hour for it. That code had no documentation and no comments. Then 5 more mins to explain what I understood about the codebase - no questions, just me talking about the codebase as much as I understood in that half hour. The whole thing took like 45 mins or so in total. No whiteboard questions etc. And they made an offer.
- machinshin_ 11y agoDid you accept?
- vijayr 11y agoNo, I had another offer that I took. I'm an average programmer and was able to do the task easily, but that codebase really scared me. Plus the other job was to build something from ground up and I really liked the CTO, so I took it. They were primarily hiring someone just to keep it running than adding new features. It was a great interview experience though. One of the engineers commented that they gave the same task to other interviewees too. I think this is a smart and lazy way to hire people :P No need to spend an hour in the room asking random questions, having awkward pauses etc. Just let the candidate fight with the codebase - lazy and simple!
- w1ntermute 11y agoHow'd you do it if the keyboard wasn't working?
- knodi123 11y agoOur main product was developed on a keyboard that was missing a "w". It's not a big deal, though - you can use a for(;;) loop instead of a while loop without hurting performance. And it's easy to just avoid "w" words in the view templates by being clever with word choice. Of course, that's not true at all. But giving someone a defective-but-not-entirely-broken tool can be a clever way of seeing how they work around problems or how they deal with frustration. Joking aside, we once let a guy go during his 1 week probationary period because he got a little too angry at a slow server. It's a valuable test.
- CydeWeys 11y agoIt's too contrived though; not having a single working keyboard anywhere isn't a real business situation. A slow bottlenecked server, sure. If the "w" key weren't working I'd copy-paste "w" characters from elsewhere in the document, or bring up the on-screen keyboard. Writing bastardized code -- for (;;), really?! -- would be a huge negative against a candidate. And, of course, if a company really didn't have a working keyboard to provide me with, I'd never work there in the first place, because if they can't even provide working peripherals there's no limit to what else they might skimp on. I actually have three keyboards at my desk right now -- one with Cherry MX blues, one with Cherry MX browns, and a Model M. No way in hell would I ever write code without "w"s.
- jsuar 11y agoI wonder why this isn't more common with interviews.
- rbobby 11y ago> gave me a computer (an old one, with keyboard not working properly) What I like most about this is how close to reality their interview model is. Less than stellar equipment, legacy code, and a maintenance task... just a normal Monday.
- vijayr 11y agoAnother story - I walk in on my first day (this is a subsidiary of a HUGE company). Nobody remembered that a new guy was supposed to join that day - so no desk or computer for me. First couple of hours I spent reading magazines, then I was given the oldest (probably older than me, ha) computer I've seen in my life. I am not kidding - I spent half hour just cleaning the thing (not talking about software, but hardware. it had half inch of dust on it). Good times.
- overgard 11y agoYou know, interviews ideally go both ways. If a company was not willing to provide me with working equipment, I would likely decline any offer they might make. Not because I need the best of the best hardware or anything, but because it would be a huge red flag that they don't value the position or the people that fill it.
- chiph 11y agoWe did something similar at previous job. We handed the candidate some code that was intentionally bad, explained that it was so (so they wouldn't think we wrote like that every day), and then asked what they'd do to improve it. This let us find out a few things - whether they could read & understand someone else's code, whether they could make improvements to existing code, what levels of abstraction they were comfortable working at, and whether they had a strong enough personality to mix with everyone else. The key was in how we presented it - we didn't want to come across as elitist jerks (but we probably did to some people), so we tried to soft-sell it to them and work it in gradually during the interview.
- randomReply1234 11y agoThat sounds like a good way to set expectations for communication and introduce the interviewee to the way your team respects each other. Some teams are like "Man, what idiot wrote this code! This is garbage!" (sometimes in other words). I can imagine they couldn't do the type of interview you're doing. In your interview, you show them some bad code, ask them to change it, and if they start disparaging whoever wrote it, you can red card them before they start dragging down team morale. Or, if they start wondering about 'how did this code get like this? are there other issues leading to the bad code?' they've got some strengths in areas outside of development.
- aaggarwal 11y agoIt would be actually interesting to look at the commits of a candidate's any online project repository from the very start and observe how the candidate made the progress with respect to the structure of code and improvement in coding practice. To check whether the candidate optimizes and refactors the code during the development of the project leading to a stable release.
- ska 11y agoThat's interesting when available, yes.
- chii 11y agothat assumes the candidate has an online repo somewhere. I think this is quite a discriminating practice - what if i don't do public projects?
- deleted 11y ago[deleted]
- __z 11y agoAnd that online repo is fully complex and developed. And has a stable release, isn't a work in progress. That code you hacked together in a couple hours to solve a quick problem isn't going to be an indication of how you handle a mature project with multiple developers.
- eropple 11y agoGenerally speaking, I preferentially hire developers with public projects--though I do not just pick one at random and ask for one they're particularly proud of. I think open source development is virtuous and is something that I want to promote and encourage; in the process, I get what I think is a better view into how somebody works. If you don't do public projects, then you start a few steps behind the other candidates. This isn't insurmountable, but the error bars are wider, making you a somewhat greater risk.
- __z 11y ago
- thirdtruck 11y agoAnd then -- and this is important -- actually follow through on allowing and encouraging refactoring, as indicated in the interviews, instead of insisting on "features first, features fast" in practice.
- rsuelzer 11y agoI agree. There are tons of ways to test for this. Write a simple library that doesn't use any good design principles and have your candidate spend some time refactoring it. You can even use the same library multiple times. Heck, have your senior engineers also do this, so that you can get a good baseline for what an ideal candidate should come up with.