Interview coding.

topic posted Wed, October 6, 2004 - 7:36 PM by  Ken
Share/Save/Bookmark
Advertisement
Has anyone ever been in those technical interviews where they ask you to design and code a solution to a specific problem during the interview?? Or am I just the lucky one that seems to attract these kind of interviews?
posted by:
Ken
offline Ken
Kansas City
Advertisement
Advertisement
  • Unsu...
     

    Re: Interview coding.

    Wed, October 6, 2004 - 9:00 PM


    No, I've been the victim of these clueless types as well. It seems to be the latest business fad to ask these sorts of questions during interviews. Fortunately, the next fad will be just around the corner and we'll probably be assessed on our personality traits by the color of our socks.
    Or something equally nonsensical.

    The really sad thing is that technical people who really ought to know better are asking these nitwit questions - not just the PHBs.
  • Re: Interview coding.

    Wed, October 6, 2004 - 10:09 PM
    When I interview candidates for coding positions, I *always* include at least one or two simple coding problems in the interview. They aren't the main focus, and I don't expect people to write code that's very complicated, and I don't expect that the code will be perfect enough to compile. It does seem to me to be a reasonable way to verify someone's claims about how much coding experience they have. I don't expect people to know every nook and cranny of the language, but I do expect that someone will know how to iterate over an ArrayList.

    Are you running into interviews where they are expecting you to code something a bit more substantial? Can you recall an example problem that you were given to design and code?
    • Re: Interview coding.

      Wed, October 6, 2004 - 10:50 PM
      Mike wrote, "It does seem to me to be a reasonable way to verify someone's claims about how much coding experience they have."

      If the candidate and her references can't convince me of that, then they've missed the boat and I hire somebody else. That's what interviews and references are *for*.

      "Well, hrm, yes, indeed. I see in your resume that you've had 5 years Java coding experience, and you've told me during this interview about the code volumes and application areas you've done, and your three references have told me the same thing. But, tell me, do you really think you know how to iterate over an ArrayList? This I'd like to see......"

      So, doing it your way, how exactly does the candidate's ability to iterate over an ArrayList show you that she has as much coding experience as she says she has?
      • Re: Interview coding.

        Thu, October 7, 2004 - 11:53 AM
        We do interviews *before* checking references. I have interviewed a number of people (whose references I have not yet called) who have great-looking resumes and who can talk well at high levels and who have no clue how to do write the simplest bits of Java code.
        • Unsu...
           

          Re: Interview coding.

          Thu, October 7, 2004 - 12:12 PM


          Are you sure they have "no clue"? Or is it possible that in the nervous situation of an interview, they freeze? Checking that the referecnes can conform what's on the resume is a really good filter and a great timesave to keep you from interviewing unsuitable candidates.
          I'll always argue that asking people to write code in an interview situation is the least effective way of gauging ability (a coin toss is likely to be as accurate). Past perfomance is the best predictor of future behavior.
          • Re: Interview coding.

            Thu, October 7, 2004 - 12:54 PM
            No, I don't have 100% certainty. But it seems better to me to ask the question than not. Given the choice between two candidates who do equally well on the "high-level" questions (questions about past projects they have worked on, design style, programming style, testing style, etc.), if one candidate can demonstrate what should be "easy" knowledge and one can't, who would you hire?
            • Ken
              Ken
              offline 2

              Re: Interview coding.

              Thu, October 7, 2004 - 5:44 PM
              All things being equal, I'd agree.

              But I've never interviewed two people where this was ever the case. I've gotten people strong in coding, but weak in design and vice versa. In that case, I'd take the one with better design and problem solving skills. I can teach coding, I can't teach problem solving (as well).
            • Re: Interview coding.

              Thu, October 7, 2004 - 6:45 PM
              By the same token, given the choice, I could choose to hire a Democrat over a Republican, a man over a woman, or a white over a non-white. In any event, my choice will have nothing to do with the candidate's coding skills, because I will have done nothing meaningful to assess them.

              It would be fairer for you to flip a coin than to pretend to your candidates and to your supervisors that you have gained usable information from a shotgun coding quiz.

              If I employed a similarly minimal test for hiring managers, you would have already failed, since it would show that you don't even understand the simplest principles about how to use references effectively and how to conduct effective interviews. Given a choice between you and a hiring manager who can demonstrate an understanding of these simplest of hiring principles, I'd hire the other person.

              See, it's no different when the shoe is on the other foot. :)
    • Ken
      Ken
      offline 2

      Re: Interview coding.

      Thu, October 7, 2004 - 3:52 AM
      I've run into both. One was to code a JDBC program (from memory) on the blackboard, the other was to create at the drop of a hat, an efficient way to store and retrieve a specific type of data to a database. The first was pretty stupid because I've always in the past created this kind of thing once and used it from a library (and now use frameworks like Hibernate so I don't have to do this again). Re-writing this from scratch is a waste of time, and just re-inventing the wheel over and over.

      The second illustrated the difference between hacking and doing software development. They wanted an 'instant' answer to a problem that they later admitted they took two weeks to figure out. Admittedly their answer was more elegant than mine, but seeing how I had 10 minutes to come up with my answer that's understandable.

      I'm not sure I would hire someone that comes up with the PERFECT solution in 10 minutes to a complex problem. It usually either shows their inexperience, or their overconfidence.

      Luckily I was given the runaround at both of these places and ended up not working there. I heard BAD things about both shops shortly thereafter.

      I don't believe that coding examples taken in 10 minutes (or whatever short amount of time) are a good example of a person's abilities. There isn't nearly enough time to get the problem straight, and come up with a good answer. And to me it isn't the speed in which the code is produced so much as the quality of the code produced. Speed is important, but a robust, elegant solution that is nearly bulletproof is worth the extra time.

      You yourself were talking about a system that was perfoming horribly on a hurking computer a little bit ago. Maybe if some more thought were put into the design up front, there wouldn't have had to be re-writes and modifications for performance. The first answer isn't always the best answer.

      If the code you have the interviewee create isn't important, then it's a waste of their time and yours. You might miss someone who's an excellent coder, but doesn't create 'drop-of-the-hat' solutions very well. Also a great coder might have a bad day and not be up to snuff that particular day when thrown a problem to solve. That's the same reason that I'm not a big fan of standardized tests given at interviews either. One bad day can disqualify an excellent candidate.
      • Unsu...
         

        Re: Interview coding.

        Thu, October 7, 2004 - 8:53 AM


        The funniest thing that ever happened to me was once I was given a coding test and I missed one of the questions. The interviewer told me, "don't worry about it, everyone missed that one". When I got home I looked it up and the reason that everybody missed it is because the interviewer had the wrong answer.
        • Re: Interview coding.

          Thu, October 7, 2004 - 10:19 AM
          I filter the gigs I'm willing to take by telling interviewers when I think they're wrong. If they can't either take my word for it, accept the difference of opinion or prove me wrong, then I'm not interested. (As a consultant, it's my job to be right when my client is wrong. If the client were right all the time, she wouldn't need a consultant, just another pair of hands....)

          A large Seattle-based coffee retailer once interviewed me for a system integration position. They were concerned that I didn't have at least 10 years' experience in Oracle Version 47.7.1.9.32a.7 patchlevel 17.9 beta semi-gamma, but it was my obstinate arguing with them (that (a) the days of their IBM 370 mainframe were numbered and (b) they should be using standard database protocols and languages, not marrying themselves to a single platform version of a single vendor) that finally convinced both of us that we'd do better elsewhere...

          Anybody care to guess if they're still running an X.400 backbone? (Of course, decades later, I was employed by Control Data, who was surprised when I came out of the closet as one of those TCP/IP fad weirdos. I was told that it was okay for me to play with IP as long as I understood that it was always going to have to translate to X.400...)

          But the *funniest* thing that ever happened to me was when the owner of a large antique and auction establishment asked me if their new software could have a function where it told him at the end of the day what had been stolen out of his warehouse.
          • Unsu...
             

            Re: Interview coding.

            Thu, October 7, 2004 - 12:03 PM
            'if their new software could have a function where it told him at the end of the day what had been stolen out of his warehouse'

            That is really funny. But now you could tell him to get on the RFID bandwagon. It may help.
            • Re: Interview coding.

              Thu, October 7, 2004 - 6:47 PM
              I think I told him I could do it, but it would add about 2 years and a quarter million Deutsche Mark to the contract. For R&D. *shrug*
      • Re: Interview coding.

        Thu, October 7, 2004 - 12:04 PM
        I agree that asking an interviewee to write jdbc code is probably not the a good test of programming abilities. I wouldn't be asking people to do that.

        I also agree that more design upfront is a good thing and will pay off in the future.

        You may have mis-read my post in that earlier thread you referred to. I never said the system was "performing horribly." The system occasionally filled up memory, in which case the system recovered fine by kicking stuff out of cache. I was trying to find ways to have that happen less often, since the churning was a noticeable (but not horrific) performance hit. Unfortunately, most of the suggestions made in that thread did not apply very well to my specific situation.
  • Re: Interview coding.

    Wed, October 6, 2004 - 10:25 PM
    It only happened to me once, for a job at a hotshot MS spin-off shop starting up in the Seattle area. He not only asked me to write about a dozen lines of C on the blackboard (IIRC, to insert an item into an array, showing that I knew from which end to copy ... or something), but he also asked me for a complete list of test conditions that would be necessary to show that the code was correct. (I did what he wanted, but not before asking him why his shop didn't already have libraries in place for that kind of thing.)

    I'm glad he did that at the interview. Otherwise, I might have wound up taking the job or something. It was obvious that I was dealing with a group of disgruntled former Microsofties who were convinced they knew how to do it right. (In which case they didn't need me, now did they.)
  • Re: Interview coding.

    Thu, October 7, 2004 - 1:58 PM
    I have been on both sides of this situation, and in the past 3 years I have noticed that techinical questions that require coding have become more common for me. I personally don't mind them, and it doesn't seem fair to say that code questions are not fair to ask because it is a stressful situation. I mean the entire interview is a stressful situation. It is equally hard to explain different strategies for web server failover in 10 minutes. I look at it as a chance to show that if I have recently been coding.
    On the flip side when I interview people I do ask them a simple coding question. One I like to use lately (because I work for a web company) is let's design and then write a servlet to record unique visitors to a web site. The candidate can solve the problem however he wants and he get bonus points with me if he ask questions about requirements. Then as he codes the solution we can see if he has written much Java lately.
    If he doesn't know the syntax of JDBC or servlets I don't care, but I have had atleast a quarter of candidates not be able to use Vectors or say File IO despite the fact that their resume says otherwise. And references are good, but "taking someone elses word for it" can be a bad business practice.
    Bottom line for me is we are hiring you to design AND code so in the interview I think it's fair for you to show you can do both.
    • B
      B
      offline 121

      Re: Interview coding.

      Thu, October 7, 2004 - 4:27 PM
      I once went to an interview for a project manager position. One of the interviewers asked me to design using, blah blah blah. I said no. He got offeneded and left. I told the head of human resources I wasn't interested in working at their company. I went somewhere else. They aren't in business anymore.

      If it seems like they are clueless I won't work there it is a good indication they won't be around long.
    • Ken
      Ken
      offline 2

      Re: Interview coding.

      Thu, October 7, 2004 - 5:42 PM
      Enterprise level applications aren't designed and built in 10 minutes. EVER. I could care less if a person can code up a simple java servlet in a few minutes to do something trivial. I want someone that can come into a situation and take sometimes obscure requirements, create a requirements document, project plan, use cases, class diagrams, sequence diagrams, and all other supporting documents. None of this can be done in 10 minutes.

      I don't want to disqualify someone because they didn't write a simple servlet how I wanted them to. I also don't care much about if they've recently been coding. A lot of good people have been put on the job search line for awhile, and they might be a little rusty, but it's like riding a bike, you get back up to speed quickly. Problem solving skills are more important than coding ability. You can look up API's easily, you can't look up solutions to unique problems.

      If someone couldn't use a Vector, but came up with the solution in a different way (given 10 minutes, in a stress situation, they might not even think to use a Vector, but maybe an Array, or some other method.) would you still disqualify him? They solved the problem but failed??

      You'd probably have to disqualify me too, and I've had 5 years doing java and managing teams of developers, since I've worked on exactly one (1) small project that uses File IO in the last two years. I'd be pretty lost doing it off the top of my head too. Doesn't mean I can't whip up a web application or web service easily enough. I've just got different areas of expertise.

      I don't believe in the coding tests, because it's not what they're going to be doing on the 'real' job. It's like testing a long distance runner by having them do 50 yard dashes.
      • Re: Interview coding.

        Thu, October 7, 2004 - 6:53 PM
        Ken wrote, "It's like testing a long distance runner by having them do 50 yard dashes."

        I think it's more like testing a long distance runner by having them tie both shoelaces in 10 seconds while singing at a karaoke bar.
      • Re: Interview coding.

        Fri, October 8, 2004 - 8:17 AM
        If I was hiring a long distance runner, I would atleast want to see him run. Instead of just relying on him telling me he has run really well in the past. If I could not test his running for 4 hours I would atleast want to see his form and that he could do it.
        Please don't miss understand me though. The entire interview process should not be coding by any means. All of the categories you have mentioned should also be asked, but for my 2 cents writing a little code is also on the table.
        • Re: Interview coding.

          Fri, October 8, 2004 - 10:07 AM
          If I were hiring a long distance runner, I'd check their clock times for the important races they've run (and hopefully won). If their performance has been good enough in the past, then I'm willing to predict that their performance will be good enough in the future. Watching their form for a brief period wouldn't give me any useful information, *especially* for a long distance runner where things like stamina and breath control play a greater role.

          As for "writing a little code" during an interview, I think that could only possibly be reasonable if I were hiring a pure coder. So the next time I fire up my time machine and go hang out in the 1960's, I may consider asking for a bit of code during the interview. Until then, I'll recognize the reality of today's software industry: pure coders are a recipe for failure. (Unemployed software developers would do well to take note of this reality, too.)

          As Ken already said: I can get people trained in this year's languages and protocols (and get them retrained next year, and the year after that, ...), but I can't (at least not cost-effectively, if at all) get people trained in creativity and problem solving.

          People who ask for coding in a particular language or against a particular API are pretending that the language/API is more stable than it really is. If I wanted to know how the candidate might approach the solution of a certain type of problem in code-independent terms, I'd just ask -- and that would be enough.
    • Unsu...
       

      Re: Interview coding.

      Fri, October 8, 2004 - 8:42 AM


      I don't think it's a matter of whether the questions are "fair". As I see it , the problem is whether or not the questions measure what you think they measure. My claim is that they do not.
      • Re: Interview coding.

        Fri, October 8, 2004 - 9:53 AM
        I agree that the problem is that they don't measure anything useful.

        I was simply adding the observation that using such meaningless "tests" in an interview as a lame CYA is not fair to the candidates, to oneself or to one's organization.

        "Well gee, boss, how could I have known that he thinks 'client/server' is something about the restaurant business? I *tested* him!!! He could manipulate Vectors like nobody's business, and he could even do file i/o on them!!!!! He was *better* than the other candidate because the other one didn't pass the coding test!!! It's not my fault!!! He tricked us!!!! Waaaaahhhh!!!!!"
  • Unsu...
     

    Re: Interview coding.

    Fri, October 8, 2004 - 9:46 AM
    I've had my share of both "write code to do X" and "design an object model for Y". The other I'd get is to be shown some code, and asked, "what's wrong with this picture?"

    The "code on the blackboard" questions are pretty stupid, because they really don't tell you anything other than if that candidate has memorized syntax and APIs.

    Simple design problems are useful if you want to hire a programmer who can think fast on their feet. You don't necessarily want to hire someone who will spend endless weeks trying to design the perfect solution when you don't have that time. There is no such thing as perfect design. And in my job, I am often asked to come up with practical design solutions very quickly.

    But the best way to gauge a candidate, in my opinion, is to ask detailed questions about a project on their resume, and play devil's advocate. I can pretty quickly figure out what their role really was, and to what extent they understood what they are building.
    • Unsu...
       

      Re: Interview coding.

      Fri, October 8, 2004 - 9:50 AM
      "But the best way to gauge a candidate, in my opinion, is to ask detailed questions about a project on their resume..."


      Exactly!!! This is far and away the most accurate way to gauge a candidate's abilties. Time spent having them write code is time taken away from this valuable activity.


      • Re: Interview coding.

        Fri, October 8, 2004 - 10:16 AM
        Yep, that's my approach as well -- *after* I've talked to the candidate's references to try to elicit the same kind of information (as well as stuff like code volumes, if they know, and possible personality issues).

        Come to think of it, I'd expect very much more from administering the Myers-Briggs to the candidates than from giving them a pop quiz on Java 1.4.2 syntax and API's...
    • Ken
      Ken
      offline 2

      Re: Interview coding.

      Fri, October 8, 2004 - 4:03 PM
      Ditto here too. That's the way I've hired some very good people.

      Unfortunately, the problem with this is you need to be interviewed by someone either as good as, or better than the person being hired. Otherwise it's difficult to separate the good from the bad.

      This is the problem with letting HR pick/screen the candidates. They don't know when they're being BS'ed or not on different subjects.

      It's a pain, but it's a lot more effective to have a techie do even the initial screening of candidates, although HR will say that's an undesirable thing.
      • Re: Interview coding.

        Sat, October 9, 2004 - 9:50 AM
        People who have gone into the HR business have told me they're doing it because that's where the real power lies in a company.

        Having worked for several very large organizations, I'm convinced that HR tends to see itself as THE power bloc through which all roads must pass. It reminds me of the way IS tended to see itself in the 60's and 70's. But whereas IS has moved on to a more complete understanding of the (necessarily less than exhaustive) role of IS in an enterprise (to the great benefit of enterprise computing, I might add), there has been no similar evolution in HR, at least not from where I'm sitting.

        HR departments that continue to try to screen technical and professional candidates *on behalf* of technical line managers are evidence that such evolution is not forthcoming in many organizations. I'm confident, though, that the decaying carcasses of these dinosaurs will be feasted upon by the hordes of ravenous rodents currently populating the business scene.
  • Re: Interview coding.

    Sat, October 30, 2004 - 4:26 PM
    I have only had a few interviews that asked for code examples. Most of the coding that they asked for was kind of trivial stuff. You know, questions that verify that you have at least a basic knowledge of the subject. I do remember one time that was quite memorable.

    I was working for a Sillicon Alley company. We had a new VP of Software Engineering come in and he was supposed to run the department. At that time it was before the great dotcom bust and they were eager to expand. So they were trying to hire developers like mad, they even had a bounty on their heads. At that time I didn't think that he had too much reguard for me. Many people came in and none of them were hired. I imagined at the time that if I were to come in and try to interview under him I wouldn't have been hired; I had graduated from a cheasy university w/ a BS of CS and the VP had a doctorate from Harvard. One day he asks me to look at the questions. One of them was, "if java didn't have a String Class, how would you design one? What type of constructors would you include." Of course I easily answered the question: he wanted them to tell them that they would use a char or byte array to store the contents and a String constructor that would take a String as it's arguments. I also told him that I had already done little excercises like this in C++ (trying to really learn it) and also had taken a peak at the java.lang.String source file. He told me that alot of people couldn't answer. At that point I started to have alot more self confidence in myself as a developer.

    The thing though that I saw which seemed really unfair was when the VP let fellow developers do interviews. I don't know if it was a sadistic streak in them or if they were trying to make sure that no one was hired so one of their buddies would get the position but they would come up with these brain teasers that had absolutely nothing to do with programming, software design or anything else. In fact the questions seemed more suited for entry into mensa than a position as a software developer. I remember one question was to decrypt a series of dots and dashes into some phrase. Maybe that would be a good test if you were supposed to be WWII/Early Cold War code breaker but a developer?

    I think maybe the biggest problem is that in development there is such a broad domain of knowledge necessary needed to create applications. Now compound this situation with the fact that pretty much each shop using it a unique set of tools to create and maintain these applications and finding a candidate through a fair systematic means becomes very difficult task (if not impossible). As a result I believe that many hiring managers (not all of them mind you) have fallen on arbitrary means of selecting candidates. Some of them are quite whimsical: one guy I know who is a unix sys admin confessed that once when he was hiring he threw out all resumes that had any MS certifications on them. All the way to illegal: a friend told me that his manager wouldn't hire a female developer for his department because it would interfere with his porn downloading habits. I can even remember in college people from my college asking me how did I get beat out for an internship by the class dunce (I believe that we had at least a 2 point difference in GPA and no he wasn't just really skilled but bad at class).
    • Re: Interview coding.

      Sat, October 30, 2004 - 7:12 PM
      That is pretty cool. The experince I recall the most is a company who was hiring me from a consultant to full time ( I was Java trainer and then they wanted me to develop).

      The question was, tell me how you would build a parking lot in Java. How would you design the peices, and put them together.
    • Unsu...
       

      Re: Interview coding.

      Sat, October 30, 2004 - 10:00 PM
      "...they would come up with these brain teasers that had absolutely nothing to do with programming,..."


      That's the kind of question I hate most. Utterly pointless.
      I don't know about other people but I just don't have the time to spend it asking irrelevant questions of prospective applicants. I want to get in there, ask questions that gain me the most information in the least time and move on. Thats' why I ask the types of questions that I do.
      • Ken
        Ken
        offline 2

        Re: Interview coding.

        Sun, October 31, 2004 - 7:02 AM
        I agree that these types of questions are pretty pointless when it comes to guaging someone's skillsets, but they can be a 'little' useful to get an overall feel for how someone solves a problem. Even then, I don't think they're particularly useful enough to include in a regular interview.

        These type of 'brain' questions have been popularized by Microsoft mainly, in their hiring. There's web sites (and you get to look them up) that keep a list of these 'brain-teaser' questions from former Microsoft interviewers. One classical is "Why are manhole covers round" and you get to list all the reasons you can think of that they are round.

        Another one I don't particularly like, although it's inventive, is the riddle/puzzle that Google put on a billboard. It's a math puzzle (or could be found by brute force if necessary) to determine an IP address where you can apply for a job with them. It's cute, and it may actually weed out the dross in that case, as they're wanting people for problem solving and innovation rather than rote coding. It's still annoying having to solve the riddle of the sphinx (in effect) to get anywhere.

Recent topics in "Java Monkeys"

Topic Author Replies Last Post
Javascripting costs Schirin 3 May 17, 2007
Design patterns and principles emblylan 6 February 14, 2007
open source hosting alternatives? Mark 2 February 3, 2007
Ruby > Java Unsubscribed 6 January 9, 2007