Skip to main content

java

Why Project Wakefield Matters

·9 mins

Project Wakefield is the effort to build support for the Wayland display server in the JDK, allowing Java-based desktop apps to be native Wayland clients. This project has moved from an interesting effort with some momentum, to a far more important project than ever before.

Helpful Kotlin APIs for Java Developers

·11 mins

One of the major benefits of Kotlin as a JVM language is that you can use any and all Java libraries natively. However, sometimes, Kotlin has better (or at least more idiomatic) alternatives to the native Java libraries. Over the years, I’ve coached a lot of Java developers at various experience levels on how to effectively use Kotlin, and it’s a very common pattern for them to not know the standard Kotlin library and choose the “Java way” instead of the “Kotlin way”. This article will cover some of the more common cases where I see that happen.

Values, Records, and Primitives (Oh My!) - Kotlin & Java's 'Valuable' Future

·24 mins

A couple years ago, I did a semi-deep-dive on Kotlin Inline Classes and how they were implemented. Kotlin 1.5 was just released, and with it came the evolution of inline classes into the start of value classes. Meanwhile, Kotlin 1.5 also now supports JVM Records, which at first read might sound like a very similar concept. Finally, with JEP-401 Java is going to bring “primitive classes” which also sounds like a very similar concept. This can sound all very confusing, so let’s take a look!

Distroless and Jib: Lightweight Java Container Images

·9 mins

The server world has moved to containers. And rightfully so: they isolate application concerns, they unify deployment, they are easy to host, and they make big complex systems like Kubernetes possible. Unfortunately, Java has been slow to adapt to the container world. Thankfully, tools are starting to become prevalent that make Java in containers easy and effective. Distroless and Jib are two of those tools.

Unsigned Integers with Java and Kotlin 1.3

·8 mins

Something that has always been a bit of a limitation in the Java numeric type system is the lack of support for unsigned integers. It is not particularly common to have to work with unsigned types, but when it does happen, it’s usually unpleasant in some way. Libraries like Guava have provided utilities to make it cleaner, and recent updates to Java 8 also included some unsigned helper methods.

Kotlin 1.3 has an experimental feature to make unsigned types a full citizen of the type system, while still having all of the performance of primitive integer types. Let’s take a look!