Manage your dependencies with Gradle version catalogs
Since the very beginning, Gradle build system relied on Maven artifacts for managing dependencies and their versions. It was a good move from the adoption point of view (access to large library repositories). However, it also meant that for a long time, Gradle lacked a couple of very useful native features. A central place for […]
Continuous code review
Continuous code review is the name I gave to a set of improvements to the typical code review process in one of the teams I worked with. One day, we faced a small bottleneck. On one hand, we had a large amount of work to do. On the other, we had new developers who needed […]
Immutable classes in Java and Kotlin
If we write code that runs on more than one thread, sooner or later we meet the idea of immutable classes. The lack of ‘write’ functions makes them very useful in multi-threaded applications. In this article I’m going to show what immutable classes are in Java and Kotlin. We will also look at the practical […]
Java records vs Kotlin data classes
Records and data classes are two very similar types of classes in Java and Kotlin. Despite almost the same look and feel, there are also a couple of differences between them. Recently, I had a chance to try out records after writing exclusively in Kotlin for almost a year. In this article I would like […]
How to abuse Kotlin extension functions
Today we’re going to discuss Kotlin extension functions. It’s a mechanism that allows adding new functions to existing classes that we can’t normally modify (e.g. because they come from another library). Calling an extension function looks like a regular function call on an object. Kotlin isn’t the first language that offers them. Only in JVM […]
Avoid too many function arguments
Code maintainability is a set of guidelines that help making our software easier or cheaper to maintain in long term. It is a cognate to the clean code which is about being able to understand other’s code. Today, I’m going to talk about avoiding too many function arguments. I will show how it translates to […]
Anatomy of data node failures in Elasticsearch p. 2
In the previous article from the series about Elasticsearch clustering, we discussed the structure of data nodes responsible for storing the indices and indexed documents. Today we are going to use this knowledge to understand, what happens during the data node failures and planned restarts. We will also talk about possible mistakes that may lead […]