Kotlin - Udacity - Google

Lots of amazing companies, such as Pinterest, Netflix, Lyft, and Capital One (not to mention Udacity!) have embraced Kotlin in their tech stacks. And ever since Google announced official support for Kotlin for Android development, there has been a huge surge of interest in the language. Now Udacity, in partnership with Google, has announced the new Kotlin Bootcamp for Programmers course. This is a free course where you’ll learn the essentials to start building your own Kotlin projects.

But why should developers learn Kotlin? In this article, we’ll look at Kotlin’s benefits and explain why YOU should seriously consider adding it to your skillset.

Here are six reasons why every developer should learn Kotlin:

1. Kotlin experience is in demand

The Realm Report, which surveys global mobile developers about the languages they use, declared that 2018 would be “the year of Kotlin.” The study finds that 20% of the apps built in Java before Google I/O 2017 are now built in Kotlin. This surge in use is reflected in the growing call from companies for developers with Kotlin skills. Take a quick look at Glassdoor, for example, and you’ll find that many “Android Developer” roles at major companies now ask for Kotlin experience as an essential requirement. Realm forecasts that Kotlin will be the dominant language for Android by the end of 2018, so demand for Kotlin skills is clearly set to continue its remarkable growth.

And it isn’t just in Android! ITJobsWatch found that the number of job listings requiring Kotlin skills had jumped 345 places in their ranking of all IT roles in the last six months. This included around 20% of listings that were looking for Kotlin in combination with server-side development skills like Spring and AWS.

2. You’ll develop projects faster

Kotlin requires fewer lines of code to do the same things as other programming languages. It is an inherently concise language, so can solve many common development problems with just a few lines of code.

For example, you can filter a list using a lambda expression like this:

val positiveNumbers = list.filter { it > 0}

And if you want a singleton, you simply create an object with:

object ThisIsASingleton {
 val companyName: String = “JetBrains”

Kotlin keeps things brief by adding powerful, concise abstractions that don’t affect the readability of the code you create. This means you can write code quickly and spend less time in code review, leaving you more time to deliver the additional features your users request. This quote from an article on Techbeacon.com explains this benefit really well:

“Developers love clean, concise code. Less code takes less time to write, less time to read, and is less susceptible to bugs…[JetBrains (the organization that created Kotlin)] understood the pain developers face in day-to-day developer workflow, and with Kotlin it has attempted to address those.”

3. You’ll improve the quality of the apps you build

Kotlin improves the quality of your released apps through “safety” features that have been designed to reduce the number of bugs and system failures. For example, it has a strong type system based on null-safety. This means by default, variables can’t be null, so you can catch more errors at compile-time before shipping to users. This is really useful. Null references were famously called a “billion dollar mistake” by their inventor, Tony Hoare. This is because of the innumerable computer errors and system crashes they have caused since their inception in 1965.

4. You can use it with existing Java libraries

Kotlin is 100% interoperable with Java, so apps you’ve already built can be migrated to Kotlin incrementally. You don’t need to stop using Java—you can use both! Extension functions give you a way to add functionality to existing classes (even Java classes) without a full rewrite to Kotlin. This means you can take advantage of Kotlin’s powerful features without having to abandon all the skills you’ve gained while building existing apps.

5. It’s officially supported by Google for Android development

Google announced official support for Kotlin at Google I/O in May 2017, saying:

“Kotlin is a brilliantly designed, mature language that we believe will make Android development faster and more fun … Many, many developers have told us they love the Kotlin language. (Many of our own developers on the Android team have been saying similar things.) … The Android community has spoken and we listened.

Just a year later, and Google told the audience at I/O 2018:

“35% of pro developers use Kotlin … more and more Android development is going to Kotlin and we’re committed for the long term.”

Google’s commitment means Android Studio 3.0 fully supports Kotlin development, so you can get started without needing to learn a new tool. You can convert between Java and Kotlin code through a simple button click within Android Studio.

Kotlin - Google I/O 2018
Kotlin on stage at Google I/O 2018

6. There are many resources for building your skills

Anyone who has ever used Java will find Kotlin’s functionality very recognizable, so learning Kotlin is straightforward. There are great resources available to quickly learn basic syntax and more advanced topics—start by looking at the language reference and try solving some Kotlin Koans (interactive exercises designed to help developers become familiar with Kotlin). The Kotlin developer community is a great resource for expanding your knowledge, and is growing rapidly. The Kotlin Slack channel is particularly active and is regularly recommended by new developers.

The professional and business benefits for learning Kotlin are compelling. It improves developers’ productivity, makes debugging easier (because there’s less code to inspect), and increases the pace of app development. It’s easy to learn and can be used within existing apps because of its interoperability with Java. These benefits help explain why it’s such a hit with developers.

If you’re ready to start learning Kotlin, sign up for the Kotlin Bootcamp for Programmers, developed in partnership with Google.