Slide 1

Slide 1 text

K O T L I N D E V B Y T E S BlrKotlin 2018

Slide 2

Slide 2 text

According to GitHub's analysis, Kotlin is now the fastest-growing language on GitHub. with 2.6 times as many contributors as last year! Kotlin BlrKotlin 2018

Slide 3

Slide 3 text

BlrKotlin 2018 https:!//kotlin.link

Slide 4

Slide 4 text

use "_" in integers to make them more readable BlrKotlin 2018 @molsjeroen

Slide 5

Slide 5 text

To achieve multi-platform cross compilation , we could write better abstracted code BlrKotlin 2018 @molsjeroen

Slide 6

Slide 6 text

bit.ly/KotlinConf18 Kotlin Conf 2018 BlrKotlin 2018 https://github.com/JetBrains/kotlinconf-app

Slide 7

Slide 7 text

Keynote • Kotlin 1.3 - RC • Coroutines are now stable (https://kotl.in/coroutines) • Kotlin Native - beta (https://kotl.in/native) • Ktor 1.0 beta - async framework • Playground https://play.kotl.in/ • Learning page - https://kotl.in/learn • https://kotlinlang.org/foundation/ - Jetbrains and Google BlrKotlin 2018

Slide 8

Slide 8 text

A Multiplatform delight • Great talk by Jake Wharton and Alec • Strong about the new possibilities that Kotlin gave to the well know Android library - SQLDelight. • In this talk, the authors talked about their approach to convert the library to support multiple platforms. http://bit.ly/2PdRLSH BlrKotlin 2018

Slide 9

Slide 9 text

Android Suspenders • One of the best talk about coroutines. • How they fit into Android by Chris Banes. • Great intro to coroutines on android. • Talk focusses on the best practices of using coroutines in your app, including how to handle lifecycle changes with Architecture Components, integration with background job processing, and moving away from RxJava. BlrKotlin 2018 http://bit.ly/2yqX73g

Slide 10

Slide 10 text

Annotation Processing in Kotlin World • Really great talk by Zac Sweers. • You can find out what is the @Metadata annotation and how it can help you to better understand Kotlin code during annotation processing. • How we can get rid of reflection and replace it with codegen • (Moshi case study) or how to generate Kotlin code using KotlinPoet. BlrKotlin 2018 http://bit.ly/2J98Pnw

Slide 11

Slide 11 text

New Type inference and Related Language Features • Check last year’s great talk from Svetlana about Kotlin Types (https:// youtu.be/Uizh2WlJtnk) • Svetlana takes us through the newest Kotlin features that are yet experimental. • She also introduces us to the new type inference algorithm • **Spoiler alert** SAM Issues are solved by this change, so using RxJava with Kotlin might become a bit more pleasant without using workarounds like RxKotlin **End of spoiler** BlrKotlin 2018 http://bit.ly/2yqXgnk tasks.withType(KotlinCompile::class) .forEach { it.kotlinOptions { freeCompilerArgs = listOf("-Xnew-inference") } }

Slide 12

Slide 12 text

Representing State : Kotlin Edition • Nice talk about how to represent the state in your code using possibilities that Kotlin gives you, and how definitely not to do it. • Fun introductions • Practical approach to the problem of managing states • Types matter • Int or string can represent unbounded types - meaning infinite values. • Sealed classes to make it bounded and finite and predictable BlrKotlin 2018 http://bit.ly/2q61dsV

Slide 13

Slide 13 text

Making noise with Kotlin/ Native • Really nice talk by Josh Skeen. • A great introduction to Kotlin/Native based on an ascii aquarium project. • It contains a lot of useful information, starting from environment configuration, through adding external libraries and implementing different features, to building application for a specific platform. • Josh shows that Kotlin/Native is a very powerful tool and we definitely should try to use it! BlrKotlin 2018 http://bit.ly/2Ja3H2o

Slide 14

Slide 14 text

Kotlin Coroutines in Practice • Roman Elizarov gives us a lot of useful tips of how we can use the new Kotlin Coroutines in practice. • He shows us why we should care about them - we don’t have to worry about shared mutable state and synchronisation. • Moreover, we can easily communicate (transfer a stream of values) between different coroutines using Channels. BlrKotlin 2018 http://bit.ly/2ys0sPx

Slide 15

Slide 15 text

Shaping Your App's Architecture with Kotlin • Florina showed how they have constructed the architecture of their app Plaid with respect to the new features of Kotlin and the Android Architecture Components. • Overall modularisation along with the reasoning behind their decisions. Also how they use suspension functions up to the data-source level of their architecture. • Checkout Plaid 2.0 https://github.com/nickbutcher/plaid BlrKotlin 2018 http://bit.ly/2OF6U01

Slide 16

Slide 16 text

Closing Panel • The closing panel had a form of Q&A session • Goals after 1.3 • Jake: You've worked on OkHttp, Retrofit, Dagger, etc. What are you planning to work on in the future? • There were so many Kotlin/Native talks, when will Kotlin for JVM abandoned? • Will there be a Kotlin for GPU programming? • Venkat: As someone who's worked with Rx, Futures, coroutines, what's your opinion of each, when would you use which one? Coroutines all the way or no? • Is there an official/preferred way of unit testing Kotlin code that has non-open classes without using power-mock or PowerMockito? - Test against Interface • How many JetBrains products use Kotlin in production? - Some of it BlrKotlin 2018 http://bit.ly/2J8jpLt

Slide 17

Slide 17 text

kotlinlang.org/docs/tutorials/edu-tools-learner.html This tutorial walks you through the interactive learning with a set of Kotlin programming tasks.

Slide 18

Slide 18 text

kotlinlang.slack.com blrkotlin.herokuapp.com Thank you discuss.kotlinlang.org