Employment · Software Design · Software Engineering · Software Testing

The interview question no one asks

Everyone has a favorite interview question. I have mine. I have never been asked this question on any software engineering job interview I have ever attended. However, I firmly believe this question tells more about a candidate than all the good old standbys (e.g. “reverse a linked list” and “write a thread-safe singleton”) do put together. So… ready?

Describe all the unit tests you would write for an implementation of java.util.List<E>  or your platform’s equivalent. No need to write out the test code – just list the test cases.

That’s it! The interface being tested can vary from candidate to candidate. The important thing is that this question shows you how good the candidate is at proactively anticipating bad inputs, boundary conditions, and special cases. It is a truly universal and essential skill for all engineers, even those not fortunate enough to work in a test-driven environment.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s