Kotlin: 7 Reasons Why We’re Using it at Vivid Seats

Kotlin is a relatively new programming language, especially when it comes to developing Android Apps. Version 1.0 was released by JetBrains in 2016, but it was not a well-supported language for Android Apps until 2017.

Kotlin in action

The Vivid Seats Android App was released in early 2015. When creating the initial version of our app, Java was a natural choice. It was the go-to language for native Android Apps at the time. Additionally, our staff engineers were quite well-versed in Java, as our backend systems are Java apps. Thus, we naturally proceeded to write and release our initial Android App in Java. We continued to iterate on the app in Java without much thought for a change.

However, when Google announced first-class Kotlin support at Google I/O in 2017, we decided to change course and start adopting the new and exciting language. Initially, we began with small experiments such as writing a handful of tests in Kotlin. As it continued to gain momentum in the community and as our engineers became more familiar with it, we decided to choose Kotlin as the primary language in our Android App going forward.

Here are seven key benefits of using Kotlin in our Android app and the reasons why we’ve made the decision to use Kotlin at Vivid Seats.

1. Compared to Java, writing Kotlin requires fewer lines of code

If you know anything about comparing Kotlin to Java, this benefit might seem obvious. However, it’s worth calling out: the usual Java boilerplate code required for fundamental operations is no longer required. This allows our team to introduce new classes faster and reduce the number of lines of code they must support. Ultimately, this reduces the chance for errors and makes our team more effective.

2. Kotlin helps produce code that is less error-prone with a better type system

Anyone who has written an app with Java, or many other languages for that matter, has run into an issue with a null pointer exception, null reference exception, or similar. Kotlin minimizes this issue with null safety, whereby the language’s type system eliminates any potential danger of null references. Put simply: the compiler helps an engineer find potential issues in their code earlier in the development process. This enables the engineer to write code that is less error-prone, resulting in fewer defects and avoiding negative business impact. Null safety is one of many examples of how Kotlin helps our engineers write code that is less error-prone.

3. Kotlin is interoperable with our existing Java code

One of the most important factors in our choice to proceed with Kotlin was its ease of interoperability with our existing Java codebase. We were able to start writing new classes in Kotlin immediately. This has allowed us to aggressively adopt it throughout our codebase. The only notable issue we’ve had with interoperability has been considering nullability constraints, however this has been relatively easy for the team to resolve.

4. Kotlin is a major trend in the industry

Being aware of industry trends is crucial to the success of an engineering team. JetBrains and Google are driving Kotlin and numerous large-scale companies have adopted Kotlin in their apps. When it comes to mobile apps, there are other trends for cross-platform alternatives such as Flutter or React Native. We have experimented with these technologies at Vivid Seats, but Kotlin has proven to be the best fit for our team.

In our industry, Kotlin is also being used in several use cases outside of Android apps. These include server-side applications, iOS projects, and more. Now that we have a team of engineers well-trained in Kotlin, we have the ability to leverage Kotlin in more areas of our engineering stack.

5. Adopting Kotlin allows for new programming techniques

Kotlin is an ever-evolving language, and it is adopting new features that our engineers have been eager to utilize in our codebase. Techniques and features such as functional programming, coroutines, streams have been adopted by the team, whether in our proper Android codebase, POCs, or side projects. With Java, similar concepts lag behind or are simply not possible.

6. Kotlin improves developer happiness

Since our team has been writing Kotlin, our engineers have been happier with the day-to-day work. In informal polls, every single mobile engineer prefers Kotlin over Java. This might seem trivial, but developer happiness and improved tooling makes the team more effective, helps retains talent, and offers opportunities for individuals to learn new skills.

7. Kotlin positively impacts attracting new team members

Attracting and recruiting top talent is quite difficult in the competitive engineering job market and adopting Kotlin has improved our position. Vivid Seats is growing substantially as a business and our team is scaling to support it. When discussing our tech stack with candidates, Kotlin is generally received as a positive.

Most notably, engineers who are not currently writing Kotlin regularly in their job are very eager to learn Kotlin. Most great engineers are constantly learning new skills to improve individually. We are able to train these individuals in the new skill and we are able to offer an environment where they will write production-ready code in a new language every day. This is a huge boon to our prospective job applicants.

Was this information helpful?

We hope sharing why and how we are using Kotlin at Vivid Seats can be helpful to others. Special thanks to a handful of our engineering team members for assisting with this article, namely Geoff Powell and Sumedha Gupta.

Additionally, we are actively hiring for several roles on our engineering team. If you’re interested to learn more about open positions, check out our careers page at vividseats.com/careers for more information.