<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Laksh Chauhan on Medium]]></title>
        <description><![CDATA[Stories by Laksh Chauhan on Medium]]></description>
        <link>https://medium.com/@laksh.ch21?source=rss-19b1ea4a5a8a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*w9ulQsFVy23crRFl</url>
            <title>Stories by Laksh Chauhan on Medium</title>
            <link>https://medium.com/@laksh.ch21?source=rss-19b1ea4a5a8a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 17:04:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@laksh.ch21/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Adopt these new Java features in your code to stay relevant.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@laksh.ch21/adopt-these-new-java-features-in-your-code-to-stay-relevant-acdd7aea74eb?source=rss-19b1ea4a5a8a------2"><img src="https://cdn-images-1.medium.com/max/1742/1*Oot5eWfKpoqqpJC2oHBPqQ.png" width="1742"></a></p><p class="medium-feed-snippet">Long gone are the days of Java being boilerplate hell. Give it another chance with a fresh perspective&#xA0;:)</p><p class="medium-feed-link"><a href="https://medium.com/@laksh.ch21/adopt-these-new-java-features-in-your-code-to-stay-relevant-acdd7aea74eb?source=rss-19b1ea4a5a8a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@laksh.ch21/adopt-these-new-java-features-in-your-code-to-stay-relevant-acdd7aea74eb?source=rss-19b1ea4a5a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/acdd7aea74eb</guid>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Laksh Chauhan]]></dc:creator>
            <pubDate>Sat, 23 Aug 2025 20:34:43 GMT</pubDate>
            <atom:updated>2025-08-23T20:34:43.810Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Time to start grouping your tasks using Structured Concurrency]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.devgenius.io/structured-concurrency-fixing-the-pitfalls-of-unstructured-concurrency-e1af254a29da?source=rss-19b1ea4a5a8a------2"><img src="https://cdn-images-1.medium.com/max/1247/1*HIQ9qNQjPuFhAyToqb-27w.png" width="1247"></a></p><p class="medium-feed-snippet">Aimed at understanding how structured concurrency differentiates itself from unstructured, with examples and thread dumps!</p><p class="medium-feed-link"><a href="https://blog.devgenius.io/structured-concurrency-fixing-the-pitfalls-of-unstructured-concurrency-e1af254a29da?source=rss-19b1ea4a5a8a------2">Continue reading on Dev Genius »</a></p></div>]]></description>
            <link>https://blog.devgenius.io/structured-concurrency-fixing-the-pitfalls-of-unstructured-concurrency-e1af254a29da?source=rss-19b1ea4a5a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1af254a29da</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[concurrent-programming]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Laksh Chauhan]]></dc:creator>
            <pubDate>Fri, 28 Feb 2025 05:40:30 GMT</pubDate>
            <atom:updated>2025-04-26T19:13:29.273Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Java Streams’ anti-patterns to be careful of]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.devgenius.io/java-streams-anti-patterns-to-be-careful-of-5b5018277e36?source=rss-19b1ea4a5a8a------2"><img src="https://cdn-images-1.medium.com/max/1840/1*Zj9F411TKVmk0rNN6X0q-w.png" width="1840"></a></p><p class="medium-feed-snippet">Following these anti-patterns is like lightning a fuse in your code that will blow up in someone&#x2019;s face.</p><p class="medium-feed-link"><a href="https://blog.devgenius.io/java-streams-anti-patterns-to-be-careful-of-5b5018277e36?source=rss-19b1ea4a5a8a------2">Continue reading on Dev Genius »</a></p></div>]]></description>
            <link>https://blog.devgenius.io/java-streams-anti-patterns-to-be-careful-of-5b5018277e36?source=rss-19b1ea4a5a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b5018277e36</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Laksh Chauhan]]></dc:creator>
            <pubDate>Sat, 25 Jan 2025 21:17:21 GMT</pubDate>
            <atom:updated>2025-02-07T15:37:48.452Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Distributed Transaction Patterns in Event-Driven Microservices]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.devgenius.io/distributed-transaction-patterns-in-event-driven-microservices-1743a584176d?source=rss-19b1ea4a5a8a------2"><img src="https://cdn-images-1.medium.com/max/1584/1*X_-cxtQozkUnq7gDpD33mA.png" width="1584"></a></p><p class="medium-feed-snippet">Design patterns to maintain consistency for an event spanning across services in a microservice architecture.</p><p class="medium-feed-link"><a href="https://blog.devgenius.io/distributed-transaction-patterns-in-event-driven-microservices-1743a584176d?source=rss-19b1ea4a5a8a------2">Continue reading on Dev Genius »</a></p></div>]]></description>
            <link>https://blog.devgenius.io/distributed-transaction-patterns-in-event-driven-microservices-1743a584176d?source=rss-19b1ea4a5a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1743a584176d</guid>
            <category><![CDATA[event-driven-architecture]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Laksh Chauhan]]></dc:creator>
            <pubDate>Sun, 05 Jan 2025 21:21:23 GMT</pubDate>
            <atom:updated>2025-01-06T17:48:54.483Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Java Pattern Matching is so much simpler now]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.devgenius.io/java-pattern-matching-is-so-much-simpler-now-b6dc3c773514?source=rss-19b1ea4a5a8a------2"><img src="https://cdn-images-1.medium.com/max/1280/1*VwPZhW0wwACVorjVpcZcWw.png" width="1280"></a></p><p class="medium-feed-snippet">And much easier to read!</p><p class="medium-feed-link"><a href="https://blog.devgenius.io/java-pattern-matching-is-so-much-simpler-now-b6dc3c773514?source=rss-19b1ea4a5a8a------2">Continue reading on Dev Genius »</a></p></div>]]></description>
            <link>https://blog.devgenius.io/java-pattern-matching-is-so-much-simpler-now-b6dc3c773514?source=rss-19b1ea4a5a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6dc3c773514</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[pattern-matching]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Laksh Chauhan]]></dc:creator>
            <pubDate>Mon, 16 Sep 2024 03:29:39 GMT</pubDate>
            <atom:updated>2024-09-17T19:04:37.899Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Writing Clean Code: Open/Closed Principle]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@laksh.ch21/writing-clean-code-open-closed-principle-7ce3fdbec699?source=rss-19b1ea4a5a8a------2"><img src="https://cdn-images-1.medium.com/max/966/1*PIVvqB-13wmHyIfHBBfRRA.png" width="966"></a></p><p class="medium-feed-snippet">Software, it&#x2019;s called soft because it is flexible to change. However, not all changes are created equal. How changes are implemented in a&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@laksh.ch21/writing-clean-code-open-closed-principle-7ce3fdbec699?source=rss-19b1ea4a5a8a------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@laksh.ch21/writing-clean-code-open-closed-principle-7ce3fdbec699?source=rss-19b1ea4a5a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ce3fdbec699</guid>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[open-closed-principle]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <dc:creator><![CDATA[Laksh Chauhan]]></dc:creator>
            <pubDate>Sun, 08 Sep 2024 19:57:27 GMT</pubDate>
            <atom:updated>2024-09-08T19:57:27.876Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why Distributed Locks are important]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.devgenius.io/why-distributed-locks-are-important-17dfef01a6db?source=rss-19b1ea4a5a8a------2"><img src="https://cdn-images-1.medium.com/max/921/1*XQ5latvI8JA_qqUZN1RobQ.png" width="921"></a></p><p class="medium-feed-snippet">Consider an online movie ticket booking app for a movie theatre. You select the movie, select the seat you want to book (lets say seat&#x2026;</p><p class="medium-feed-link"><a href="https://blog.devgenius.io/why-distributed-locks-are-important-17dfef01a6db?source=rss-19b1ea4a5a8a------2">Continue reading on Dev Genius »</a></p></div>]]></description>
            <link>https://blog.devgenius.io/why-distributed-locks-are-important-17dfef01a6db?source=rss-19b1ea4a5a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/17dfef01a6db</guid>
            <category><![CDATA[distributed-locks]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <dc:creator><![CDATA[Laksh Chauhan]]></dc:creator>
            <pubDate>Tue, 03 Sep 2024 13:10:02 GMT</pubDate>
            <atom:updated>2024-09-04T18:58:54.295Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Understanding the Single Responsibility Principle]]></title>
            <link>https://medium.com/@laksh.ch21/understanding-the-single-responsibility-principle-2b503f4e5f25?source=rss-19b1ea4a5a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b503f4e5f25</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[single-responsibility]]></category>
            <category><![CDATA[solid-principles]]></category>
            <dc:creator><![CDATA[Laksh Chauhan]]></dc:creator>
            <pubDate>Sun, 01 Sep 2024 09:42:23 GMT</pubDate>
            <atom:updated>2024-09-02T03:59:20.396Z</atom:updated>
            <content:encoded><![CDATA[<h3>Writing Clean Code: the Single Responsibility Principle</h3><p>If you are a visual learner, this article is also available as a video here:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLjdnJVpVwUY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLjdnJVpVwUY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLjdnJVpVwUY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3952bbad8ed5c64c0b01570807ca0816/href">https://medium.com/media/3952bbad8ed5c64c0b01570807ca0816/href</a></iframe><p>The single responsibility principle states that a class or a method should:</p><ol><li>be responsible for one and only one thing and</li><li>should have only one reason to change</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ze31Z7NqqqgqQS_Lh26MIw.png" /></figure><p>Let’s look at what it means using an example.</p><p>Considering you’re making a driving simulator, you’d have a class to represent a car that looks like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yrYSRmDRt4jKtv15" /></figure><p>A car is responsible for moving and steering, so this class follows the single responsibility principle. But then you decide to add a car-washing feature to your game, and how about a repair feature? We can simply add these functions to the car class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2NlWEgTixAm7xwGu" /></figure><p>But is washing and repairing itself the responsibility of the car? No, a mechanic should be responsible for repairs and a car wash for the washing. Of course, implementing it like this would still work, but the car class now has more reasons to change. We can change the car class in cases where we want to update its own driving and steering logic but also how a mechanic repairs it or how a car wash washes it.</p><p>This also muddies up the understanding in a collaborative environment. Suppose you made a change to the repair logic and pushed it to a remote repository. For someone else looking at the changelog, it is not immediately clear if the car’s functionality is changed or the repairs or the car wash.</p><p>A better way would be to extract the repair and car wash functionalities into mechanic and car wash classes respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sqwZnS2MCdWnQrT-" /></figure><p>Now, responsibilities are clearly defined. A car is responsible for driving and steering, a mechanic for repairing, and a car wash for washing the car.</p><p>This also promotes maintainability. Suppose we added another Vehicle, a Truck. We wanted to have some repair logic that applies to all vehicles but some custom repair logic for each different type of vehicle as well. We could have an arrangement like this where we have a Vehicle class with the drive and steer logic and the common repair logic. And then the Truck and Car sub-classes that include the custom repair logic for each of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tsRGJALS38RqV2Mn" /></figure><p>However, whenever we need to make a change to the repair logic, we may need to change as many as three classes in this case. Instead, extracting the repair responsibility to its own mechanic class allows us to keep all the repair logic in a single place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VqO0BnP8zf1pc9pX" /></figure><h3>Responsibilities are vague</h3><p>I chose this example because it is easy to see the divide in responsibilities here. However, because of the vagueness of the term “responsibility”, it sometimes becomes difficult to identify if a class is responsible for everything it is handling or if it needs to be split up.</p><p>Take, for example, a FileManager class. It is responsible for reading data from files and writing data to files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Gf5xMAPmqkNx6YIr" /></figure><p>This looks good, it is a file “manager” and it is responsible for managing everything to do with a file. But one may argue that these are two responsibilities, reading and writing and we could split it into two different classes, a reader and writer class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ERZGOMlXZLDAV0_4" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UKDCDktNvQcDelAC" /></figure><h3>So what to do?</h3><p>So, which way is correct? Well, both. It depends on what you and your team agree on and what works for you. Writing code is more of an art than a science and these principles are a guideline and not a rulebook. Taking these to an extreme would again result in a codebase that is harder to understand and maintain.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b503f4e5f25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The What and How of System Design Concepts IV: Caching]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.devgenius.io/the-what-and-how-of-system-design-concepts-iv-caching-b292703880b9?source=rss-19b1ea4a5a8a------2"><img src="https://cdn-images-1.medium.com/max/730/1*5EYKfz1Esj_P2ST3Cvu9YA.png" width="730"></a></p><p class="medium-feed-snippet">Learn about what caching is, why it is needed, and how to do it properly. Caching is a great technique but can be a hell when done wrong.</p><p class="medium-feed-link"><a href="https://blog.devgenius.io/the-what-and-how-of-system-design-concepts-iv-caching-b292703880b9?source=rss-19b1ea4a5a8a------2">Continue reading on Dev Genius »</a></p></div>]]></description>
            <link>https://blog.devgenius.io/the-what-and-how-of-system-design-concepts-iv-caching-b292703880b9?source=rss-19b1ea4a5a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b292703880b9</guid>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[caching-strategies]]></category>
            <category><![CDATA[caching]]></category>
            <dc:creator><![CDATA[Laksh Chauhan]]></dc:creator>
            <pubDate>Sun, 01 Sep 2024 09:35:10 GMT</pubDate>
            <atom:updated>2024-09-23T22:48:48.419Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The What and How of System Design Concepts III: Database Partitioning]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.devgenius.io/the-what-and-how-of-system-design-concepts-iii-database-partitioning-7a3f78a9e8bd?source=rss-19b1ea4a5a8a------2"><img src="https://cdn-images-1.medium.com/max/1183/1*mxQk_4slgfN9eEGQNC2w1Q.png" width="1183"></a></p><p class="medium-feed-snippet">Dive deep into how database can be partitioned in different ways to improve performance and the challenges that come along with it.</p><p class="medium-feed-link"><a href="https://blog.devgenius.io/the-what-and-how-of-system-design-concepts-iii-database-partitioning-7a3f78a9e8bd?source=rss-19b1ea4a5a8a------2">Continue reading on Dev Genius »</a></p></div>]]></description>
            <link>https://blog.devgenius.io/the-what-and-how-of-system-design-concepts-iii-database-partitioning-7a3f78a9e8bd?source=rss-19b1ea4a5a8a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a3f78a9e8bd</guid>
            <category><![CDATA[database-management]]></category>
            <category><![CDATA[database-partitioning]]></category>
            <category><![CDATA[database-design]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Laksh Chauhan]]></dc:creator>
            <pubDate>Sun, 01 Sep 2024 07:14:24 GMT</pubDate>
            <atom:updated>2024-09-11T16:47:35.478Z</atom:updated>
        </item>
    </channel>
</rss>