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.

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.

Choosing the Right Data Types

Every time we create a new data structure, we have to decide which data types to use. Usually, the decision is simple: text most likely will become a String, non-floating-point numbers will be int, and so forth. Most of the time, these almost subconsciously-made decisions will suffice. But to design future-proof data structures, we have to think about choosing the correct data type a little more.