2-day workshop for experienced Kotlin developers, we'll dive deeply into Kotlin best practices and idiomatic Kotlin use. We'll also talk about more general concepts like readability, abstraction design or contract setting.

The workshop is based on the book Effective Kotlin that is soon to be published. The content is well thought out and consulted with many Kotlin developers.

On the workshop you will

Learn from lecture supported by slides

Solve coding challenges in Kotlin

Complete practical exercises

Solve Kotlin puzzlers

In the workshop we cover:

In the first 2 days, we cover general best practices and class design.

Most important best practices we'll be covering are:

Safety

  • Limit mutability
  • Eliminate platform types as soon as possible
  • Do not expose inferred types
  • Prefer composition over inheritance
  • Make it clear that top-level functions are not member functions

Readability

  • Design for readability
  • Use operator overloading methods as their names indicate
  • Consider naming arguments
  • Avoid returning or operating on Unit?
  • Specify variable type when it is not clear
  • Consider referencing receiver explicitly

Reusability

  • Do not repeat knowledge
  • Do not repeat common algorithms
  • Reuse between different platforms by extracting common modules

Design abstractions

  • Each function should be written in terms of a single level of abstraction
  • Define abstractions
  • Respect abstraction contract
  • Restrict visibility
  • Use abstraction to protect code against changes
  • Consider wrapping external API

Objects creation

  • Consider factory functions instead of constructors
  • Consider primary constructor with named optional arguments
  • Consider defining DSL for complex object creation

Class design

  • Use data modifier to represent a bundle of data
  • Use function types instead of interfaces to pass operations and actions
  • Do not use properties to express behaviour
  • Respect contract of equals
  • Respect contract of hashCode
  • Respect contract of compareTo
  • Respect contract of arithmetic operators

On this way, we'll also review more advanced topics including:

  • Collections
  • Delegates
  • Platform types
  • Interoperability with Java
  • Typing system
  • Operator overloading
  • DSL creation
  • Functional programming

Requirements

Learn from the best

Marcin Moskała

Marcin Moskała is an experienced Android developer, teacher, and an official Jetbrains' Kotlin training partner. He is the founder of Kt. Academy, author of the book "Android Development with Kotlin", and an active programming community member. He is also the main author on the biggest medium publication about Kotlin and a speaker invited to many programming conferences.

One of the first certified Kotlin training worldwide

You will be trained by an expert who is an official JetBrains' Kotlin training partner. The quality of his workshops was checked and certified by the creators of the Kotlin language itself.

JetBrains certified Kotlin Training

Professional training materials

Book with all the slides to make it easier to start using new knowledge at work just after the workshop - everything in one place to recall new functionalities.

Kotlin cheatsheet in a printed, laminated form. Now, you can have the most important elements close at hand — it is the best everyday support for Kotlin developer.

A lot of tasks and questions to practice during workshop. We do our best to make the training as practical as possible.

Kt. Academy materials

Join the workshop

When: 3-4 Oct 2019, 9:00-17:00

Where: Warsaw

Language: Polish

Price per person:
1300 PLN net till 26 Sep
1500 PLN net from 27 Sep

Register

If you want to be notified about next workshops, sign up to our mailing list.