Functional Programming Java vs. Kotlin, Stateful Function Edition

Java vs. Kotlin, Stateful Function Edition

State encapsulation or lamba expression with closure when implementing stateful functions? Is Java or Kotlin better suited for either one of those 2 approaches? Let’s find out… Use case To compare implementations in Kotlin and Java, we will build a very simple feature, create a function that can count how many times it was called. …

Read Article Read More

Functional Programming Extension Function vs. Regular Function in Kotlin

Extension Function vs. Regular Function in Kotlin

I’m a big fan of extension functions in Kotlin, for me it’s another tool in our toolbox to give the developer additional options as an API designer or consumer, but this post is not about the philosophical discussion of the merits of extension functions, like the ability to chain utility functions vs. the issues that …

Read Article Read More

Functional Programming Oracle Code One: Solving the N + 1 Query Problem

Oracle Code One: Solving the N + 1 Query Problem

Back in the cold in Ottawa after a wonderful week in beautiful San Francisco for Oracle Code One 2018. I’ll write another post shortly that will go more personal, about my experience, my struggles, my good moments and a few lessons learned which hopefully some of you will relate to. But for now here is the …

Read Article Read More

Functional Programming Adapter pattern… to explain java method references?

Adapter pattern… to explain java method references?

This quick blog post was inspired by some questions I got asked about method references in Java. This is not meant to be a tutorial on java method references and their specific binding rules (static method, constructor, bound instance method, unbound instance method) as there are many great resources out there already that can be …

Read Article Read More