Hacker News new | ask | show | jobs
by mdip 3023 days ago
Yes. But mainly only to direct my questions. Whether or not they were the primary author was mostly only important in knowing how well they knew the code in question. If it was written entirely by someone else but they fully understood the code, that worked for me, too.

It was more important to me that a candidate could reason about the code in question -- even (perhaps especially) if it was an implementation they pulled directly from an SO post. There were occasions where I'd see unique implementations of common tasks (i.e. pulling a value out of a URI string that carried an unusual formatting pattern where simply using the URI parser in .NET wouldn't have worked directly). Having worked with a few different frameworks that use unusual URI formatting, I might ask why a regular expression was used over writing a custom parser tied to the Uri type (or vice-versa) and I was more interested in hearing the argument and reasoning behind it as well as whether or not the candidate could come up with pros/cons for both methods. Sometimes it'd be a custom implementation for something that could be done directly with features available in the framework -- and often the answer was obvious[0].

And a little humility doesn't hurt, either. I remember asking why someone used a regular expression to do some rather involved data extraction from an HTML source versus using something like Angle# and I recall the response was something along the liens of "Well, it started with pulling just URLs for a limited case and exploded into getting some metadata around the link, but it was for something at home and I put a total of ten seconds into thinking about how to do it right and if it stopped working completely, it didn't affect me all that much". Good enough; a lot of developers would go off into tall weeds defending bad code rather than just saying "sometimes the tolerance for error greatly exceeds the availability of time" or "I just didn't care enough" -- especially in an interview where you are hyper-sensitive about looking bad -- and we all have a bunch of very dirty scripts that "work ... mostly". Provided it's not a theme of ambivalence throughout the interview, a little honesty at a time when it's tempting to fluff gave me confidence that when that developer made a mistake, he might actually own up to it.

[0] It's either "I didn't know it could be done that way" or the most common "I wrote it before that method/call existed" -- since I was hiring for .NET positions at a time shortly after Framework 2/3.5, this was a really common situation due to many new ways of doing things arriving with Generics/LINQ. And both were acceptable answers since it took some time for a lot of .NET folks to grok generics/LINQ and understand them well enough to realize the appropriate place for them (outside of just "oh, I can make a List of anything without having to use ArrayList of object types")