My personal space https://SimY4.github.io/ Recent content on My personal space Hugo en Thu, 15 Jan 2026 00:00:00 +0000 We Began to Forget: Demystifying Spring Framework https://SimY4.github.io/posts/007-we-began-to-forget-demystifying-spring-framework/ Thu, 15 Jan 2026 00:00:00 +0000 https://SimY4.github.io/posts/007-we-began-to-forget-demystifying-spring-framework/ <p>We began to forget how to pass parameters to functions.</p> <p>Before <code>@Bean</code>, before <code>@Configuration</code> or <code>@PropertySource</code> and certainly way before <code>WebSecurityConfigurerAdapter</code> objects were responsible not only for their own behaviour, but also for creating everything they depended on.</p> <div class="highlight"><pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span><span style="color:#007020;font-weight:bold">public</span><span style="color:#bbb"> </span><span style="color:#007020;font-weight:bold">class</span> <span style="color:#0e84b5;font-weight:bold">OrderService</span><span style="color:#bbb"> </span>{<span style="color:#bbb"> </span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#007020;font-weight:bold">private</span><span style="color:#bbb"> </span><span style="color:#007020;font-weight:bold">final</span><span style="color:#bbb"> </span>PaymentProcessor<span style="color:#bbb"> </span>processor;<span style="color:#bbb"> </span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#007020;font-weight:bold">public</span><span style="color:#bbb"> </span><span style="color:#06287e">OrderService</span>()<span style="color:#bbb"> </span>{<span style="color:#bbb"> </span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#007020;font-weight:bold">this</span>.<span style="color:#4070a0">processor</span><span style="color:#bbb"> </span><span style="color:#666">=</span><span style="color:#bbb"> </span><span style="color:#007020;font-weight:bold">new</span><span style="color:#bbb"> </span>StripePaymentProcessor();<span style="color:#bbb"> </span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span>}<span style="color:#bbb"> </span></span></span><span style="display:flex;"><span>}<span style="color:#bbb"> </span></span></span></code></pre></div><p>This code works, but it also quietly locks many decisions inside the class, because <code>OrderService</code> now decides which payment processor is used, how it is created, and when its lifecycle starts, and once this happens, changing that decision means changing the code itself. Configuration and behaviour start to mix, breaking single responsibility principle.</p> We Began to Forget: Public Morozov Anti-Pattern https://SimY4.github.io/posts/006-we-began-to-forget-public-morozov-anti-pattern/ Mon, 05 Jan 2026 00:00:00 +0000 https://SimY4.github.io/posts/006-we-began-to-forget-public-morozov-anti-pattern/ <p>I decided to start new series of blogs called “We Began to Forget”. The idea is simple and a little melancholic. Software engineering has a short memory, patterns get discovered and then forgotten, lessons get relearned. These posts are small memory refreshers about important aspects of our craft with a strong focus on clever hacks rather than things you can read in clever books. Books will make sure the good patterns will live on, but tribal knowledge has to be passed by word of mouth.</p> Hi there 👋 https://SimY4.github.io/about/ Thu, 18 Jan 2024 00:00:00 +0000 https://SimY4.github.io/about/ <p>Father of 2, FP enthusiast, Software Engineer, Geek</p> <div style="display: flex"> <h2 style="flex: 20%; padding-right: 10px; font-size: 1.1em; text-align: right">Currently</h2> <div style="flex: 80%; text-align: left; margin-top: 1.2em"><p><strong>Principal Software Engineer</strong>, <a href="https://www.atlassian.com/" class="external-link" target="_blank" rel="noopener">Atlassian</a></p> <p>Playing solution architect and tech lead roles for the new cloud platform development from inception to production roll out.</p> <hr> </div> </div> <div style="display: flex"> <h2 style="flex: 20%; padding-right: 10px; font-size: 1.1em; text-align: right">Specialized in</h2> <div style="flex: 80%; text-align: left; margin-top: 1.2em"><p>Design and architecture using <strong>AWS</strong> services</p> <p>Proficient with <strong>Languages</strong> and <strong>Stacks</strong>:</p> <p>Java and Kotlin: <strong>18 years</strong> Spring Framework Javascript and Typescript: <strong>18 years</strong> AngularJS, React Scala: <strong>10 years</strong> typelevel and ZIO stacks Clojure: 1 year, Rust 1 year</p> Avoiding Stringly Typed https://SimY4.github.io/posts/005-avoiding-stringly-typed/ Thu, 24 Feb 2022 00:00:00 +0000 https://SimY4.github.io/posts/005-avoiding-stringly-typed/ <p>There’s this saying that you shouldn’t have String as your function input unless you expect three volumes of War and Peace as valid input. So unless it’s your case and you want to improve your codebase to be more precise in type signatures, I invite you to discuss one possible option. I’ll use the following API as our case study:</p> <div class="highlight"><pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-java" data-lang="java"><span style="display:flex;"><span><span style="color:#007020;font-weight:bold">interface</span> <span style="color:#0e84b5;font-weight:bold">EmailSender</span><span style="color:#bbb"> </span>{<span style="color:#bbb"> </span></span></span><span style="display:flex;"><span><span style="color:#bbb"> </span><span style="color:#902000">void</span><span style="color:#bbb"> </span><span style="color:#06287e">sendEmail</span>(String<span style="color:#bbb"> </span>from,<span style="color:#bbb"> </span>String<span style="color:#bbb"> </span>to,<span style="color:#bbb"> </span>String<span style="color:#bbb"> </span>subject,<span style="color:#bbb"> </span>String<span style="color:#bbb"> </span>body);<span style="color:#bbb"> </span></span></span><span style="display:flex;"><span>}<span style="color:#bbb"> </span></span></span></code></pre></div><p>there’s an obvious ambiguity in the type signature here. All of the arguments are of the same type and can be easily misplaced. Not to mention that any string is accepted as a valid input that, as it seems, suppose to only be a valid email.</p> Consistency: There and Back Again https://SimY4.github.io/posts/004-consistency-there-and-back-again/ Sun, 18 Jul 2021 00:00:00 +0000 https://SimY4.github.io/posts/004-consistency-there-and-back-again/ <h2 id="what-is-consistency-token"> What is Consistency token? <a class="heading-link" href="#what-is-consistency-token"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h2> <p>A consistency token represents the state of a resource or entity at a given point in time. It is opaque to consumers, returned in the <code>ETag</code> header by data modifying APIs. Consumers may cache some of these tokens in a request-local or short-term cache when coordinating a number of calls to control the consistency they require via a custom <code>Event-Stream-State</code> request header(s) with the following format (as per standard RFC definition):</p> Cross-Compiling Scala in Gradle project https://SimY4.github.io/posts/003-cross-compiling-scala-in-gradle/ Mon, 20 May 2019 00:00:00 +0000 https://SimY4.github.io/posts/003-cross-compiling-scala-in-gradle/ <p>It is quite common and widely spread practice for Scala projects to cross-compile and publish several artifacts for multiple versions of Scala compiler. As a rule, for the purposes of creating several versions of one artifact teams using <a href="https://www.scala-sbt.org/" class="external-link" target="_blank" rel="noopener">SBT</a> where this feature is avaiable right out of the box and can be configured in a couple of lines. But what if we want to cross-publish our Scala project the same way without using SBT?</p> Monads Explained https://SimY4.github.io/posts/002-monads-explained/ Fri, 01 Feb 2019 00:00:00 +0000 https://SimY4.github.io/posts/002-monads-explained/ <h2 id="referential-transparency"> Referential transparency <a class="heading-link" href="#referential-transparency"> <i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"></i> <span class="sr-only">Link to heading</span> </a> </h2> <p>Referential transparency is a nice property of pure functional programming languages that allow us to reason about the behaviour of our programs. It guarantees that all expressions are always evaluating to the same result in any context. What it gives to the programmer is an ease of equational reasoning about any pure program as they used to do it in math.</p> Here you are! https://SimY4.github.io/posts/001-here-you-are/ Sat, 26 Jan 2019 00:00:00 +0000 https://SimY4.github.io/posts/001-here-you-are/ <p>Hi, there.</p> <p>If you&rsquo;re reading this that means that you&rsquo;ve ended up in my personal blog. Welcome! I&rsquo;ll try to keep it short and interesting for both of us.</p> <p>In the past few years, I&rsquo;ve got fascinated by the topic of pure functional programming. I was lucky enough to see it being applied in real-world projects, I learned a lot from people practising it at their everyday work. And today, I believe I grasped enough knowledge on this topic for me to share it with you as a series of educative blog posts.</p>