Managing Management - Calendar Colorist!
04 Jan 2020When I shared my Managing Management - Time Management via Color-Coded Calendar blog post on Twitter it got some nice traction because of a generous retweet from Will Larson. In the blog post I mention automating color-coding in the future via the Google Calendar API and someone asked for me to share that system once I built it.
Striking while the iron is hot… Calendar Colorist is here!
Calendar Colorist is a simple rule-based utility written in Kotlin to color code your Google Calendar. The README on GitHub walks you through setting it up to color code your calendar. I hope it’s helpful for your color-coding needs!
P.S. For bonus points, once you’ve got it all set up, configure that personal TeamCity server you have (it’s free!) to run it once a week to fully automate this automated process!
P.P.S. A few thoughts on Kotlin after taking it on this most recent whirl:
- Kotlin’s interoperability with Java is fantastic. I used the Java version of the Google Calendar API and had zero drama getting things working. It literally just worked™️ although it would be nice if Google added nullability annotations to their code.
- Kotlin extensions are also great for extending classes in libraries that cannot be easily edited. I added several properties and functions to the Event class via an extensions to make Events easier to work with.
- I got tripped up using Kotlin’s
let
with a trailing Elvis operator?:
. I assumed in an expression likea()?.let { ... } ?: b()
that so long asa()
was not nullb()
would never get executed but turns out the...
inside the let block can end up getting us tob()
. Many thanks to Heath for helping me diagnose and fix this one! 🙏
Managing Management is a series on systems that are shareable and serve as actionable templates for addressing the deluge of things managers encounter everyday. Enjoyed this post and want to see more? Check out more at Managing Management.