https://www.gravatar.com/avatar/306d401b2a8c0efe0996fec60e0c90aa?s=240&d=mp

My coding journey

Disclaimer: it's just for fun

So what Options do I have?

Option types

Option type documentation:

Same names, a bit different API

Scala

In Scala the variants are called: None and Some which are final case subclasses of Option. I’ve noticed the subclassing has the nice property of helping in IDE to discover the variants (which is also the case, for example, for Try subclasses.

Rust

In Rust, the variants are also conveniently named Some and None.

Scala AND Rust ?

Science based programming language learning

Exploring two prorgamming languages at the same time seems like a bad idea, doesn’t it? Well, good learning sources say that the best approaches to effective, expert learnings are:

  • interleaving (study both languages concurrently — never sequentially)
  • spaced repetition
  • deliberate practice at the edge of your comfort zone
  • retrieval practice (close the docs)
  • and the explanation effect

Looks like a very good idea to me.

Back to Scala

Discovery

Leaving a familiar ground of Java, Maven and Spring Boot, and switching back to another JVM language - Scala - shouldn’t be a Big Deal, right?

Especially when once upon a time I did complete two Cursera courses about Scala and Functional Programming, which - as far as I remember - were really eye-opening, rewarding and funny.

Let’s dive into remote memories…

When I was learning Clojure, I had one issue (no, it was not about parenthesis; those serve me well) and it was: learning Emacs. An adventure of its own. Also, some language concepts needed to settle in my head. My fingers needed to learn paredit shortcuts. And I had a lot of fun.

Code in Rust

Anniversary reminder

Let’s write some Rust! 🦀 Today I had an idea to write a short program to remind me about important anniversaries.

Create

Let’s create a new rust project named diary:

1
cargo new diary

Cargo creates this simple directory structure:

1
2
3
4
.
├── Cargo.toml
└── src
    └── main.rs

Open main.rs

1
2
3
fn main() {
    println!("Let's eat some fruit!");
}
  • run it with cargo run

Optimize a bit

  • check its size with du -sh target/debug/diary (3.8M)
  • build with --release flag, i.e. cargo build --release
  • check the size now: du -sh target/release/diary (428K)

Configure cargo

…to automaticlally strip symbols from binary (strip=true) and enable link time optimization which removes dead code and may therefore reduce binary size (lto=true)

New me, new tools, new hosting

Big changes are hapenning in my life:

  • I started using Emacs
  • I switched my hosting provider (smarthost.pl -> small.pl) and switched my domain provider (smarthost.pl -> hostido.pl)
  • I switched from 8k to 10k steps a day

Decision to start using Emacs was primarily made because I was unable to use neovim at work:

  • github.com is blocked and we cannot clone repositories from it
  • so automatic plugin updates are not possibe (manual installation is not an option)

I also found a few refreshing resources:

How to use Maven 4.0

This article presents a short overview of what has changed in Maven 4: changes in POM, most important improvements and a short migration guide. It is packed with helpful links which - I hope - will inspire you to check and play with this (still in beta) new Maven release.

You don’t need to read this article. Just look at the reference below: \uf0a7

The problem

The problem that maven 4 solves is the lack of separation of concerns. And there are two which - untill maven 4 - were not cleanly set apart:

Maven Notes from JavaOne 2025

Notes from JavaOne

The talk Apache Maven Survival Guide “Bring It On! gives a nice overview of the tools and techniques for managing the build process.

Random trivia

Super POM

Apache Maven runtime is by default using Super Pom which - unless specified otherwiese - is the parent of each pom file:

Dependency management

Important: understanding what direct and indirect (transitive) dependencies are:

Check default versions

Use mvn help:effective-pom

Learn to use mvn help:effective-pom - it merges default pom with the one in your repository. This is important, becasue if someone has different maven versions then - although they are using the same project’s pom, their default poms will almost certainly be different!

Functional Patterns in Go

Functional Patterns in Go

One morning I faced a familiar challenge – processing a list of data through multiple transformation steps. In Java, I would chain a stream of operations (filtermapcollect), but in Go the tools are different. Although Go is not a “functional” language per se, it does offer first-class functions and closures that enable functional-style designs.

As Eli Bendersky notes, Go has “many of the building blocks required to support functional programming” even if FP “isn’t a mainstream paradigm” in Go eli.thegreenplace.net. My goal was to leverage higher-order functions, function composition, and closures to build a clean, maintainable pipeline – while comparing how Java’s lambdas and streams handle similar tasks.