Skip to content

Java web developer interview question, do you think this is fair?

I’ve given a number of interviews over my career and I’ve evolved the way I interview people. I’ve found that presenting people with real word problems and asking how they would approach it and what a possible solution would be is a great way test candidates chops. Remembering a bunch of APIs and methods isn’t impressive and quite frankly, not very important. Giving people theoretical puzzles that aren’t in any way, shape, or form related to what they’ll be working on is useless too in my opinion. I don’t buy the hype about “testing their problem solving skills” or the “outside the box” garbage. It’s a dominance issue and you’re just trying to show off.

First some background on the person I would be asking the question too (basically the requirements for this particular position).

  • Senior Software Engineer with 6+ years of Java
  • Extensive web application experience
  • Various frameworks and technologies like Spring, JUnit, Apache Commons, XHTML, CSS, Javascript
  • Ability to lead teams and come up with solutions given a set of requirements

So I came up with this scenario which came out of an impromptu conversation with a colleague of how they would approach it or if they’ve ever given it any thought. Though it’s not required to be in Java, it would make sense to keep the solution tailored to a Java/Weblogic/Apache type environment (and I don’t say that on purpose when I ask the question, I let them start however they want). So with no further delay:

Given a URL of /product/apple–ipod-nano-8-gb, how would you go about retrieving the information for that product from our data repository (whatever that may be) and returning a product page to the user? Talk me through whatever you’re thinking and feel free to ask any questions.

This represents a real world problem as it comes up in a variety of domains: blogs, e-commerce, search engines…etc. This is an open ended question and is that way for a reason. Using my conversation with a colleague as a reference, it seemed to spark some immediate thoughts, ideas, problems, solutions…etc, and that’s what I wanted to get going in the interview. But I was told by a few other people I work with that it’s way too hard for an interview which I obviously disagree with. Given that a candidate is a senior level, I think they should at least be able to ask some probing questions, ask for more information, or at least spit ball some ideas.

Am I off base? Does anyone else have any thoughts on interview questions like this?

Related posts:

  1. Top 10 New Java Features in NetBeans IDE 6.5
  2. A look at Apache Wicket
  3. My look at Wicket has ended, bad news I’m afraid

{ 32 } Comments

  1. Nikki | January 11, 2009 at 10:52 pm | Permalink

    I’ve been a developer for 8 years now, and I don’t think that’s too hard a question at all. I’d probably spend the rest of the interview time talking with you about it, but that would let us both know what we need to know to see if I’d be a good fit for your company, if you like me and I like you, and if I have the skills needed to contribute to the company.

  2. Jay Barker | January 12, 2009 at 2:49 am | Permalink

    Your interview question is completely fair.

    The discussion following the question would hopefully touch upon a variety of topics involving different layers of the platform and various technologies, the breadth of tech and experience you are seeking. A candidate with poor communication skills or lacking the right experience would not be able to stumble through the question, especially given proper follow-up questions from the interviewer.

    No doubt this question would give the right candidate a chance to shine.

    This is from a software engineer with experience matching your desired background.

  3. raveman | January 12, 2009 at 3:15 am | Permalink

    hmm, you have good idea, however … i dont really understand the question.

    Should he ask you do u use ejb or spring? and write something like
    @Ejb
    ProductEJB
    Company c = ejb.getCompany(“apple”);
    // etc.

    or do you ask him to parse a string?

    the question is confusing to me, i think you should give him some REAL requirements that you got to implement that was not that easy.

  4. Eric Arseneau | January 12, 2009 at 3:40 am | Permalink

    I dont think its too hard, in fact I would require that a static and dynamic implementation be presented. Not to lead the interviewee that way. Let them come up with their design, explore the different options available at the various points in their design. Then, depending on which approach they took, ask them to implement it the other way. Would include questions about how they plan to scale and such.

    Another key point, what questions do they ask as they go along? The answers I think are not all that is important, their questions are also.

    My 2c :)

  5. Matt Saunders | January 12, 2009 at 4:12 am | Permalink

    I think that’s an excellent question and at exactly the right level for the kind of person you’re looking for (it’s my role in a less Java-oriented shop than yours). The right candidate should be enough of an ‘architecture astronaut’ (google for the Joel Spolsky post if you don’t know what I mean already) to be able to talk for hours about the tech and frameworks they’d want to use to do this sort of thing, but have learned (probably the hard way) to temper their tendencies in that regard so as not to spend six months writing beautiful, elegant, framework ‘tools’ that will let them create any application they want in six minutes ;-) In short, you need, “Done, and gets things smart” and not necessarily the other way round (that’s a Steve Yegge-ism). And I think your question will help you find that sort of person.

    Matt

  6. Aleksey Maksimov | January 12, 2009 at 4:40 am | Permalink

    Hi, Jared!

    I think that your method is very fair. That way you’re actually asking on how somebody thinks on a problem instead of confusing them with irrelevant, but tricky, questions. I hope, though, that you will not require them to write a code using pen and paper. ;o)

    Aleksey

  7. Nick | January 12, 2009 at 5:03 am | Permalink

    Umm… in no way would I say that problem is too hard. I would expect most developers with 1-2 years experience to be able to give some sort of reasonable answer.

  8. cx42net | January 12, 2009 at 5:09 am | Permalink

    In my opinion, this question is fair enought to be asked during an interview. If an senior engineer cannot answer that type of question, what job he’s looking for/have the knowledge for ?

    You’re right when your saying that this question is a real world problem, a competent senior would normally be faced with a similar problem during his experience …

    That’s my thought

  9. MFR | January 12, 2009 at 5:25 am | Permalink

    Prfff.. That’s a noob question.

  10. Ran | January 12, 2009 at 5:37 am | Permalink

    I agree with you. This is a great interview question that shows what technology stacks the interviewee is accustomed to and is familiar with.
    However, I suggest guiding with a specific technology stack, having a ready-made deployment scenario. Also, when the interviewee is stuck, it doesn’t always mean he doesn’t know. Try supplying more “environment details” like “we’re using SQL server for persistence” or “we have an apache tomcat as our front end”. These details would focus the interview instead of having the interviewee fishing for details. So for a “what DB are you using?” you should answer (IMO): “Your choice, but you if it helps you, assume MS SQL server”.

  11. Ran | January 12, 2009 at 5:38 am | Permalink

    Addendum: Of course, don’t forget the fizzbuzz question(s). You’d be surprised.

  12. Mark | January 12, 2009 at 6:09 am | Permalink

    I think its a fair question, not interms of the question itself… Its quite vague… but it should help you get a look at the mindset of the engineer… I am an Sr Software Engineer, and though its open, I would try and work through a solution in an Interview.

  13. Roger | January 12, 2009 at 8:30 am | Permalink

    In my opinion, this is the kind of interview questions everyone should be asking. I can´t tell you how sick i am of useless puzzles and stupid API questions where you need to memorize an entire library in order to answer.

  14. jkilgrow | January 12, 2009 at 8:35 am | Permalink

    Frankly, as a senior developer myself, I would LOVE (love love love) this type of open-ended question! I get so sick and tired of the standard written Java exam where the interviewer sticks you in a room for an hour and asks you to write code on paper. Hello? That’s not how I work! I work at my laptop plugged into the www. I use that for references, ideas, etc. all the time! Besides that, my development duties go WAY beyond just code! As a senior developer, it is also my job to help out younger devs, talk with product managers and customers, gather requirements, write technical specs, design databases and queries, and solve problems that, sometimes, have nothing to do with writing any code of any kind!

    So, having an open-ended question like that where the interviewer treats it as a product design meeting or a technical review would be GREAT! If the interviewer approached the interview like “I have this problem . What can you suggest?” …wow! Perfect! That would let them see how I think, how I solve problems, how I gather requirements, and maybe even a little pseudo code.

  15. Lance Lavandowska | January 12, 2009 at 9:33 am | Permalink

    I think it’s an interesting topic, though perhaps you leave too much open to the interviewee to create? My first “assumption” would be that the data store is a db, and I’d work from there. But reviewing the topic, I consider a file-based storage mechanism (or at least a REST-based storage), and my brain goes off in another direction.

  16. Gregory Mostizky | January 12, 2009 at 9:59 am | Permalink

    +1

    I think this is a valid and useful approach. I used something similar, where we would tell a candidate to imagine we were a businessmen needing some simple application (like sports tracker) and asking how he would approach that. We were able to get a real good feel of a candidate abilities by looking at his questions, which areas he would approach first, what he considers trivial etc. Your question is more technically oriented and I think it is even better in your specific case. Any senior java programmer should be able to solve this, or at least ask some intelligent questions.

  17. Gregory Kornblum | January 12, 2009 at 10:34 am | Permalink

    Not at all. It’s a rather straight forward process. You have a URL rewriting handler to translate the actual URL into something the web app can work with such as the product ID in the querystring, then using that value you would perform a lookup of all data pertaining to that product and present the data retrieved in a product page template of sorts using whatever data display methods being used by the application such as a server control or more directly if using MVC. That’s a junior level question and solution.

  18. Spike | January 12, 2009 at 10:46 am | Permalink

    I think it would be a better question if “our data repository (whatever that may be)” was more concretely defined. Tell them its a SQL database or a web service or whatever, but just having it be an abstraction is not helpful.

  19. Lincoln | January 12, 2009 at 10:47 am | Permalink

    Assuming your specified Java/WebLogic env, I’d tell you i’d get the Servlet/PortletRequest, parse the requestPath, perform required auths, retrieve data from the datastore, and render the view using whatever technology or framework is in place. Problems will always come up, but without diving in, it seems simple.

    This is certainly a more than fair question for the skillset you’re asking for, but I would consider it pretty straightforward (unless you were expecting a different answer.) Of course, having written a JSF extension (See PrettyFaces) to do exactly this type of dynamic URL parsing/mapping/dataloading, I may be biased.

    I’m certainly a fan of being asked technical questions that will reveal if the my skillset is really in-line with what your needs are at the time. There’s no point, to me, in hiring someone for a job they aren’t qualified for, unless you are confident that they can learn quickly enough to meet your business needs.

  20. me | January 12, 2009 at 11:06 am | Permalink

    If you done it better you could store the rewritten url in with the data, then finding the correct row would be a lot easier. It would also remove duplicates as you could check the rewritten url doesn’t already exist.

  21. Jason | January 12, 2009 at 11:07 am | Permalink

    That’s a pretty good interview question. I’m not a fan of trivial textbook-ish questions, I prefer questions that are generalized versions of problems that would realistically come up in the job, and don’t require any code to be written during the interview in order to gauge competence (since in order to have the candidate write code in the interview it has to be a trivial fictional problem so that it’s not considered labor). This question is perfect, the ideal candidate would start by asking where this link came from (product listing, google search results, etc..) and hopefully bring up SEF URLs and both the mechanics of how they work with different server platforms as well as the benefits and drawbacks of using them.

  22. Ignacio Coloma | January 12, 2009 at 1:29 pm | Permalink

    Best question ever. It should spark a conversation.

    I’m adding it to my repertoire :)

  23. steve | January 12, 2009 at 1:46 pm | Permalink

    totally valid. i also make them design a simple db schema, go through inner, outer join concepts etc. obviously our candidates have rmdb experience.

  24. jcblitz | January 12, 2009 at 1:54 pm | Permalink

    Thanks for the comments everyone, seems we all share the same thoughts on this process. And I’m glad to see some people are enthusiastic about this question / questions like this too, which is how I was when this came up in a conversation.

  25. Ivan | January 20, 2009 at 1:28 pm | Permalink

    My 2 bits here.

    If a Senior developer does not know to ask questions (to clarify the initial understanding of the requirements) and to start giving a high-level description of a solution (any solution,) then this person may not know how to create ‘real world’ solutions to real-world problems.

    The given solution may not the the best (given the verbal requirements and such) but at least it should be a starting point from where he/she can further understand the requirements and fine-tune the solution (as the understanding of the problem gets better).

    Totally fair question IMHO

    (Disclaimer: I have more than 8 years of web development experience)

  26. José Ignacio Santa Cruz | January 20, 2009 at 2:18 pm | Permalink

    I guess your idea of the question was to evaluate not only the programming knowledge but also the way the Sr Software Engineer can get information from open requirements, perhaps even an upper view of this person’s leadership capabilities.
    In that way it is a completly fair question.

  27. Rajneesh Garg | January 21, 2009 at 12:54 am | Permalink

    For anybody looking for a career in programming/technical side, this is a very fair and obvious question. I remember few years back, I asked the same question with different words – What happens when you enter yahoo.com in the browser address bar and press enter key?
    It was for a Java post for 5+ years experience only guys. I interviewed 3 guys, and none of them could explain it.
    When I see and talk to people around with superficial designations, I often wonder to ask the same question again!

  28. Mike | January 21, 2009 at 4:19 pm | Permalink

    Jared, I highly recommend that you not only use this question in the future, but adopt this style of interviewing more generally in the future. As a *very* senior engineer and architect, I find it somewhere between amusing and insulting to be asked Comp Sci 101 level questions. In the role of hiring manager I always find that I can learn more about a prospective hire from asking “essay” questions than the “name some design patterns” or “how does inheritance work” you see all too often. My belief is that most interviewers don’t use this approach because they: a. lack the confidence to adequately assess the response; b. are fearful that the respondent may actually venture into areas the interviewer may not grasp (and hence look foolish); or c. don’t feel comfortable engaging in a conversation (even technical) with a complete stranger. Nonetheless, this approach to interviewing is far more interesting (for both interviewer and interviewee) and provides far more insight into knowledge, approach, and general engineering skills than any set of right/wrong answer queries will ever provide.

  29. Dominique | January 21, 2009 at 4:42 pm | Permalink

    “Feel free to ask any question” is the point! Regardness the interviewer has a good english or not:)

    It’s a confusing question along the lines many analysis requirements and a sr. analyst programmer has to deal with them. Maybe, some people could ask stupid questions sometime but it depends on clarity of the requirement (system, software and so on requirement) and…the stupid question he (the person under interview) poses.

    So, there’s definitely no discussion about the fairness of the interview question. Moreover, it is a good question for the role.

    My 2 eurocents:)

  30. Ben | January 21, 2009 at 7:39 pm | Permalink

    I think judging by the responses you can see it’s a good question. I would immediately steer clear of anyone who when confronted with such brief requirements tries to say that it is easy, any competent snr engineer would be thinking in terms of what questions they should be asking first. The whole point of the question is that there is no right answer so how can it obviously be framework x?

  31. Mikhail | February 1, 2009 at 6:54 pm | Permalink

    Open-ended questions are the best for any senior position. How else would you learn about candidate’s approach to solve problems?

  32. Billy Korando | October 23, 2009 at 7:27 pm | Permalink

    As I junior developer I don’t think that question is too hard. While I could not answer it nearly the detail you might expect if I had to give an answer:
    I would use Product as a type then use the later part of the url for keywords using a mechanism to get the most relevant products.

Post a Comment

Your email is never published nor shared.