KotlinConf is the first ever conference that is all about the new favorite language Kotlin. The event is held by Jetbrains officially at Pier 27, San Fransisco. It is two day long and you can see many developers from big companies like Google, Gradle, Pivotal, Facebook giving talks or or attending events themselves. I was lucky enough that I purchased my ticket for $99 on the first day they announced the event, and four friends/coworkers of mine went together, making this event even more enjoyable.

Overview

The KotlinConf has 45 different talks in two days, covering the “full stack” development topics from JVM platforms (Android, backend), javascript, to even the latest target Kotlin/Native development (WebAssembly and iOS).

At the beginning of both days, there’s a Keynote session. To close each day Jetbrains had one “Party Keynote” (which is a lot of fun) for the first day and other “Closing Panel” at the very end of the conference for people to ask any questions. Also at the first evening Jetbrains hosted a party where participants can have free food, play games, or hangout with other developers.

All the sessions are recorded and published on YouTube. If you weren’t able to make it or want to watch them again, you can find them via:

Keynote (first day)

The first keynote was given by Andrey Breslav from Jetbrains. It covers upcoming major developments for Kotlin:

  • Kotlin 1.2 RC: the important feature is Multiplatform project support with which you can start development one codebase for a complete project containing server, web, and mobile. To demonstrate the potential of multi-platform projects, Jetbrains show off a KotlinConf Spinner project that is all written in Kotlin. You can install the Android app and iOS app to see how it performs. The source code of entire project can be found here: JetBrains/kotlinconf-spinner
  • Kotlin/Native iOS Support: The support is done via LLVM which is the same toolchain used by native iOS development.
  • Kotlin/Native IDE Support: CLion now has a plugin for Kotlin/Native support. By the way, isn’t CLion pronounced the same as sea lion? :)
  • Ktor 0.9: Ktor is a web framework maintained by Jetbrains.
  • Creating Modern Web Apps with React and Kotlin: now you can start a new React.js project with Kotlin in npm
  • Multiplatform Projects Demo
  • Learning Kotlin: EduTools is the best way to explore and learn Kotlin
  • Future Directions: mainly about 1.3, and there’s no roadmap for 2.0 yet.

If you need more detail description, Jetbrains has an blog post about everything I mentioned above: KotlinConf Keynote Recap

Keynote (second day)

The title of this session is My Life as a Tech Transfer Monad, and the setup is not different than a regular session. However the talk is given by Erik Meijer who is a well known developer. In case you don’t know, Eric Meijer is a “computer scientist” who has a dedicate Wikipedia page!

He currently works at Facebook, but at his early years at Microsoft he worked on LINQ and reactive programming framework. I don’t know much about C# but LINQ is something I found very useful and unique to the language, and reactive programming is also somewhat a norm of modern programming style. Yes not many people realize reactive programming started at C#, and Erik Meijer is the major contributor to it.

In the talk Erik shares his thoughts about the future of programming. He thinks developers should start thinking “continuous” instead of “discrete” programming. He gives the sample of [1, 2, 3] -> [2, 4, 6], and future programming solution should be “when input is 4 there is 99% of chance and output will be 8” instead of simply saying the output “should be 8”. (yes, it’s all about machine learning)

Also something unique to his presentation is he wrote and drew most of his slides. The presentation is fun and inspiring, and I highly recommend to watch it!

Talks I went to and recommend

I wish I could go to every talk in the conference. We all have to pick and guess which we would learn the most. Here are some talks I found interesting or informative, and I hope you would enjoy too. Again most of the talks are uploaded to YouTube. Don’t miss anything you might like.

Coroutines (2 talks) by Roman Elizarov

Introduction
Deep Dive

Coroutines are not specific to Kotlin. It is a generalized approach of concurrent programming. Kotlin’s Coroutine implementation is built-in language feature, and therefore you don’t have to import other libraries like RxJava or Guava. Currently the feature is marked as experimental in release 1.1, and you have to enable it manually.

Checkout the official about about Coroutines here: Coroutines

During the conference, Jetbrains developers has mentioned multiple times that even though Coroutines are marked experimental but it is production ready. The only reason they still leave it experimental is they want to make sure developers are comfortable with it since it potentially might change how we code in the future.

In the first introductory talk, Roman Elizarov walks through the motivation of creating Coroutines and how they differ from C#’s async/await. You might find it interesting that Jetbrains “references” many language designs from C#. That’s because Jetbrains is a tooling company and they also write C# IDE and plugins. When Jetbrains started developing Kotlin, they have to come up with a design that would make both Java and C# developers happy and productive. Also in the talk you will see many real code samples of how to mark functions suspend and later use them as normal function call together in a “imperative” programming style.

Roman continues his code samples with detailed explanations in his second talk. He covers the returned type of suspended function calls as well as how to specify the thread for the result computation. He also talks about the internal implementation of Coroutines and how they are different than ordinary JVM threads. Overall I would recommend you to watch both videos to learn more about Coroutines.

Deep Dive into Kotlin/Native by Andrey Breslav

Kotlin/Native support is yet another really ambitious move of Jetbrains in my opinion. I always feel Jetbrains is very smart about the future of Kotlin. They started from JVM and quickly gained official support from Android platform. Their second target is Javascript, which is the dominating language for web development. Now they are trying to support native development. They even show a running iOS app written in Kotlin! Maybe one day we can really open up one IDE and start coding regardless what platform you target at.

Kotlin/Native support is still in a very early stage. Right at this conference, it reaches its 0.4 release. Checkout this blog for more details about it.

In this talk Andrey shows off how you can write an iOS app in Kotlin. The IDE can pick up function declarations from the framework of OSX environment and even debug native code right in the IDE. The demo covers the backend service of the spinner project as well. For me 90% sample code does not look familiar since it has many C or iOS library calls, but if you’re interested in native development with Kotlin, you don’t want to miss this talk.

Bootiful Kotlin by Josh Long

Yes, this is “another version” of bootiful application powered by Josh Long, a funny and energetic spring advocate. I personally have seen at least three different versions of this talk with pure Java or Groovy. You can also easily search a tons of Josh’s talk about Spring Boot with keyword “bootiful josh long”.

In case you never heard of Spring boot, it is a special version of Spring application that is designed to have minimal configuration and development time.

I am really excited about Spring Boot with Kotlin. I am not a server expert, but I do know Spring announced its support of Kotlin really early, and they really put much effort into the language support. Spring team works with Jetbrains closely to make their product more Kotlin-friendly. One example is the All-open compiler plugin.

Also something really cool (and familiar) to Android developers, In upcoming Spring Framework 5.0, you can develop Spring Boot application with reactive streams directly. Everything becomes reactive, even for your backend services.

Checkout Josh’s talk if you would also want to try some server development using Spring Boot.

Building Kotlin Applications at Scale with Gradle by Hans Dockter

Hans Dockter is the founder and CEO of Gradle. For most JVM/Android developers, gradle should be something we use everyday.

In his talk, Hans goes over some optimizations they have for gradle like hash keys for incremental builds, parallel task executions, and http build cache for the module outputs local development. Also during the talk Hans uses a Build Scan plugin, which I found pretty useful.

Later in the presentation another gradle developer walks through the popular gradle feature: Gradle Kotlin-dsl. Now you can write your gradle build scripts complete in Kotlin. Kotlin provides better type inferences than Groovy and you can use IDE to look at java docs and jump back and forth between method calls exactly the same way you would write normal Kotlin application!

Generating Kotlin Code by Alec Strong and Jake Wharton

I am not surprised Jake Wharton is here at KotlinConf giving a presentation. I always feel he’s everywhere and capable of talking about everything about Android and Kotlin.

In this talk Jake and his ex-coworker Alec Strong talk about KotlinPoet, a library to help you generate Kotlin code. Sometimes I get asked about why we would need such library. In the case of annotation processing, a Processor can read the annotations and annotated sources to validate or generate other source files. Some widely used libraries in Android are AutoValue and Dagger.

When generating source code, either in Java or Kotlin, you might think it’s trivial to write “what you would type with keyboard”, but in reality you will definitely miss something that you rely on IDE to do for you. For example import statements are something you probably never write manually and they are incredibly cumbersome to write. That’s when KotlinPoet can help you a lot.

Besides introducing KotlinPoet, Jake and Alec also shares some tricks you would want to know when generating Kotlin sources such as Java interoperability.

A View State Machine for Network Calls on Android by Amanda Hill

This is an interesting talk about managing view state in Android. Amanda Hill shares her thoughts and the pain points of MVP pattern she fount at her work. She thinks MVP can be verbose since we have to touch all the components for each small changes. In her presentation, she builds a small ice cream app, discuss the approaches, and finally evolves the architecture to what she found the best for her app.

Managing states is a tough job, and there is no perfect architecture for it in my opinion. Given many different libraries or frameworks like MVP, MVVM, or Google’s Architecture components and data-binding, what you should be looking for it what’s most suitable for your team and requirements.

Hopefully after watching her talks, you can find your best solution or learn something new from others’ perspectives.

Testing Kotlin at Scale: Spek by Artem Zinnatullin

Spek is a specification framework for Kotlin. You can treat it as a testing framework built on top of JUnit framework. It provides a guided way for developers to write more readable and maintainable test code.

What’s really interesting about this project is that it was originally maintained by Hadi Hariri, VP of Developer Advocacy at JetBrains. It is never an official JetBrains product. Based on what Artem said, he and another female developers, Ranie Jade Ramiso, were reached out by Hadi asking if they can maintain the Spek project. I personally found it interesting and see the beauty of open source community. :)

Artem talks about how to use Spek and upcoming changes for version 2.0. It is currently in 2.0.0 Milestone. Spek has really good Kotlin and IDE support. You can see a clear hierarchical views and description of all your test directly inside the IDE. Also Spek organizes your test code in a clean and readable way. This is a talk you should definitely watch.

Party Keynote & Closing Panel

Sorry guys, both videos are not yet published :(

In party keynote, Michael Carducci shows some magics to the audience. Michael was a programmer in the past, so he was able to make a lot of programming jokes during his show. It is very unique and worth watching. One of my friends was going to skip this session, but he stayed the whole show and enjoyed it a lot.

For the closing panel, Hadi invites 9 other people from well companies or universities to answer open questions from audiences. I don’t recall all the questions, but it’s quite interesting for me to hear others’ questions and concerns about the language.

Final thoughts

I really enjoy the conference, and I will definitely try to be here again next year. I am also excited about the growth of Kotlin, and still want to learn more about it. Thanks to JetBrains for organizing this event and please keep $99 for early bird tickets!

Lastly I just want to show off how happy we were at the party. Long Live Kotlin!

pic