My Favorite Inverview Question - No Fluff Just Stuff

My Favorite Inverview Question

Posted by: John Heintz on August 27, 2008

In a recent discussion interview questions came up, here's my favorite one.

To set some context this question is designed to gauge the abstract and critical thinking of a generally inexperienced developer. I don't usually use this for very experienced developers, but may if I think I'm getting shallow or suspicious answers.

Here's what I start with:

I'm friendly but not at all helpful while I do this.
  • I draw it out by hand on a whiteboard or on paper
  • I verbalize the relationships
  • I offer to explain the notation and meaning of "is-a"
  • I ask them to think out-loud
  • I hand them the writing instrument
Then I just ask the candidate for their impressions of the model.
  • What's good? What's bad? What would you change?
A few obvious things that the candidate should work their way around to:
  1. A "Deer" is an animal also.
  2. A "Cow" could be "Food" for a "Tiger".
After watching them squirm for a while, I then make one addition to the original model. I add a single method/operation to the "Animal" class.
Again, I ask them for their impressions.

If they don't get to it themselves I make sure to ask the following questions:
  1. What happens if a "Deer" is passed to the eat method of a "Cow"?
  2. How would you change the model to handle or avoid that problem?
Enjoy!
John Heintz

About John Heintz

Agile/Kanban coach, REST architect, software craftsman

John D. Heintz is a husband, father, developer, Agilist, entrepreneur. After studying electrons in college, John's intuition led him to pursue software, and he's been a digital craftsmen since. Always seeking solutions with higher leverage and deeper simplicity has led John to important methods and tools. John's approach to building systems and teams started with leading his first Scrum team in 1999, included XP and TDD, and now Agile and Lean methods are part of his daily work and consulting. John has built single-source hyperdocument SGML publishing systems, a version control CORBA/Python CMS, an AspectJ dependency acquisition framework, added test automation to many Java and .NET systems, coached a 100-person Agile/Lean game studio, and built RESTful Web integration systems. John has launched his own company, Gist Labs, to further his focus on essential innovation.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »