Interviews on Trivia

I’ve started interviewing again now that I should be finished with my Master’s degree in a month or so. I’m reminded again of the wide range of interview styles people use. My least favorite is the trivia test. This seems to happen more often with Java-related job interviews than Ruby-related ones.

I may never understand why any employer would value memorizing the Java API over being able to reference the docs and know where to find things.

I had such an interview just last week. Here are some of those questions

  • How do you execute a PL-SQL stored procedure from JDBC?
  • How do you import classes into the classpath of a JSP page? (apparently ‘no one in their right mind does that anymore’ isn’t a good answer to this one)

Who memorizes that stuff?

My favorite question of all was this : what are the two conditions under which a finally block is not called. I got one of them, (System.exit()) but the interviewer wouldn’t even tell me the other one (“You won’t learn that way”). I googled it later to find the answer not well defined. One of the ways I saw mentioned was the thread “dying” but Thread.stop() is severely deprecated so that shouldn’t ever happen. The other answer I saw floating around doesn’t really fit – when a exception is thrown from the finally block it doesn’t complete, but the finally block is still called.

I was talking about this with Frank and he came up with another way: infinite loop in the try block. I then thought of calling PowerSystem.getMainPower().setPosition(OFF).

Now I can’t wait to get that question again!

2 thoughts on “Interviews on Trivia”

  1. >> Who memorizes that stuff?

    1. People studying for the Java certification.
    2. People preparing to interview James
    3. No one else in the known universe

    >> what are the two conditions under which a finally block is not called?

    I thought of another. When you don’t write a finally block.

  2. This sort of stuff works when you’re interviewing to be a doctor, because most of it is memorizing things anyway, it’s not like someone’s going to throw a sick person in front of you and you get to try out different approaches until you find a solution that compiles and runs smoothly. Unless you’re Dr. House. But that kind of makes me afraid of going on interviews because I’m totally not good at that useless trivia crap (like the “what does the volatile keyword mean” question that Eben always asked people) and I sure as heck hope people don’t take that to mean that you aren’t a decent programmer.

Leave a Reply

Your email address will not be published.