Interview Questions for Scala Developers

Photo by Tim van der Kuip on Unsplash

Having screened the resumés, what usually follows is the phone/video interview. This is beneficial as you can ask behavioral questions to gauge the candidate’s reaction to real-life scenarios. As this is the common clincher that determines if a candidate will go on to the next phase of the face-to-face technical interview, it is essential to ask the right technical questions.

Whilst the questions vary according to the skills needed, they should be relevant to all Scala developer positions.

Q1: What is pattern matching?

Why this question: Because Scala has an integrated mechanism for general pattern-matching which means you can match it with all sorts of data with a first match policy.

Q2:  What are case classes?

Why this question: Scala is unique in having case classes. These are in fact just regular classes with a few extra conditions on top. Immutable by default, they are decomposable through pattern-matching, using comparison to structural equality instead of by reference, and succinct to instantiate and operate on.

Q3:  The object-oriented patterns that are implemented in Scala?

Why this question: All Scala developers should know the three principal object-oriented patterns – a) Singleton gives Scala ability for the realization of the Singleton pattern in the language; b) Tuples enables value object patterns, type, or case classes; and finally c) a lazy keyword which provides lazy initialization

Q4:  What is a trait and is there any equivalent in Java?

Why this question: Traits closely resemble interfaces in Java and they are partially implemented.

Additionally, a few behavioral questions will help you judge the candidates reaction to given situations.

Q5:  Commercial experience in the last 2 years? Responsibilities and main achievements?

Why ask these questions: Programming skills are not created the same way. You will find that developers frequently have a range of interests and have experimented with different technologies. You need to see which languages they have a working knowledge of as opposed to those they have just experimented with and furthermore their usage of the technology in a commercial context.

Q6:  Their appreciation of Java open source library value?

Why ask this question: Given the aforementioned interoperability with Java and that it has more libraries related to the Scala engine, it is key to understand just how many libraries your candidate has mastered and those, in particular, those outside Scala and their usage of these.

Q7: You mention framework X on your CV. What do you think about it and is it the best choice?

Why ask this question: Knowledge of the language to complete a project efficiently is not enough. What really matters for a candidate is their grasp of tools and resources that will widen their scope of achievement. Their answer to this question will confirm how at ease they are with these outside resources in order to boost their software development.