Kotlin tutorials

Reviews on best tutorials for those, who want to master Kotlin
02 June 2017   3940

Kotlin is one of the youngest programming languages. Despite it, Kotlin is now available for Android apps coding. The authors set a goal to create a more concise and type-safe language than Java, and simpler than Scala.

Kotlin

Statically-typed programming language that runs on the Java Virtual Machine and also can be compiled to JavaScript source code

This two facts made Kotlin super popular for studing. In this review, we will provide you with a list of the best Kotlin's tutorials.

Try Kotlin

Try Kotlin interfaceTry Kotlin interface

Interactive official Kotlin tutorial. In-browser coding, tons of examples and step-by-step learning. Will fit for newbies and skilled coders who want to master Kotlin. Also, some interesting information available at official Kotlin webpage here.

Kotlin Link

Kotlin Link interfaceKotlin Link interface

Giant database for every Kotlin fan. Contains links for books, courses, tests, official webpages, tools and many other. Simple desing and handy navigation.

KotlinLang.Ru

KotlinLang.Ru interface
KotlinLang.Ru interface

Online database for russian Kotlin coders. Contains a lot of translated materials. Website is opensourced, everybody can help to develop it by translating and editing the materials. 

Books

Kotlin in Action

Kotlin in Action
Kotlin in Action

Book for skilled Java coders, written by Dmitry Jemerov and Svetlana Isakova, developers in the Kotlin team. Rich for examples, this book covers interesting topics like creating DSLs with natural language syntax. Free preview available here

Modern Web Development with Kotlin

Modern Web Development with Kotlin
Modern Web Development with Kotlin

As you can see from the heading, this book is about web development using Kotlin. It covers basics to get started with concentration on the practical aspect of using the language. It guides you through the creation of a technology-packed Web application using popular backend and frontend technologies. Available here.

Which tutorial was the most interesting for you?

Kotlin is the programming language by JetBrains, a well-known developers from Saint-Petersburg, Russia. It is the 2nd official supported language for Android application development. We've collected the best tutorials for this language. Please, share your thoughts about the best Kotlin tutorial in your opinion.

Book "Kotlin in Action"
43% (6 votes)
Try Kotlin
36% (5 votes)
Book "Modern Web Development with Kotlin"
14% (2 votes)
Kotlin Link
7% (1 vote)
KotlinLang.Ru
0% (0 votes)
Total votes: 14

JetBrains to Roll Out Kotlin/Native 0.8

Version 0.8 of Kotlin/Native brings new features and bug fixes
13 July 2018   280

The project team of Kotlin / Native introduced the release of version 0.8. Corrections and additions have concerned the security of multithreaded programming, the expansion of library functionality and support for iOS devices. As always, alot of bugs are fixed.

Parallelism

Implemented the concept of object freezing

object Config {
  var width: Int = 10
  private set
  init {
    val file = fopen("config.txt", "r")
    if (file != null) {
              try {
              val buffer = ByteArray(2 * 1024)
                 while (true) {
                 val nextLine = fgets(buffer.refTo(0), buffer.size, file)?.toKString()
                 if (nextLine == null || nextLine.isEmpty()) break
                 val records = nextLine.split('=')
                 if (records.size != 2) continue
                 val key = records[0].trim()
                 val value = records[1].trim()
                 when (key) {
                         "width" -> width = value.toInt()
                            }
                          }
                        }
             } finally {
                fclose(file)
                    }
         }
}

This code considers the configuration file and will later receive the Config.width property. 

The Config file itself is divided for any number of threads or vorkers. After publication, the object is frozen and any attempt to change it will result in an exception (InvalidMutabilityException).

The second peculiarity of parallelism in the Kotlin / Native project is indivisible values and references. Let's add an image:

object Config {
private val icon_ = AtomicReference()
val icon: Image
get() = icon_.get()!!
fun updateIcon(file: String) {
val imageData = Image(file)
icon_.compareAndSwap(icon_.get(), imageData.freeze())
}
}

All information about the icon in the AtomicReference is frozen. Any changes are indivisible and similar information is visible to each client.

Kotlin Libraries

Starting v 0.8, the standard library (kotlin. *) is compatible with other platforms. Standard number generator and the function of mixing the collections are designed to eliminate the use of sharpened for a specific platform API. As an experiment, the project supports other libraries, for example, kotlinx.coroutines, kotlinx.serialization, and also the Ktor HTTP client.

Changes for iOS devices

Fixed issues with the publication in the App Store and the initialization of the platform. Support for the 32-bit ARM architecture of iOS processors, which allows using Kotlin / Native on older devices from Apple added.