<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Java on My personal space</title>
		<link>https://SimY4.github.io/tags/java/</link>
		<description>Recent content in Java on My personal space</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<lastBuildDate>Thu, 15 Jan 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://SimY4.github.io/tags/java/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>We Began to Forget: Demystifying Spring Framework</title>
				<link>https://SimY4.github.io/posts/007-we-began-to-forget-demystifying-spring-framework/</link>
				<pubDate>Thu, 15 Jan 2026 00:00:00 +0000</pubDate>
				<guid>https://SimY4.github.io/posts/007-we-began-to-forget-demystifying-spring-framework/</guid>
				<description>&lt;p&gt;We began to forget how to pass parameters to functions.&lt;/p&gt;&#xA;&lt;p&gt;Before &lt;code&gt;@Bean&lt;/code&gt;, before &lt;code&gt;@Configuration&lt;/code&gt; or &lt;code&gt;@PropertySource&lt;/code&gt; and certainly way before &lt;code&gt;WebSecurityConfigurerAdapter&lt;/code&gt;&#xA;objects were responsible not only for their own behaviour, but also for creating everything they depended on.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#007020;font-weight:bold&#34;&gt;public&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#007020;font-weight:bold&#34;&gt;class&lt;/span&gt; &lt;span style=&#34;color:#0e84b5;font-weight:bold&#34;&gt;OrderService&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#007020;font-weight:bold&#34;&gt;private&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#007020;font-weight:bold&#34;&gt;final&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PaymentProcessor&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;processor;&lt;span style=&#34;color:#bbb&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#007020;font-weight:bold&#34;&gt;public&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#06287e&#34;&gt;OrderService&lt;/span&gt;()&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#007020;font-weight:bold&#34;&gt;this&lt;/span&gt;.&lt;span style=&#34;color:#4070a0&#34;&gt;processor&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#007020;font-weight:bold&#34;&gt;new&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;StripePaymentProcessor();&lt;span style=&#34;color:#bbb&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;}&lt;span style=&#34;color:#bbb&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;span style=&#34;color:#bbb&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This code works, but it also quietly locks many decisions inside the class, because &lt;code&gt;OrderService&lt;/code&gt; now decides which&#xA;payment processor is used, how it is created, and when its lifecycle starts, and once this happens, changing that&#xA;decision means changing the code itself. Configuration and behaviour start to mix, breaking single responsibility&#xA;principle.&lt;/p&gt;</description>
			</item>
			<item>
				<title>We Began to Forget: Public Morozov Anti-Pattern</title>
				<link>https://SimY4.github.io/posts/006-we-began-to-forget-public-morozov-anti-pattern/</link>
				<pubDate>Mon, 05 Jan 2026 00:00:00 +0000</pubDate>
				<guid>https://SimY4.github.io/posts/006-we-began-to-forget-public-morozov-anti-pattern/</guid>
				<description>&lt;p&gt;I decided to start new series of blogs called “We Began to Forget”. The idea is simple and a little melancholic.&#xA;Software engineering has a short memory, patterns get discovered and then forgotten, lessons get relearned.&#xA;These posts are small memory refreshers about important aspects of our craft with a strong focus on clever hacks&#xA;rather than things you can read in clever books. Books will make sure the good patterns will live on,&#xA;but tribal knowledge has to be passed by word of mouth.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Avoiding Stringly Typed</title>
				<link>https://SimY4.github.io/posts/005-avoiding-stringly-typed/</link>
				<pubDate>Thu, 24 Feb 2022 00:00:00 +0000</pubDate>
				<guid>https://SimY4.github.io/posts/005-avoiding-stringly-typed/</guid>
				<description>&lt;p&gt;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.&#xA;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:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#007020;font-weight:bold&#34;&gt;interface&lt;/span&gt; &lt;span style=&#34;color:#0e84b5;font-weight:bold&#34;&gt;EmailSender&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#902000&#34;&gt;void&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#06287e&#34;&gt;sendEmail&lt;/span&gt;(String&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;from,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;String&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#007020;font-weight:bold&#34;&gt;to&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;String&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;subject,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;String&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;body);&lt;span style=&#34;color:#bbb&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;span style=&#34;color:#bbb&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;there’s an obvious ambiguity in the type signature here. All of the arguments are of the same type and can be easily misplaced.&#xA;Not to mention that any string is accepted as a valid input that, as it seems, suppose to only be a valid email.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Consistency: There and Back Again</title>
				<link>https://SimY4.github.io/posts/004-consistency-there-and-back-again/</link>
				<pubDate>Sun, 18 Jul 2021 00:00:00 +0000</pubDate>
				<guid>https://SimY4.github.io/posts/004-consistency-there-and-back-again/</guid>
				<description>&lt;h2 id=&#34;what-is-consistency-token&#34;&gt;&#xA;  What is Consistency token?&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#what-is-consistency-token&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;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 &lt;code&gt;ETag&lt;/code&gt; 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 &lt;code&gt;Event-Stream-State&lt;/code&gt; request header(s) with the following format (as per standard RFC definition):&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
