Vendor at a Honey Festival in France

Introduction

This is the final article in our eight part series. We have explored advanced Functional Programming for the curious, but practically minded, Kotlin developer. I hope you have found it worthwhile.

Here’s a review of everything covered to date:

In this final article I would like to:

  1. Offer some insight into new features in Arrow 1
  2. Provide some links to…


Bees Collaborating to Build Honeycomb

Introduction

Welcome to the penultimate article in our eight part series, examining advanced functional programming for the practically minded enterprise developer. This article will expand on the use case from the previous article, where we developed a set of immutable types to configure an instance of JetBrains Space. On this occasion we are exploring the world of Monads, and in particular the State type. As always the sample code is available in this repo.

The House Of ‘M’

Just like in the comics, the House Of M is a scary place in software engineering. It’s a disconcerting alternate reality - where alien types with strange…


Sunlight shining through honey

Introduction

This is the sixth article in our exploration of Advanced FP with Kotlin and Arrow. This time we will be exploring the fascinating topic of Optics.

Optics requires a more complex example. So, instead of a made up case study, I’ve taken a real one from my day job as a trainer / coach at Instil. It will take longer to explain than a toy problem, but hopefully better demonstrate the power of Lenses (and other Optics). As always all the sample code is available in this repo.

The Case Study

At Instil our training team makes heavy use of JetBrains Space. We…


Separate Frames from a Beehive

Introduction

Thus far in our series, we have seen that FP libraries (like Arrow and Cats) add extra operations to existing types. This is accomplished via Typeclasses. A Typeclass (or Type Class if you prefer) is an alternative way of associating a set of functions with a set of fields.

Typeclasses are integral to Haskell, and Swift provides a similar feature called Protocols. They are not directly available in Kotlin or Scala, but those languages give us the tools we need to simulate them.

This article will explain what Typeclasses are, why they are useful, and how they can be written…


An (Non-Kleisli) Arrow Pointing to Honey

Introduction

This is the fourth article in a series, exploring advanced FP concepts for practically minded Kotlin developers. So far we have looked at Traverse, Applicatives and Higher Kinded Types. This time we are investigating the Kleisli type.

I was very reluctant to go near this concept, mostly because this term is borrowed from Category Theory. So I assumed it would be tortuous. Fortunately it turns out Kleisli is simpler than a lot of the concepts we have already covered.

A Sample Problem

Let’s start by revisiting an only friend from our first article. …


A Stack of Honeycomb

Introduction

This is the third in our series of articles, covering advanced FP concepts for the typical Kotlin developer. In the first article we showed how useful the traverse operator is. Along the way we encountered three unfamiliar concepts — Applicatives, Semigroups and Higher Kinded Types (HKT’s).

Our second article dealt with Applicatives and Semigroups. This article will complete the set by explaining Higher Kinded Types. We will start by revisiting the original problem, but then explain HKT’s from scratch.

As ever all the code for this series is available in this repository.

The Original Problem

Examine the code below. In particular think about…


Containers of Honey

Introduction

In the first article of this series we showed how useful the traverse operator can be. As part of this we used an Applicative without further explanation. In this article we will explain Applicatives from scratch, and then circle back to the original example. All the code for this series is available in this repository.

The Sample Problem

Just like last time, let’s say our teams resident FP super-fan has been hard at work. This time they have converted a UI helper function to return an Either.

As you can see we are asking the user a question, and then checking if the…


Honey Bees in Hive

Introduction

This article is the first in a series, where we introduce advanced FP concepts via Kotlin. The intended audience is Enterprise Developers like myself, the Worker Bees of our industry.

I’m going to focus on practical applications (be they ever so humble) and postpone the theory till it’s essential. Late evaluation is very FP after all…

In this article I would like to set the stage for the series, and then make a start by introducing Traverse. All the code shown is available via this public repository.

Setting the Stage

What do marathon running, music, martial arts and programming all have in common…


Introduction

We’ve all heard of the concept of a 10X Developer. Most likely, when you first encountered it, the context was that of a myth or urban legend. I don’t agree.

As a reformed psychologist I’m fascinated by legends that are ‘sticky’. No story hangs around for as long as this unless it contains an element of truth. Or perhaps addresses some deep seated need. In this article I would like to convince you that the 10X Developer is a real, if very rare, individual. More like a Rhino than a Sasquatch.

A 10X Developer Frolicking

The Really Real Developers

If I rate myself honestly as a developer, from…


Logo for the JetBrains Space product

Introduction

Wednesday 9th December 2020 will see the official release of JetBrains Space. Space is an environment for teams that aims to provide a ‘one stop shop’ for version control, blogging, chats, code review etc…

At Instil we were early adopters of Space. Our training team was presenting at KotlinConf in Copenhagen and attended the launch event. Thereafter we’ve used it to great effect, initially to manage codebases for new courses internally and then as part of our conversion to virtual training during the coronavirus pandemic.

Space has its own HTTP API, which can be used to perform CRUD operations on…

Garth Gilmour

Helping developers develop software better. Coding for 30 years, teaching for 20. Google Developer Expert. Trainer at Instil. Also martial arts and philosophy.

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