Skip to main content

Posts

2021


Code-Review Best Practices

Code review is a crucial practice in software development. One can design and write great software, but we are humans after all. And all humans make mistakes, so another pair of eyes is always helpful.

The review process might seem straightforward, but there are useful tips to make it less painful is some cases.

2020


Running Testcontainers On Dynamic Ports

Running integration tests locally with Docker can be challenging when fixed ports are unavailable due to conflicts. This issue is compounded in shared CI environments where multiple workers are in use. However, using testcontainers can help overcome these obstacles by enabling the startup of Docker containers that listen on random ports.

Kotlin Playground Shortcode for Hugo

Kotlin Playground is HTML component which creates Kotlin-aware editors capable of running code from HTML block elements. Here I explain how to embed runnable Kotlin code block in your Hugo-powered blog.

2019


Spring Boot Configuration Best Practices

Spring Boot comes with very neat configuration mechanism. Default application configuration is defined in one configuration file and environment specific setting in separate files. But still, this mechanism is often not used properly resulting in verbose and unmaintainable configurations.

Building Data Pipeline with Kotlin Coroutines Actors

In this post I will show how to build simple data-enriching pipeline using Kotlin coroutines. I will use Channels and Actors abstractions provided by kotlinx-coroutines. In Actors model “actors” are the universal primitives of concurrent computation. In response to a message that it receives, an actor can: make local decisions, create more actors, send more messages, and determine how to respond to the next message received. Actors may modify their own private state, but can only affect each other through messages (avoiding the need for any locks).

2018


How Does New Oracle JVM Licensing Encourage Agility

What happened? # Oracle has changed release and licensing policy for JDK: The JDK still remains completely free for use. The thing that is changing is the availability of updates to specific versions of the JDK. The only free for use in production JDK binary available from Oracle (as of JDK 11) will be the OpenJDK binaries. These will only have public security patch and bug fix updates for six months, until the release of the next version.

Customizing REST API Error Response in Spring Boot / Spring-Security-OAuth2

Defining error format is important part of REST API design.

Spring-Boot and Spring Security provide pretty nice error handling for RESTful APIs out of the box. Although it has to be documented, especially when contract-first approach to API design is used.

It is good idea to follow some common format for error responses. But OAuth2 specification and Spring Boot format may not satisfy those requirements.