by one, via “⌥⇧⌘K”, make sure tests s ll pass 2. Go over the Kotlin files and make them more idioma c 3. Repeat step 2 un l you and your code reviewers are happy 4. Ship it
at ‼ Incrementally becoming more idioma c Companion Can Complicate Method Names star ng with get will give nightmares Genrics are hard to get it right No augument captor
mind Use mockito-kotlin to solve most of the issues faced while migra ng tests Reading less is not always a bad thing 29% less code compared to Java Configure tests to mock final classes
instead of var 2. Use lateinit 3. Use let func on 4. Use Elvis operator 5. Use build‐in func ons requireNotNull or checkNotNull with accompanied excep on message for easy debugging.
immutability on the language level and that’s great. val is read‐only, var mutable. If you use them as immutables, you don’t have to care about nullability. Just beware that val can actually be mutable.