While learning to use Coroutines and Flow in several different projects (including my own), I noticed some common anti-patterns that tend to arise while coming to terms with structured concurrency and reactive streams. In this article, I will outline how to recognise and refactor four of the most common cases.

Keep your eyes open! A Tarsier I met near Bitung, Sulawesi

1. Using Flow instead of a suspend function

When designing your methods and functions, start with a suspend function and if you get stuck, change it to a Flow.

Consider this typical function signature for calling a RESTful API.

Such a function is especially common in projects that are migrating from RxJava where we have the concept…

Using Kotlin’s callbackFlow builder on Android

Photo by Michal Matlon on Unsplash

A short guide on when and why to use the callbackFlow builder function in Android.

Click on the handsome man below for the full code.

The key to understanding when callbackFlow is appropriate is to be able to recognise a “callback” in the first place.

Here are some “callbacks” that…

Photo by Tim Gouw on Unsplash

Some specific tips for designing a technical test for your candidates.

Part 1 explores the idea that every developer should be able to interview candidates and Part 2 explores some more general guidelines for hosting an interview. The third and final part goes into some specific guidelines for creating a technical test for the candidates.

Technical testing guidelines

Although these days, I prefer homework…

Photo by rawpixel on Unsplash

Some general tips for interviewing candidates for a dev team position. Particularly for developers who are finding themselves on the other side of the interview table for the first time.

Be sure to check out part 1 of this series to understand the fundamentals of this approach where I argue that interviewing is a skill every professional developer should have under their belt.

General Interviewing Guidelines

Interviewing a candidate can be as scary as being the interviewee. It requires a little training, training…

Nick Skelton

Freelance Android Dev. Google Developer Expert. Full Time Remote. Part Time Buzzword Hacker.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store