Instacart Mar 13, 2018

Smarter ToDos With Kotlin

Article Summary

Kotlin's built-in TODO() is great, except it crashes your app in production. Kaushik Gopal built something smarter.

Standard Kotlin TODOs throw NotImplementedError exceptions that blow up your app whenever the code path executes. Gopal created a custom ToDo() function that's aggressive with developers but gentle with users.

Key Takeaways

Critical Insight

A simple Kotlin wrapper around TODO() that checks BuildConfig.DEBUG and date conditions prevents production crashes while keeping developers accountable.

The author's original time-bomb approach got pushback from Jesse Wilson, leading to an even cheekier solution involving strategic sleep delays.

Recent from Instacart

Related Articles