Re-Thinking the Visitor Pattern With Scala: Shapeless and Polymorphic Functions

Over the course of my career, a problem that I have had to face fairly repeatedly is dealing with a nested tree-like structure with arbitrary depth. From XML to directory structures to building data models, nested trees or documents are a common and pretty useful way to model data.

Early in my career (classic Java/J2EE/Spring days), I tackled them using the classic Visitor pattern from the Gang of Four and have probably had more than my fair share of implementing that pattern. Then, whilst working in Groovy, I re-imagined the pattern a little to make it a little more idiomatic (dealing with mostly Maps and Lists) and, now, I am working in Scala, and once again the problem has arisen.

Your API as a Product: Thinking Like a Product Manager [Video]

The video for the talk I gave at the 2018 API Conference is now available.

I have talked about this a bit before, as well as shared the slides, but one of my main takeaways is that we are all (mostly) in the business of building products on a daily basis, whether we are coding or writing docs, tests, change requests, specifications, or designs. There is almost always an end product of our work, and the product decisions we make while building it has a direct impact on the end-users (people will have to read/amend your code, read your specifications, translate your designs, consume your APIs, etc.). With that in mind, it seems sensible that we look at what lessons we can take from the discipline of Product Management to help us make smart decisions in our day-to-day lives.

Kubernetes And Prometheus: Getting Started

I have recently started working on a migration process to move our company deployments over to Kubernetes (from Fleet, if you were interested, which was, at the time of deployment, a pretty cutting-edge technology, but it is pretty low level, and you have to provide stuff like load balancing and DNS yourself).

A colleague of mine had already done the hard work in actually spinning up a Kubernetes cluster on AWS (using EKS) and generally most of the boilerplate around service deployment, so having had a general intro and deploying my first service (single microservice deployed as a Kubernetes “service” running inside a “pod”), which mostly just involved copy and pasting from my colleagues examples, my next goal was to deploy our monitoring setup. We currently use Prometheus and Grafana, and those still seem to be best in class monitoring systems, especially with Kubernetes.