Decorator pattern in Kotlin – Design Patterns

Nowadays, optionality is everywhere. Typically, before purchasing an item, one can choose among multiple configurations, models, and kinds available.

The decorator pattern will allow you to implement a dynamic code structure where the new behaviors can be applied to the basic object.

It increases your optionality.

Continue reading Decorator pattern in Kotlin – Design Patterns

Observer pattern in Kotlin – Design patterns

Have you ever been subscribed to the newsletter? When the author publishes the new issue, it comes straight to your inbox. You can always choose to unsubscribe too.

Why am I asking? Chances are that you’re already familiar with the pattern I’m going to describe today – the observer pattern.

Continue reading Observer pattern in Kotlin – Design patterns

Design patterns – do we still need them?

Design patterns are a set of solutions for the most common problems in software design. The most commonly used patterns came from the book published in 1994. The question is, do we still need them in our modern software projects?

The short answer is: yes, we do. Wanna know the details? Read more.

Continue reading Design patterns – do we still need them?

Console output unit testing in the Kotlin application

Are you looking for a way to test your console output (println()) in your Kotlin project?

In this post, I’m going to walk you through the process of creating a simple project setup that allows you to unit test the console output of the application.

Continue reading Console output unit testing in the Kotlin application

Add Google Analytics to Angular application in 3 easy steps

Integrating Google Analytics stats with your Angular application is easy. Well, maybe it’s not as easy as it is for non-SPA websites but still it’s possible to do it really quickly.

In this short tutorial, I’m going to show you how you can connect your Angular app to Google Analytics in the 3 easy steps.

Continue reading Add Google Analytics to Angular application in 3 easy steps

OpenAPI 3 documentation for your Spring REST API with springdoc-openapi

Looking for theΒ OpenAPI 3 compliant documentation for your Spring Boot-based project REST API?

As you know, there are many ways to achieve it (e.g. using the Springfox library). But which solution will be both integrated with the Spring ecosystem and OpenAPI 3 compliant?

Fortunately, the answer is springdoc-openapi. It’s the library that generates documentation almost automatically, without even providing configuration and thousands of cluttering annotations.

In this text, I’m going to show you how you can integrate yourΒ Spring Boot project with the springdoc-openapi library to generate nice API documentation which will be compatible with the OpenAPI 3 standard.

Continue reading OpenAPI 3 documentation for your Spring REST API with springdoc-openapi

Creating CloudFront distribution for your Angular app running on the S3 bucket

If you need to deliver your application quickly worldwide, then you can try to use CloudFront.

In this short text, I’m going to show you how easy it is, using the previously deployed Angular app as an example.

Using CloudFront for the websites hosted on the S3 is also a good idea when you need to use the domain which is not registered on Route 53 but on the external provider.

Continue reading Creating CloudFront distribution for your Angular app running on the S3 bucket

How to provide marker clustering on the Leaflet map in the Angular project πŸ—ΊπŸ“Œ

Showing multiple locations on a single map isn’t easy. Both from visual and performance point of view.

But fortunately, there’s a solution to this problem, called marker clustering. Basically, it’s about gathering points together in groups called clusters. Their size depends on current map zoom settings. It helps a lot when it comes to navigation through the map.

In this text, I’m going to show you how you can achieve it in your Angular project using the Leaflet map with Leaflet.markercluster library.

Continue reading How to provide marker clustering on the Leaflet map in the Angular project πŸ—ΊπŸ“Œ

Spaced repetition algorithm implementation in Kotlin

Have you ever thought about creating your own flashcards app?

Well, I have. Although there are plenty of applications like that I developed a simple one for my personal purposes.

Today I’d like to share the implementation of the SM-2 spaced repetition algorithm inΒ the Kotlin language.

Continue reading Spaced repetition algorithm implementation in Kotlin