Skip to content

Ten Interview Questions Every Development Lead Should Know

Originally posted on Developer.com, November 4, 2016.

The development lead is the bridge between being a developer and being the solutions architect.  When a developer wants to step up to the next level of the software development hierarchy, they may wish to become a development lead.  Depending on the organization, this position might not necessarily have formal management responsibilities for the developers, but instead focus their time on helping their development team be successful.

Every development lead will need to know these questions, which will reveal the skills and technical knowledge of a candidate, their creativity in creating their own tools to solve problems, as well as their ability to train, support, and lead a development team.  If you’re thinking about becoming a development lead, check out the article, Anatomy of a Software Development Role: Development Lead, for a comprehensive overview of what the job entails.

Q0: What do you do when you do a code review?

A: A successful development lead will know the focus here should be how the exercise isn’t a competition, “witch hunt”, or any other attempt to shame the developer.  A development lead’s focus should always be on improving the code and the developer’s techniques.  Answers should include topics like performance and security which developers need to be coached on.

Q1: What are your favorite patterns?

A: There isn’t a “correct” answer to this question, and “favorite” may not even be the best wording.  The goal here is to get the candidate to talk about a few patterns that they’ve used in the past, and why they helped to create better software.  Many development leads and developers have never spent time on learning patterns and why we use them.

Q2: How do you describe coupling and cohesion?

A: Coupling is when multiple objects are tied to one another, and can’t be used without each other.  Cohesion is the properties of an object that make it difficult to break down into further smaller objects.  Objects with high cohesion “make sense” as one thing rather than multiple things — even if that one thing is a container for other objects.  This sort of an interview question is trying to test a candidates’ ability to think strategically about building new objects.

Q3: What is lazy loading of objects?

A: Lazy loading of objects is only loading the information into the object when it’s needed.  It sometimes goes by other names but it’s about creating objects that aren’t so heavy that they take a long time to instantiate because this will create performance problems with the solution.

Q4: Why do you use lazy loading in objects?

A: The candidate should be able to discuss how lazy loading is used to improve performance. They should be able to describe how to recognize when only a small part of the object is needed for most operations, and restrict the parts that aren’t typically needed and are expensive to load.  Caching objects can only get you so far with performance – at some point you’re going to have to work on improvements inside of the objects themselves.

Q5: How do you prevent multi-threaded problems?

A: A candidate should mention semaphores and mutux.  Most languages have mechanisms for handling multi-thread locking to prevent multiple threads from simultaneously running critical code at the same time.  This question should also reveal a candidate’s ability to spot conditions where multi-threading issues might occur.

Q6: What is a covering index in SQL?

A: A covering index can be used to satisfy the entire query.  This reduces the need for SQL to read from the data table.  Often candidates confuse compound primary keys and covering indexes.  The impact of not having to read the data table can be a substantial boost to read performance – while incurring a slight penalty on inserts and updates.

Q7: What is a clustered index in SQL?

A: The clustered index is the order that the data is stored in the table.  This is the native order of the data and is the most efficient way to locate individual records.  The fields in a clustered index and the primary key for the table don’t have to be the same thing though they typically are.  It’s the clustered index that’s important from a performance perspective.

Q8: Let’s imagine that additional processor cores were allocated to a process to improve performance, but it didn’t.  What are some reasons that adding processor cores might not improve performance?

A: Answers might include that it could be the code is running single-threaded, and couldn’t take advantage of the additional cores, or that the CPU wasn’t the bottleneck.  If memory, disk, or network performance are the bottlenecks, a candidate should know that additional processor cores won’t help.

Q9: How do you determine what parameters methods should take?

A: Obviously the parameters that are needed but less obviously only the parameters that are needed. If the method only requires two attributes of an object, consider adding an overload that takes those parameters directly — and for simplicity a method that takes the entire object might be right.  The goal is to pass exactly what the method needs – and nothing more.

Q10: What’s difficult to test about static methods?

A: Static methods aren’t mockable and are therefore difficult to test.  A candidate will recognize the necessity in using static methods, but also understand that they should be used sparingly if unit testing is important to the organization.