October 05, 2005 - Cheat Sheet for Interview Candidates

Just to make it easy for any potential candidates out there, here's my whole interview question for the J2EE position.

I want you to build a Hello World application in J2EE. I want you to do the simplest thing that can possibly work.

There are no right or wrong answers and no trick questions. I don't care if you can't remember method signatures - just ask me. I'll stop you and move on as soon as I see that you understand what you are talking about.

If you haven't used a particular technology, it's probably better to tell me up front rather than make stuff up. It probably doesn't matter. If you haven't used, say, JDBC in a while that's OK. Neither have I. But I can tell the difference between "haven't used it in a while" and "I am making this stuff up" or even "I read this stuff on Sun's web site last night because I knew you would ask me about it". Just to be clear, it's ok if you just read it on Sun's web site - it shows initiative - but don't pretend you have been using for 5 years if you haven't because, trust me, it's pretty obvious.


Here are the requirements :

1. There is a web page with a text box and a button.

2. The user will type something into the box and hit the button.

3. They'll get back a page that says "Hello <whatever they typed in the box>".

I'll ask you to build the simplest J2EE application that can meet the requirements. Once you have done that, I'll ask you to explain how it works and then I'll start to introduce new requirements.

If you started with a servlet, I'll ask you to separate the request handling logic from the presentation. If you started with a JSP, I'll find an excuse to work servlets in later.


Here's a change in requirements :

4. The value that the user typed into the box is a key for a database table T with columns Id and Name. You need to return a page that says "Hello <Name>".


Your answer will probably use JDBC but, if there is some other technology that you would rather use, that's just fine with me. You could say something about just calling a method that returns the name but I'll ask you to write that method anyway - you can't fool me ;-)

If you wrote all your JDBC code inside your JSP, I'll ask you to move it into a servlet. If you explain to me that it doesn't belong in the servlet and you'd rather introduce a data access layer, that would be just fine with me.


At this point, I'll introduce an architectural requirement.

5. You need to use EJBs. Why ? Because the architect says so.

Your answer will probably use some combination of session beans and/or entity beans and it will include the logic for getting an interface to your bean.

I'll ask you to explain how it works.

I might give you extra credit if you try to persuade me that EJBs are stupid and you would use some other technology but I'll still want you to know something about EJBs because a lot of our customers use them and they want to test them.

Next I'll ask you to explain how you would test the application.

If you start talking about typing edge cases into the textbox, I'll let you go on for a while and then ask you how you would automate that. If you say you would use WinRunner or Silk or WATIR or HttpUnit or whatever, I'll ask you how.

If you start talking about JUnit, I'll choose a part of the application and ask you to write a unit test for it.

[HINT : The unit test might require you to create an HttpServletRequest. new HttpServletRequest() won't work. Don't argue with me over whether HttpServletRequest is a class or an interface because I know. I checked.]


The best candidates will then get a follow-on question that asks them to speculate on a subject that they probably have not really thought about before.


There are no right or wrong answers to my questions. I am looking for an engaging discussion such as we might have every day if we hire you.

Good luck !


Posted by Kevin Lawrence at October 5, 2005 12:10 PM


Trackback Pings

TrackBack URL for this entry:
http://www.developertesting.com/mt/mt-tb.cgi/170


Comments

Man, you guys must be scraping at the bottom of the barrel (especially referring to your previous post).

Thats actually pretty cool... step by step, and if someone is nervous, they will quickly build confidence as they know they can satisfy you, and then ideally they will shine out from the rest by saying or doing something interesting.. you can then both share "war" stories and you know you might be on to a winner.

Posted by: Michael Neale on October 5, 2005 07:44 PM

Post a comment




Remember Me?