I need to do some reading on effective interviewing strategies and I think I will adopt a more conversational rather than inquistorial style.
I wanted to make sure I asked in-depth questions that would demonstrated in-depth knowledge about what we need from a developer and the points I saw on the guy’s resume (Java, Java EE, Spring, OOP, Hibernate, etc.). I had more questions in each section, but I had to skip past stuff because I wasn’t getting answers I liked out of the guy.
Do you guys think these were reasonable questions to ask in an interview? I was really more interested in the candidates reasoning than knowing exact answers. This was a phone intervew. The guy gave me good “book” answers (sometimes seemed like he was reading from a book, hmm). But when I started asking “why?”, he couldn’t give good answers.
Some basic platform stuff:
- List three Collections interfaces and the basic contract of each. List concrete implementations of each, how they differ, and performance characteristics in space and time.
- Describe the contract of equals and hashCode. Why is it important that if you implement one, that you implement both?
- What are generics? What is type erasure and what are the consequences? What are variance, covariance and contravariance? If blank stare: why can’t you assign a collection with a generic type binding of a sub type to a reference to the same collection type binding of the super type? How do you specify the type binding of the super type to allow this? How do you specify the type binding to allow type-safe insertion?
Concurrency
- Explain how notify and notifyAll work, and the difference between the two. Why prefer notifyAll to notify?
- What is a deadlock and how do you avoid it?
- What is a race condition and how do you avoid it?
- What are some of the high-level concurrency classes provided by java.util.concurrent and how do they work?
Database
- What are the different statement types and why would you use each?
- How do you prevent SQL injection attacks?
- What are transactions? What is ACID?
Hibernate
- Give an overview of Hibernate and ORM. How do you load objects into the session? What does the session do with the objects while in the session? What is the difference between getting a persistent object from the session and querying for persistent objects?
- When is it better to use plain SQL instead of ORM?
Java EE
- How do you configure a DataSource in Weblogic to make it available using JNDI?
- What are some ways for the client to obtain a reference to the DataSource from the app server? (Spring is not the answer I am looking for)
Spring
- Give an overview of how Spring Dependency Injection container works. What is the purpose of DI? How to specify bean definitions? What are the different scopes? When do beans of each scope type get instantiated?
Web Services
- What is the difference between SOAP-based web services and REST-based web services?
- Describe SOAP and WSDL.
- What exactly is REST? What is HATEOAS? What is the purpose of each of the HTTP verbs? What is idempotence? What is content-negotiation?
OOP
- What is decoupling? Why are loose-coupling coupled classes desirable? What are some drawbacks?
- What is cohesion? Why are highly cohesive classes desirable? What are some drawbacks?
- Describe polymorphism. What is the importance of contracts between interfaces and concrete types? Why is polymorphic code desirable? What are some drawbacks?