Kotlin is a modern, statistically typed object-oriented programming language compatible with Java and JavaScript. Its features are designed to simplify programmers’ everyday work and help increase productivity. As the staff at JetBrains point out, it combines eloquence, expressiveness, efficiency, and ease of learning.

Kotlin has been in development since 2010, with its source code being distributed under the Apache 2 free license. In 2017, it became an official language of development for Android. Today, Kotlin works with Google Cloud Platform, Spring Framework, and Gradle, while the open source community creates various databases such as RxKotlin, mockito-kotlin, TornadoFX, Kodein, and ΛRROW. Projects like Square's Okio and LibreOffice are switching or planning to switch to Kotlin.

The language’s database on StackOverflow keeps growing, and so does its public Slack. To help make learning Kotlin easy, the company provides reference material in English on its official website, as well as on its blog, which is available in six different languages.

Learning is easy

Kotlin is fully compatible with Java, and code written in both languages can easily be combined within one project. At the same time, as lead Kotlin designer Andrey Breslav explains, the original idea behind Kotlin was that of a simpler, more pleasant development language. Due to its compatibility, Java users won’t have any trouble learning Kotlin, adds Roman Elizarov. According to JetBrains’ observations, more than half of the those currently switching to Kotlin are Android developers who used to work with Java.

Roman Elizarov
Roman Elizarov

“From the get-go, we developed Kotlin as something that would be easily accessible to Java users. We only differed from Java when it was necessary; most other things are implemented quite similarly. Our practice shows that it takes two days to two weeks for Java developers to learn Kotlin,” says Roman Elizarov.

As for developers who use other languages, learning Kotlin for them isn’t that different from learning any other new language.

According to various estimates, there are approximately 2,000 different programming languages in the world. Old languages still receive updates while new ones continue to appear. For that reason, companies compile rankings of top programming languages (here is, for instance, the latest TIOBE Index). Despite Java’s continuing leadership position, the top-20 is constantly in flux, and so are the technologies used to create software. In order to remain relevant, programmers have to learn fast and stay up to date on the newest tools and tech. As Roman Elizarov tells us, today’s professional programmers are well-versed in at least three programming languages and are familiar with at least another ten.

Getting started

Those who are just starting to get into Kotlin would benefit from checking out the official guides put out by the language’s development team: the full library can be found here. Newcomers can choose from a variety of materials: from online courses and books to blogs with in-depth analysis of specific problems.

Books

Kotlin in Action

By: Dmitry Jemerov and Svetlana Isakova

As Dmitry Jemerov explains, the book is intended for programmers experienced in Java and focuses on Kotlin’s capabilities for JVM and Android development. It includes an overview of the language’s specifics and its most interesting features such as support for high-level abstractions and domain-specific languages. Parts of the book explore Kotlin’s interaction with Java and its integration into existing projects.

Kotlin for Android Developers

By: Antonio Leiva

Recommended by both Google and JetBrains, the book focuses on the parallels between Kotlin and Java. As its author explains, the readers are able to learn about the differences between the two languages and how Kotlin makes work easier thanks to specific examples.

Atomic Kotlin

By: Bruce Eckel and Svetlana Isakova

This book, still in early access, is available as a course on the Stepik platform, with a free sample available on its official website.

Online courses

1) Introduction to Kotlin Programming (in English)

This is a simple introductory course to Kotlin. As its author, developer Hadi Hariri, notes, Kotlin’s main feature is its similarity to Java, C# and JavaScript; so if you’re already familiar with any of these languages, you’ll easily tackle this course and learn to ‘speak’ Kotlin on your first day.

2) Introduction to Kotlin (in Russian)

Developed in collaboration with JetBrains, this course is intended for students who are only starting to learn about programming and aren’t familiar with Java. Completing this course will help you learn enough to start solving simple and practical problems using Kotlin and continue your foray into programming.

3) Svetlana Isakova and Andrey Breslav’s Kotlin for Java Developers (in English)

This course includes a basic overview of the language as well as a look into the key topics regarding the integration of Java and Kotlin. Authors Isakova and Breslav explain the basic syntax, functional programming, object-oriented programming, the capabilities of Kotlin’s basic library and Java compatibility.

Practice

If you’re a Java programmer and want to check out what Kotlin is all about, you’ll want to check out the Reference section on Kotlin’s official website. You can also try to learn it via practical tasks using Kotlin Koans. This series of exercises of various difficulties is designed to introduce developers to Kotlin syntax.

There are three ways to use Kotlin Koans: online; through IntelliJ IDEA or Android Studio by installing the EduTools plug-in and choosing Kotlin Koans; or by cloning the project on GitHub.

The new online sandbox play.kotl.in also includes koans, examples and the ability to create embeddable code snippets; the EduTools plug-in lets you learn Kotlin right in the IDE.

Webinars

Programmers of any level of proficiency will benefit greatly from the webinars on Kotlin 1.3. Recordings of every seminar from KotlinConf 2019 are available on the official JetBrains page on YouTube.

Community discussions

Aside from official resources, there are plenty of other materials online. Roman Elizarov emphasizes that Kotlin is an open language, and anyone can post their suggestions and improvements on the GitHub page.

Experience developers are always keen to help newcomers and suggest solutions to particular cases, which makes community involvement crucial.

“Third-party resources are best used as a source of inspiration,” says Roman Elizarov “Of course, it’s better for newbies to start with official sources: our website, reference materials, books, etc. These things describe the general information but, perhaps, lack answers to specific questions. In that case, you always have the community and blogs where users specialize in niche topics. There’s always going to be someone to help you out or suggest relevant materials.”

Links to official sources, social network community pages, books, libraries and more can all be found here. If you’re looking for tutorials and practical advice, check out the SuperKotlin blog.

Kotlin at ITMO University

Staff members of JetBrains teach courses on Kotlin at several of St. Petersburg’s universities. At ITMO University, Kotlin is taught as part of several educational programs and to all students of the Information Technologies and Programming Faculty. Since Kotlin has been recognized as an official language of development for Android in 2017, it is currently taught from the perspective of mobile development.