Thumbtack Emily Fujimoto May 16, 2024

Java Is Dead Long Live Kotlin Part 2

Article Summary

Emily Fujimoto from Thumbtack just closed the book on a 6-year migration journey. The final push to eliminate Java from their Android codebase revealed lessons every mobile team needs to hear.

Thumbtack's Android team started their Kotlin migration in 2018 at 60% completion. The last 40% took years, with the final ~100 files becoming a H1 2024 priority. They gamified the process, added HeyTaco bounties, and leveraged quarterly Fixit weeks to cross the finish line.

Key Takeaways

Critical Insight

Thumbtack eliminated all Java from their Android codebase by requiring Kotlinization before any file modifications, writing tests first, and gamifying the final 100 files.

The team discovered a specific pattern in their old code that made conversions nearly impossible without tests (and it's probably lurking in your codebase too).

About This Article

Problem

Thumbtack's Android engineers found that handling nullability was their biggest challenge during migration. The old Java code didn't have consistent @Nullable and @NonNull annotations, and this problem extended across third-party libraries and Android OS code.

Solution

Emily Fujimoto's team decided to write unit tests before converting to Kotlin. They tested both null and non-null cases on converter functions like UserConverter to make sure the new code behaved the same way as the original.

Impact

This approach improved code coverage overall and caught bugs when they switched Java types to Kotlin equivalents. It made it easier to add Kotlin coroutines into the updated architecture.