June
5th,
2021
The `Strategy` pattern creates a family of algorithms, enclosing the differing logic in separate classes while hiding it from clients behind the interface. It enables the interchangeable use of implementations. The use of the strategy simplifies the customer code, avoids code duplication and conditional statements. Significantly simplifies testing - by separating client testing from strategy algorithms.
design patterns
Kotlin
Strategy Pattern
behavioral design pattern
May
18th,
2021
The template method is a very simple design pattern, that separates shared class parts from changing ones. The core idea is to have an abstract parent class containing the algorithm steps and allowing inheriting classes to overwrite individual steps, but not the algorithm that uses those steps itself.
design patterns
Kotlin
Template Method
behavioral design pattern
March
8th,
2021
The factory of factories, 'Abstract Factory' makes creating objects that are part of some 'family' easy. It is another layer over concrete factories delivering client the factory instance for creating objects of a certain variant.
design patterns
Kotlin
Abstract Factory
construction design pattern
February
26th,
2021
After the `Static Factory Method` it's time for classic `Factory`. Factory is very useful and often used construction design pattern. Kotlin has interesting advantage thanks to `sealed` and `internal` classes, that are missing in Java.
design patterns
Kotlin
Factory Method
construction design pattern
February
15th,
2021
`Static Factory Methods` known from Java have their place also in Kotlin, although they look and behave a bit different because there is no `static` word in Kotlin. Here I'll try to show how to use `companion object` for `Static Factory Methods` and more. PS: This whole post was supposed to be about `Factory Method` with just a short mention about static factory methods, but the topic becomes more interesting than I thought :)
design patterns
Kotlin
Static Factory Methods
construction design pattern
January
20th,
2021
The Builder Design Pattern is one of most popular and useful construction patterns in software engineering. In this post I will try to explain it and show how you can use it with Kotlin. Sadly I often see implementations that are simple translation from Java rather that utilizing cool Kotlin syntactic sugar.
design patterns
Kotlin
Builder Pattern
construction design pattern
August
23rd,
2020
This is not a list of 'golden rules' of code review, there are many blogposts about it. Here I just try to perform retrospective my own experiences.
code review
self-retro
pull request
team work
August
4th,
2020
Deploy Jekyll blog (like this one) on GitHub is very easy. Unless, you want to use not whitelisted plugins... but it't still doable.
Github Pages
Jekyll
Github Actions
July
19th,
2020
I'm using a few computers (and few OS-es) where I run IntelliJ Idea and Android Studio, and keeping their settings the same way everywhere was always a bit painful. Until today when I learned about `settings repository` thing!
IDE
plugins
IntelliJ
settings
May
3rd,
2020
If you are lazy and you know it clap your han... write shell scripts
shell
bash
automatization
scripts