Recent Blog Posts
Preventing coroutine cancellation for important actions
(4 min read)
This post describes a pattern of launching coroutines which cancel when the Activity or ViewModel is destroyed, but support allowing important parts of the coroutine to run uncancelled.
SHOW POST
Unit Testing Coroutine Suspend Functions using TestCoroutineDispatcher
(10 min read)
Kotlin coroutines provide an elegant way to write asynchronous code, but sometimes coroutines make it difficult to write unit tests. This post describes how to use TestCoroutineDispatcher to write efficient and stable unit tests for code written with coroutines.
SHOW POST
Code Confessions
(4 min read)
Code Confessions; openly confessing your coding sins to your team. Involve your team and absolve yourself.
SHOW POST
A WorkManager Pitfall: Modifying a Scheduled Worker
(4 min read)
This post describes a potential WorkManager pitfall when refactoring or deleting your Worker subclasses.
SHOW POST
Installing Fathom Analytics on Amazon EC2
(7 min read)
This post describes how to install the privacy-focussed Fathom website analytics on an Amazon EC2 instance.
SHOW POST
Adding Author tag to RSS Feed using Hugo static site generator
(2 min read)
This post details how to include the author tag in the generated RSS feed for a Hugo-generated site.
SHOW POST
Send Firebase FCM Push Notification from AWS Lambda
(2 min read)
An example of how to configure an Amazon AWS Lambda to send a push notification to Firebase FCM, written with the Node.js 8.10 runtime.
SHOW POST
Coroutine Support in ViewModels using the new ViewModelScope Extension Property
(4 min read)
This post describes how to use Coroutines in ViewModels, making use of the new ViewModelScope extension property. This allows coroutines to be cancelled automatically when the ViewModel is being cleared.
SHOW POST
Shooting Yourself in the Foot While Adding an Element to a Kotlin List
(6 min read)
This post discusses the functions `add()` and `plus()` which are available on some Kotlin collections, and how despite their similar looking names, their underlying implementations can make a big difference.
SHOW POST
Scripting with Kotlin - Kscript
(3 min read)
This post discusses kscript, an easy way to write and execute scripts in Kotlin. This post covers what kscript is, how to install it on a Mac, and offers some kscript examples.
SHOW POST