Skip to main content

Programming

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.

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

This blog post demonstrates how to build a data processing pipeline using Kotlin coroutines and actors, showing both single-threaded and parallel implementations. It walks through creating a simple data pipeline using Kotlin’s channel and actor abstractions for clean concurrent programming. The post includes practical code examples of handling message passing between actors, managing thread pools, implementing back-pressure, and scaling from a basic sequential pipeline to a parallel version that processes data more efficiently. The explanation is backed by detailed logging output that illustrates how messages flow through the system and how parallel processing improves overall performance.

Common Java application anti-patterns and their solutions

Software projects often run into trouble when developers mix different code layers together. The article explains how this leads to rigid, brittle code that’s hard to update and reuse. Software architecture problems are examined through biological cell analogies. A practical guide follows for improving existing systems without full rewrites, focusing on testing, API design, and gradual changes.

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.

Monitoring your application locally with NewReclic

The New Relic Digital Intelligence Platform provides actionable insights to drive digital business results. You can monitor your application and infrastructure performance so you can quickly resolve issues and improve digital customer experiences.

Following instruction should help you to connect your application to NewRelic platform and customize application events sent to the platform.

Logging policy

There are different points of view on how logging levels should be used in code. I will share mine.

My assumption is: “There should be no errors in logs when everything is fine.”

How to Start Testing UI Before Backend is Ready

Testing web UIs before the backend is ready: create UI mockups first using fake data, turn them into a functional prototype, test thoroughly, then build the backend to match the UI data contract. Integrate frontend and backend at the end. Works for single-page apps and multi-page sites.