Skip to main content

· 6 min read

I’ve created a sample Spring Boot app that demonstrates useful scenario of asynchronous publish / subscribe model. It could be useful in many ways. Idea is that, for example, you have some API handling some web requests, and apart from functionality it provides, it also publishes some event, so that some other thread can react upon it, with main functionality still being processed with request handling thread. Or even shorter – request handling thread will do it’s job, and publishes some event (using Java annotation), and some other background thread will subscribe to event and process it. You can use it for scenario you register user with your API, and publish user registered event, and in background you can subscribe to it by sending out e-mail to end user.

· 7 min read

This blog post should start with a popular quote:

Tony Hoare introduced null references in ALGOL W back in 1965 “simply because it was so easy to implement”, says Mr. Hoare. He talks about that decision considering it “my billion-dollar mistake”.

Instead of dealing with null / not-null references, Java 8 JDK ships with new type: Optional<T>. How to use it?

· 12 min read

The focus of this article is to cover some pros and cons of various decisions one software company can take. Software companies need to make decisions to move forward, and as we are about to see - they rarely bring only benefits to the company.

Let's analyze the impact of various decisions software companies tend to make. Listed are some decisions, that never came with only positive effects, and, quite frequently, cons are outweighing all the pros.

Ready? Let's get started!

· 2 min read

If you feel curious how would an implementation of decorator design pattern look like in Kotlin, this might be the right place for you. This example is just a very basic thing that you then tweak until it’s perfect. Pattern definition can be found at Wiki, but what’s important is that you can compose chain of decorators at runtime and in such a way – you can control runtime behavior of your system.

· 8 min read

Contributing on Github

A couple of days ago a friend of mine asked me how he can change some existing Github project. There are quite some materials around covering this topic, but what I give you here is an exact set of steps required to actually perform the change.

By the end of the article, if you stay with me, you will be able to understand how to technically contribute to the Github open-source projects.

· 3 min read

Kotlin language recently gained some traction owing to Google promoting it as a primary language for writing android apps. Kotlin has already been for a while in production owing to it’s creator JetBrains incorporating it in own tools, such as Intellij IDEA and so forth.

· 4 min read

Kotlin language can come quite handy write concise and expressive code, without too much boilerplate, while keeping all advantages of being JVM citizen. Let's quickly peek into example of creating Factory method creational design pattern implementation.