Java Interface vs. Abstract Class

Even though interfaces and abstract classes have many similarities at first look, especially after introducing default methods, they have different use-cases and capabilities.

Java Spliterator Explained

Java has multiple types for traversing elements of a source. My last article showed how java.util.Iterator<T> and java.util.ListIterator<T> can be used to traverse data structures like Collections. The concept of iterators is supported since Java 1.2, but got a new relative, java.util.Spliterator<T>, in Java 8.

How to Iterate with Java

Iterating data structures is one of the most common tasks. Everyone knows the classics, like for or while. But there are more ways to iterate in Java, providing a lot more functionality.

Essentials of Java’s Time API (JSR-310)

Dealing with date and time is a cumbersome task in many programming languages. But with Java 8, the JDK provides us with a comprehensive and completely new API, changing the way we deal with time-related concepts.

Functional Programming With Java: map, filter, reduce

The three methods, map, filter, and reduce, are the cornerstone of any functional programming. Usually, our data pipelines consist of one or more intermediate operations, transforming (aka mapping) and/or filtering elements, and a terminal operation to gather the data again (aka reducing).

Local Variable Type Inference in Java 10

Java is often criticized as being too verbose. One aspect contributing to this characterization is the requirement to specify every type explicitly, which leads to a lot of additional noise. A new way of declaring local variables with less clutter was given to us with JDK 10 and JEP 286: local variable type inference.

Localization Changes in Java 9

We use java.util.Locale to format dates, numbers, currency, and more. But in some circumstances, these formatted strings have changed with JDK 9, leading to a multitude of subtle (and sometimes not so subtle) bugs.

Why We Should Build Our Own Tools: The Story of Tortuga

I’m a great proponent of building our own tools. As developers, we perform many repetitive tasks, big and small. Many of these tasks might be made easier by using an appropriate tool instead. We often concentrate too much on solving more significant problems. Sometimes it doesn’t even need to be a real problem for a tool to be valuable. We have to find the sweet spots in our workflow.

9 Tips For Writing Safer Shell Scripts

Shell scripting is a powerful tool available on all platforms, even Windows, thanks to WSL. But it can be easy to make mistakes. Here are some tips to improve our scripts and avoid many problems.

Nested Classes in Java

In object-oriented languages, a nested or inner class is a class that’s completely declared within another class. This allows us to combine classes that are logically bound together, to increase encapsulation, for more concise and maintainable code. Here’s a quick, non-deep-dive overview of the 4 types of nested classes.