Shade is a Kotlin SDK for Phillips Hue lights that I’ve worked on for the past several years. It was written from scratch in Kotlin, with support primarily focused on well typed Kotlin structures. So why does it only support the JVM? The answer is that Kotlin’s Multiplatform isn’t quite ready. Let me explain.

When I released Shade, one commitment I made with the library is to keep it stable. This includes being stable against API changes. The library has not encountered a breaking change, even amongst discovering new requirements in the Hue API since its release and entire endpoints…


One eye-catching feature you’ll see when learning about Kotlin is destructuring declarations. Simply put, destructuring takes an object and breaks it into parts in a simple syntax. But after several years of working in Kotlin, has destructuring proven useful? Should you use it? It depends.

What does it look like?

Destructured declarations show up in several different places in Kotlin syntax. The common syntax to identify them is a comma separated list of names where usually only one name would be present. The simplest example of this is a val declaration:

val (name, age) = person

Here, the properties of person are being broken apart…


A Modern Library and CLI tool for controlling Hue Bulbs.

Philips Hue bulbs are some of my favorite smart home products. I use them from everything from turning the lights on when you walk in a room, changing color temperature at night, and using the colors as a notification. However, when I went to write an IoT app myself to communicate with the bulbs, I was disappointed to find a stale GitHub repo was my only option for Java. After finding relatively little 3rd-party libraries for communicating with the Hue bulbs, I decided to create Shade.

https://Shade.lighting

Creating a Modern Kotlin SDK for Hue

Kotlin is becoming incredibly popular on Android and systems that were previously written…


Kotlin has some handy things added to its deprecation warnings and I wanted to take a quick post to talk about them.

Hopefully you’re familiar with Java’s @Deprecated annotation. It’s a handy way to flag a method, class or member as something to be avoided. But, that’s all it really does. Most compilers will show a warning if you try to use the annotated construct, but that’s about as far as it goes. You might also be familiar with the doc-block annotation @deprecated as a way to document why something is deprecated, what it should be replaced with, etc. That…


Recently I ran into an error with a Kotlin library that I didn’t find much online about. Our project is in Kotlin, but I imagine you would see this error with a Java project as well. The error stems from libraries that are using Kotlin and Gradle. These are the errors I got, and the not-so-satisfying answer on how to fix it.

More than one file was found with OS independent path ‘META-INF/library_release.kotlin_module’

If you’re seeing this error on your project, I have to warn you, this is going to be a bit of a bummer. You probably just added…


Since Google announcing their official Support for Kotlin, I’ve started spending a lot of time converting code to the language. My immediate reaction is incredibly positive. The language is full of first class features for common operations that make me re-think the way I develop. There’s very little downside to getting started with Kotlin, and I highly recommend everyone get started on their own projects. I’m thoroughly enjoying it, but it’s not entirely perfect.

Update (August 18th, 2020)

Great news! Kotlin 1.4 has been officially released, bringing new features and a resolution to this SAM issue described in this post! …


Bye bye ButterKnife, KotterKnife, and findViewById

Kotlin is here for android, and it’s bringing along all kinds of efficiencies with it. There are a few different approaches to interacting with the view system in Android, and now with Kotlin there’s an even easier way.

The Old and Busted

The way Activities in Android interact with Views can be a bit of a pain point at times. While the slow performance of findViewById is mostly a myth, the syntax for it can be somewhat cumbersome.

Late-initialized View member variable, the traditional way

Enter ButterKnife

You might be familiar with the popular library ButterKnife, which allows you to simplify this code a bit, as…


Make your splash more than just branding

Splash screens aren’t always necessary, but they can be a good opportunity to display your branding while you preload data in the meantime. In the end they can be worth adding to your application, and RxJava makes the code for making a functional splash screen easy and incredibly sensible to read.

When should I use a Splash Screen?

This is a great question, and I think you should be really thoughtful about it. If you’re not careful, a splash screen could risk feeling like a waste of the user’s time. You need to be careful about how long the splash screen is displayed. …


It’s easier than you think.

One struggle I’ve seen at every software company is implementing tests on the application. Everyone wants a rigorous automated test suite, but so few are able to achieve it.

You’ve seen it before: The software has some tests, but not nearly enough. Your whole team agrees investing in testing would greatly help the product stability, allow you to develop faster and take more risks. Unfortunately, the codebase is a mess — it’s large and mostly untested. You want to get everything tested more, but it’s a work in progress. …


A while ago I had a conversation with a co-worker about Dependency Injection and Singleton patterns. The conversation was started from a posting on Reddit asking the alternatives to the Singleton design pattern and how they differ at their core. It’s a fairly good conversation, but I saw a lot of confusion between the sub-patterns, if you will, of the Dependency Injection pattern.

There are some moving parts that we have to distinguish if we want to avoid using singletons. Dependency Injection is different from a Dependency Container and is also different from Dependency Inversion. …

Renee Vandervelde

Software Engineer at Stripe. Currently focused on Kotlin and Android.

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