Interviewing Job Candidates

I started out writing a bit about mock objects but this topic has been on my mind lately so I’ll cover it first. Plus, my mini rant about the proliferation of long resumes seemed to hit a nerve.

I’m curious how others approach their interviewing? Do you go hardcore on the tech questions? Or ask specific questions about their experience? Maybe you look for aptitude more than direct relevant experience?

I’m been trying to hone my approach lately. In some ways my approach has to been to give the developer open ended questions and see if they answer them or hang themselves, to borrow a phrase. Basically, I start asking questions about decisions they have made at previous jobs and projects that they list on their resume. The first thing it tells me is if they actually worked on the projects I find interesting. You’d be surprised at what I come across. I had one guy spend almost half a page talking about these business processes that he built so I asked him how they were configured (i.e. XML or some other metadata) and what tools he looked at to help him solve the problem. He immediately fessed up that they were just hard-coded Java classes and weren’t really workflow. That pretty much sunk his interview, although he wasn’t doing great up to that point anyways. The good candidates tend answer the questions pretty quickly and don’t go overboard with their descriptions. They show they know their stuff and then tend to ask questions back about what other specific things I’d like to know. Bad candidates usually go off on tangents and never get around to answering the question. I don’t stop them, either. I want to see how far they’ll go.

The next step after these types of questions tends to be specific questions about tools that they have listed knowledge about that I have strong knowledge in. For instance, if they’ve listed Hibernate experience and claim their skill level is like a 6 or 7 out of 10 I ask specific questions about the difference between the session and second level caches. If they know that then I go in to questions about how they’ve configured Hibernate. Then maybe on different ways to model a many-to-many type of relationship. I like to dig and see if they’ve really used the tool and then pose what-if questions to see if they understand the tools they use as well.

Last (hey, I only usually have an hour with them) is the coding challenge. We make candidates code. Lately I’ve been using a challenge to make them write a random weighted list implementation. It’s basically a weighted round robin algorithm implementation. The code for it is actually quite simple. It’s maybe 8 real lines of code if done correctly…something like that. The first thing it tells me is if they can think through a problem and come up with a simple solution. The last thing I want is for them to start inspecting return values and insuring a specific statistical return percentage based on an item’s weight. That’s just ridiculous. The second thing it tells me if they read requirements. I give very specific requirements and in some ways make it easy if they would just read and think for a minute or two before starting their response. Most don’t. I then look at the solution. If they do things like make the class immutable to keep the implementation simpler then they get bonus points. Even more if they can coherently explain why they did what they did as well. Hey, they might have seen the question on the Internet and are good at regurgitating without understanding.

So anyways, after using this approach for a while I’ve started to ask a little more Java related skills to see if they understand the language and programming concepts in general. It seems that folks that know the little things tend to be developers more interested in their craft as well. My latest test (and I came up with this when discussing the answer to the first question with a candidate) is to give them a simple Java class that is mutable. It has a default constructor and a getter and setter for an attribute. I then tell them to modify the class to be immutable. No sub-classing or anything like that. Just change the code. Again, I get some very strange looks and even stranger responses. It’s kind of boggling that people with a good deal of experience don’t even understand the concept of immutable or can even describe its benefits.

That was longer than I expected. Well, if you guys have any ideas or tests you like to use, drop me a line and let me know what you do and more importantly why you ask and what their answers tell you. That’s more important than the question in my opinion.

Using Rome to Generate RSS Feeds

I wanted to add RSS feed support to my project and ended up choosing Rome. I did this a while back so I honestly don’t remember the other toolkits I looked at. I do remember posting something and getting feedback pretty quickly from one of the Rome authors so I figured that the project was still pretty active.

It was pretty easy to generate a feed with the toolkit. I know that some people probably use it in more advanced ways or have more complicated needs but I just needed to be able to pass something a list of objects and have it spit out a feed in a particular format. Nothing too fancy.

Here’s a quick run down on how simple it is to create a feed:

 SyndFeed feed = new SyndFeedImpl();
 feed.setFeedType(format);
 feed.setTitle(title);
 feed.setLink(link);
 feed.setDescription(description);
 
 List entries = new ArrayList();
 for(Object item : listOfItems) {
     entries.add(entryAdapter.createSyndEntry(item));
 }

 feed.setEntries(entries);

In the code above the items such as format, title, link and so on are passed in to this function. The entryAdapter is also provided and acts as a translator to move data from a domain object(s) to a syndication entry (SyndEntry). There is generally one entry adapter implementation for each type of object I make availabe in an RSS feed.

The next step is to send the feed to an output target. In most cases you would just set this to be the servlet’s output stream. Here’s the code for that. Assume the Output is also provided as the writer instance.

 SyndFeedOutput output = new SyndFeedOutput();
 try {
     output.output(feed, writer);
 } catch (FeedException e) {
     throw new RuntimeException("Failed to write output", e);
 }

Rome supports multiple formats including all RSS versions and ATOM 0.3. I’m not sure if I’ll need more of the framework but they made it pretty easy to export feeds so it passed my first test. The next step is possibly caching feeds for popular requests so that I don’t have keep retrieving the necessary data and generating the feed.

Some Dancing and Some Trapping

The Evolution of Dance – I guess I don’t really go to YouTube very often but this was the most viewed video on YouTube at one point. Here’s the guy’s site as well. It’s worth the 6 minutes, it really is. And who here has done at least some of those dance moves before? Come on, fess up.

Trappers – This is one of my all time favorite Kids in the Hall sketches. “Let him go, he has spirit. Someday he might make vice-president”.

A Few Good Video Clips

I thought I’d start a video category and post links to fun videos I come across.

One of my all time favorites is an SNL video featuring Christopher Walken. Has there ever been a better character actor? Pulp Fiction, The Rundown, etc. Anyways, here’s the video – Blue Oyster Cult – I gotta have more cowbell!

Ever wonder where lifeguards go to the bathroom? Jamie Kennedy shows you here.

And if you haven’t seen Stephen Colbert’s roasting of President Bush, then you really need to watch this. Can you believe he did this with Bush sitting right next to him. His are made of steel I tell you.

What’s Up With Huge Resumes?

What’s up with huge resumes these days? The company I work for has been hiring lately and so I usually end up interviewing one to two people a week. Lately I’ve been seeing huge resumes from developers. I mean like 9, 10, and 11 pages for guys with maybe 7-9 years of experience. I have 12 years of experience and my resume is at 3 pages or so. It might have gotten in to 4 but I’m going to start removing stuff from jobs beyond 10 years I think. They’re not relevant and just make the resume go on and on.

Anyways, back to the relevant stuff. These resumes just go on and on (and ON) with mind numbing detail such as, “Configured log4j properties files”. What??? Why would I care about that. Great, you can use log4j, I must want to hire you now. But seriously, they put way too much detail about what they have worked on and I want to take a nap before I get through 2 years of experience. I just want bulleted items of the important things they actually did and/or were responsible for. These people are also the ones that didn’t run spell check on their resume usually. Hint: Education is not spelled with two Ts. What’s worse is that most of these resumes come from recruiters. I actually think it’s the recruiters that tell these people to fluff up their resumes. The recruiters should get dinged for not even proof-reading the resumes. Or at least lose a few % of commission. It’s just pathetic.

And last, people, get your resume right! Contrary to the belief of some, Struts is not a methodology. Neither is UML. UML is a modeling language, folks. The RUP is a methodology.

Another fun little tidbit: In Microsoft Office, if you type “JBos” instead of “JBoss” it will correct it to “jobs”. Proofread please!

Unit Test Code Coverage With Emma

Code Coverage Tools

While unit testing is a good start and it’s admirable to try and insure all your unit tests actually pass, it’s somewhat useless if you don’t know how much or what part of your code base doesn’t benefit from unit testing. Even the most committed developers of unit testing or TDD will miss covering some portion of their code. How do you try and prevent this from happening? Enter code coverage tools. The best known is probably Clover from Cenqua but for those of us working on our own home grown projects or that just like to use open source tools there is Emma.

Works Great!

I’ve been using it for MyThingo and it’s been very helpful. I’ve uncovered a few bugs that I didn’t know existed and hadn’t been uncovered by my unit testing up until now. Emma works by instrumenting your code and then you execute your unit tests using the instrumented class files. At runtime you set variables that tell Emma were to keep it’s coverage database and then after your tests execute you generate the report from that data. It seems to work very well and has a pretty comprehensive report of coverage including views of all your code with color coding to show which lines have and have not been executed during your tests.

Shortcomings

I have to admit that I miss the spit and polish that Clover seems to have. For example, Clover tells you how many times a line has been executed. While not critical it is a nice to have and I would expect this data is available in clover but just not exposed. If I get some time I may look into the report generating code and see what’s available. The integration of Clover in to Eclipse is also a very nice to have feature but again, isn’t critical.

Conclusion

Code coverage is one of those things that isn’t talked about much in unit testing circles. Okay, it is at times but not many developers I have worked with over the years really pay much attention to it. It is a critical part of your code testing infrastructure, however. You can’t just accept the fact that your unit tests pass. You must know how much of your code base is actually tested and then make sure that the parts that aren’t tested aren’t necessarily critical. It’s something I’ll harp on but in addition you have to make it brain dead simple. It has to be part of your build and not require any special attention by developers. It has to be part of your nightly build so reports are kept up to date as well. And finally, someone actually has to pay attention to the results and encourag developers to increase their coverage scores. If you do all this I think you’ll definitely see an improvement in the quality of the code that is delivered to QA and your users. And just think, better code going in to QA tends to mean shorter QA cycles which means faster delivery.

Transferring Eclipse Configurations

One of the pains of working with Eclipse RC releases is moving from one to another. I don’t like using downloaded plug-in packs such as WTP, Mylar, Spring IDE, TestNG, Subclipse, etc. because they get updated pretty frequently, especially to keep up with changes in the RC releases. But I also hated having to keep track of all the update site URLs that each of them has. Then, someone says, “Why don’t you just export your sites and then import them when you drop in a new Eclipse RC?” Doh! I have no idea why I missed that button before. Sometimes I just don’t look at the UI I’m using.