Kotlin Libraries: Concurrency

Today’s Kotlin library article is about the kotlin.concurrent package, and everything that adds to the platform.

Java’s concurrency package is already quite sophisticated, and rather than re-invent so many extremely delicate abstractions, the Kotlin authors focused on making the libraries better suited to the language by decorating and shortening various features.

[Read More]

Using OSX? Why Aren't You Using iTerm, ZSH, and Prezto?

Most developers I run into today (as well as most dev shops) are using Macbooks as their development platform of choice. However, I’ve been surprised how many are using defaults. Notably:

  • Bash
  • Minimal/No Prompt Customization
  • Standard OSX terminal

There’s an opportunity to massively improve your terminal experience with a few steps.

[Read More]

New Site Built with Hugo

I just rebuilt realjenius.com using Hugo, docker, and a variety of other goodness.

I chose not to port over a variety of old content, and I also chose to not worry about feed links to RSS and such. Please review your RSS feeds if you happen to still be following this blog.

Is There Curry In This Dish?

Now that Java is dipping its toes into the waters of supporting functional programming styles, many of the tenets of functional programming come to mind, and it’s worth exploring what is possible in this brave new world. Two of those features are currying and partial application. So the question is, can Java be functional? Currying and Partial Application - A Refresher Currying (named after Haskell Curry) is the process of generating function invocations with multiple parameters via single-parameter functions that return follow-up functions. [Read More]

Understanding Method References

Java 8 introduces four types of method references: Static - Converts any static method into a lambda with matching formal parameters. Instance-Capturing - Converts a method call on a specific object into a lambda. Constructor - Converts constructors into factory lambdas for a specific type. Arbitrary Instance - Converts a method on all instances of a type into a lambda that accepts instances of that type. Since method references apply more magic behind the scenes than straight lambdas, I thought it might be good to walk through each with examples from the pre-lamdba Java world on each: [Read More]

The Increased Importance of Generic Exceptions in API Design

One of the more interesting things with Java 8 will be how it impacts the way API design is done. This is already being discussed a lot with lambdas, and indeed, they are the key driver for much of the API change. However, it’s not as simple as making sure you accept single method interfaces everywhere. There are a lot of subtle changes to consider. I will walk through one here with exceptions. [Read More]