Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kotlin Dev bytes - BlrKotlin Meetup Oct 2018

Adit Lal
October 27, 2018

Kotlin Dev bytes - BlrKotlin Meetup Oct 2018

Adit Lal

October 27, 2018
Tweet

More Decks by Adit Lal

Other Decks in Technology

Transcript

  1. K O T L I N D E V B

    Y T E S BlrKotlin 2018
  2. 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
  3. To achieve multi-platform cross compilation , we could write better

    abstracted code BlrKotlin 2018 @molsjeroen
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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") } }
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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