<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kotlin on Yonatan Karp-Rudin</title><link>https://yonatankarp.com/tags/kotlin/</link><description>Recent content in Kotlin on Yonatan Karp-Rudin</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 26 Jun 2024 00:00:00 +0100</lastBuildDate><atom:link href="https://yonatankarp.com/tags/kotlin/index.xml" rel="self" type="application/rss+xml"/><item><title>XKCD: From Tile to Picture - Seeing the Full Image</title><link>https://yonatankarp.com/blog/xkcd-from-tile-to-picture/</link><pubDate>Wed, 26 Jun 2024 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/xkcd-from-tile-to-picture/</guid><description>&lt;p&gt;If there&amp;rsquo;s one thing I can say about myself, it&amp;rsquo;s that I love challenges related to software programming. They don&amp;rsquo;t need to be meaningful or even useful, but I enjoy the challenge. That&amp;rsquo;s why when I saw this message on my LinkedIn, I had to take on the challenge!&lt;/p&gt;</description></item><item><title>How to Fix Misconfigurations in RedisTemplate</title><link>https://yonatankarp.com/blog/fix-misconfigurations-redistemplate/</link><pubDate>Wed, 05 Jun 2024 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/fix-misconfigurations-redistemplate/</guid><description>&lt;p&gt;Our story begins with a colleague and me trying to debug an issue with our project for a few hours. We needed to fetch a value from Redis storage, but whenever the service ran, the fetched value was &lt;code&gt;null&lt;/code&gt;. Despite our efforts, we couldn&amp;rsquo;t find a solution on the internet, and to make matters worse, our code was actually covered by tests that had all passed!&lt;/p&gt;</description></item><item><title>Observability in Action: How to Use OpenTelemetry</title><link>https://yonatankarp.com/blog/observability-in-action-opentelemetry/</link><pubDate>Tue, 17 Oct 2023 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/observability-in-action-opentelemetry/</guid><description>&lt;p&gt;In this article, we&amp;rsquo;ll dive into the steps for adding observability to your codebase using OpenTelemetry. Initially, we&amp;rsquo;ll develop a library that retrieves data from a remote API. Following that, we&amp;rsquo;ll construct a service using this library to fetch and save this data in a database.&lt;/p&gt;</description></item><item><title>Concurrency vs. Parallelism: Decoding the Simultaneous Illusion</title><link>https://yonatankarp.com/blog/interview-questions-concurrency-parallelism/</link><pubDate>Sat, 11 Mar 2023 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/interview-questions-concurrency-parallelism/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;TL;DR - What are the differences between concurrent and parallel programming?&lt;/p&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>How to Build Your Domain Gateway with OpenAPI</title><link>https://yonatankarp.com/blog/build-domain-gateway-openapi/</link><pubDate>Wed, 14 Dec 2022 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/build-domain-gateway-openapi/</guid><description>&lt;div class="editors-note"&gt;&#10;&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; This article explains what a domain gateway is, how to build one, and why you would want it.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;h2 id="what-is-a-domain-gateway"&gt;What is a Domain Gateway?&lt;/h2&gt;&#10;&lt;p&gt;A domain gateway is a private case of the API gateway pattern. The website &lt;a href="https://java-design-patterns.com/patterns/microservices-api-gateway/"&gt;java-design-patterns&lt;/a&gt; defines the gateway pattern as follows:&lt;/p&gt;</description></item><item><title>How to Use OpenAPI to Build a Robust RESTful API</title><link>https://yonatankarp.com/blog/openapi-robust-restful-api/</link><pubDate>Sun, 04 Dec 2022 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/openapi-robust-restful-api/</guid><description>&lt;div class="editors-note"&gt;&#10;&lt;p&gt;&lt;strong&gt;Editor&amp;rsquo;s Note:&lt;/strong&gt; This post was originally written by me and published on SumUp&amp;rsquo;s blog. However, a lot has changed since then. I am no longer working for SumUp, OpenAPI has released two major versions, Spring Boot has had a major release, and even Gradle has had multiple major releases. Not only that, but my writing skills have improved dramatically since then, and over time, I have found some small mistakes in the original article. Since the original article is one of my most successful, I decided to rewrite it and publish an updated version.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;h2 id="restful-api-the-ugly-part"&gt;RESTful API: The Ugly Part&lt;/h2&gt;&#10;&lt;p&gt;As a backend engineer, I have developed numerous REST APIs during my career. One of the most annoying issues I faced repeatedly was the lack of smooth integration between the backend and clients. Typos in URLs, inconsistent casing in JSON (camel case vs. snake case), passing values of the wrong type (e.g., string instead of an integer), and other similar mistakes have happened to me multiple times.&lt;/p&gt;</description></item><item><title>Create a Custom Spring Boot App Banner</title><link>https://yonatankarp.com/blog/custom-spring-boot-banner/</link><pubDate>Fri, 02 Dec 2022 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/custom-spring-boot-banner/</guid><description>&lt;p&gt;Today, I&amp;rsquo;d like to share a fun feature of Spring with you. It&amp;rsquo;s not new or crucial, but it&amp;rsquo;s definitely enjoyable!&lt;/p&gt;</description></item><item><title>How Does HashMap Work in Java?</title><link>https://yonatankarp.com/blog/how-hashmap-works-java/</link><pubDate>Fri, 02 Dec 2022 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/how-hashmap-works-java/</guid><description>&lt;p&gt;As an interviewer, I often ask the question about how HashMap works in Java. It helps me assess a candidate&amp;rsquo;s understanding of data structures, JVM internals, and their problem-solving approach. I&amp;rsquo;ve encountered many candidates, including juniors, mid-levels, and seniors, who couldn&amp;rsquo;t answer this question correctly. So, I decided to share the answer with everyone.&lt;/p&gt;</description></item><item><title>How to Break Your HashMap in Less Than a Minute</title><link>https://yonatankarp.com/blog/break-hashmap-less-than-a-minute/</link><pubDate>Fri, 02 Dec 2022 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/break-hashmap-less-than-a-minute/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Never use mutable objects as keys in your HashMap!&lt;/p&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>How to Inject Multiple Implementations in the Spring Framework</title><link>https://yonatankarp.com/blog/inject-multiple-implementations-spring/</link><pubDate>Fri, 11 Feb 2022 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/inject-multiple-implementations-spring/</guid><description>&lt;div class="editors-note"&gt;&#10;&lt;p&gt;&lt;strong&gt;Editor&amp;rsquo;s Note:&lt;/strong&gt; This post was updated to add a section on controlling the order in which Spring injects beans into a &lt;code&gt;List&lt;/code&gt;, using the &lt;code&gt;@Order&lt;/code&gt; annotation and the &lt;code&gt;Ordered&lt;/code&gt; interface.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Recently, I had a discussion with one of my colleagues during a code review. We talked about a hidden gem in Spring (as well as other frameworks like Micronaut) that could simplify our code.&lt;/p&gt;</description></item><item><title>Build Your Own Twitter Bot with Kotlin</title><link>https://yonatankarp.com/blog/build-twitter-bot-kotlin/</link><pubDate>Wed, 15 Dec 2021 00:00:00 +0100</pubDate><guid>https://yonatankarp.com/blog/build-twitter-bot-kotlin/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;&lt;strong&gt;Note (2026):&lt;/strong&gt; I wrote this post in December 2021 against Twitter&amp;rsquo;s v1.1 API, through Twitter4J, and &lt;code&gt;apps.twitter.com&lt;/code&gt;. That address now redirects to &lt;a href="https://developer.twitter.com/"&gt;developer.twitter.com&lt;/a&gt;, so the setup steps below may not match what you see today.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;I read an excellent article by &lt;a href="https://medium.com/u/f864d52751a7"&gt;Martin Erlic&lt;/a&gt; called &amp;ldquo;How To Make a Scary Russian Twitter Bot With Java&amp;rdquo; and I wanted to update it using Kotlin.&lt;/p&gt;</description></item></channel></rss>