<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Amar Prakash on Amar Prakash Pandey - ᕦ(ò_óˇ)ᕤ</title>
    <link>https://amarpandey.me/</link>
    <description>Recent content in Amar Prakash on Amar Prakash Pandey - ᕦ(ò_óˇ)ᕤ</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 27 May 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://amarpandey.me/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Your AI Agent Forgets Everything. Lore Fixes That.</title>
      <link>https://amarpandey.me/blog/your-ai-agent-forgets-everything-lore-fixes-that/</link>
      <pubDate>Wed, 27 May 2026 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/your-ai-agent-forgets-everything-lore-fixes-that/</guid>
      <description>You&amp;rsquo;re building something with Claude Code. The agent asks a question, you explain the context, it makes a good decision. You commit. Session ends.&#xA;Next session. Different task, same file. The agent is about to do the exact thing you just told it not to do.&#xA;You explain again.&#xA;This isn&amp;rsquo;t a bug. It&amp;rsquo;s just how LLM sessions work — every session starts completely fresh. No memory of the last one.</description>
    </item>
    <item>
      <title>Functors and Monads: Wrapping Your Data (Not Your Head) Around Them</title>
      <link>https://amarpandey.me/blog/functors-and-monads-wrapping-your-data-not-your-head-around-them/</link>
      <pubDate>Sun, 15 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/functors-and-monads-wrapping-your-data-not-your-head-around-them/</guid>
      <description>Why these words sound scarier than they are If you&amp;rsquo;ve ever Googled &amp;ldquo;what is a monad&amp;rdquo;, you&amp;rsquo;ve probably landed on a Stack Overflow answer that says something like &amp;ldquo;a monad is just a monoid in the category of endofunctors&amp;rdquo; and immediately closed the tab.&#xA;Fair.&#xA;Here&amp;rsquo;s the thing: you don&amp;rsquo;t need category theory to use functors and monads. You need a pipeline, some data, and a small conceptual shift in how you think about wrapping transformations.</description>
    </item>
    <item>
      <title>Currying and Partial Application: Shaping Intent</title>
      <link>https://amarpandey.me/blog/currying-and-partial-application-shaping-intent/</link>
      <pubDate>Sat, 28 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/currying-and-partial-application-shaping-intent/</guid>
      <description>Why this topic is confusing Currying and partial application are concepts that almost every Python developer has seen, but very few feel confident using. For a long time, I understood what they did, but I didn&amp;rsquo;t know when using them actually made code better.&#xA;A clear distinction: currying vs partial application Currying transforms a function that takes multiple arguments into a chain of functions that each take a single argument:</description>
    </item>
    <item>
      <title>Choosing Functional Python (Without Forcing It)</title>
      <link>https://amarpandey.me/blog/choosing-functional-python-without-forcing-it/</link>
      <pubDate>Sat, 31 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/choosing-functional-python-without-forcing-it/</guid>
      <description>Why this matters Python gives you multiple ways to solve the same problem. Loops, comprehensions, generators, map, filter, reduce, any, sorted, and more.&#xA;For a long time, I knew these tools existed, but I didn’t really know when or why to use them. I could read functional-style code, but writing it confidently was another story.&#xA;This document is not a tutorial on functional programming in Python. It’s a set of notes, patterns, and mental models that helped things finally click for me.</description>
    </item>
    <item>
      <title>Spot Optimizer ≠ Spot Fleet: decide smart, then launch</title>
      <link>https://amarpandey.me/blog/spot-optimizer--spot-fleet---decide-smart-then-launch/</link>
      <pubDate>Mon, 01 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/spot-optimizer--spot-fleet---decide-smart-then-launch/</guid>
      <description>Picking EC2 Spot instances shouldn&amp;rsquo;t feel like rolling dice. Most teams either guess and get bitten by interruptions, or overbuild complicated logic to dodge them.&#xA;Here&amp;rsquo;s the clean split that keeps you sane:&#xA;Spot Optimizer is a Python library/CLI that figures out the right instance types and counts for your workload. EC2 Fleet / Spot Fleet are AWS services that launch and maintain that capacity. Short version: Spot Optimizer decides what to run; EC2/Spot Fleet decide how to run it.</description>
    </item>
    <item>
      <title>How Not to Open a Pull Request – And How to Do It Right</title>
      <link>https://amarpandey.me/blog/how-not-to-open-a-pull-request--and-how-to-do-it-right/</link>
      <pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/how-not-to-open-a-pull-request--and-how-to-do-it-right/</guid>
      <description>Picture this: You&amp;rsquo;re maintaining an open-source project, and you receive a pull request that promises to revolutionize your codebase. Security improvements, architectural enhancements, performance optimizations – it has everything! Sounds perfect, right?&#xA;That&amp;rsquo;s exactly what happened with my project spot-optimizer. The contributor was skilled, the intentions were great, but there was one major problem:&#xA;Changes Count Lines Added 2,200+ Lines Removed 1,200 Files Changed 25 Total Commits 15 Despite the valuable improvements it offered, I had to close it.</description>
    </item>
    <item>
      <title>Never Push a Work Commit with Your Personal Email Again</title>
      <link>https://amarpandey.me/blog/never-push-a-work-commit-with-your-personal-email-again/</link>
      <pubDate>Sat, 05 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/never-push-a-work-commit-with-your-personal-email-again/</guid>
      <description>As developers, it’s common to wear multiple hats — working on company projects during the day and tinkering with open-source or personal side-projects at night. If you’ve ever accidentally committed to Git using your personal email in a company repo (or worse, pushed your work identity to a public repo 😅), you know how frustrating it can be.&#xA;I used to run into this problem often, especially since I used the same laptop for both work and personal projects.</description>
    </item>
    <item>
      <title>From Bottlenecks to Balance: Dynamic Skew Join Fixes in Spark</title>
      <link>https://amarpandey.me/blog/from-bottlenecks-to-balance-dynamic-skew-join-fixes-in-spark/</link>
      <pubDate>Mon, 07 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/from-bottlenecks-to-balance-dynamic-skew-join-fixes-in-spark/</guid>
      <description>When working with large datasets in Spark, joins are a common operation. But what happens when data distribution isn’t uniform? Let’s dive into a real-world scenario to understand why dynamic skew join optimization is not just useful, but often essential.&#xA;The Problem Setup Assume we have two large tables and we&amp;rsquo;re trying to join them using the following Spark SQL:&#xA;SELECT * FROM large_table_one JOIN large_table_two ON large_table_one.key = large_table_two.</description>
    </item>
    <item>
      <title>4TB RAM, Yet an OOM Error? Debugging a Spark Memory Mystery</title>
      <link>https://amarpandey.me/blog/4tb-ram-yet-an-oom-error-debugging-a-spark-memory-mystery/</link>
      <pubDate>Sun, 30 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/4tb-ram-yet-an-oom-error-debugging-a-spark-memory-mystery/</guid>
      <description>Everything seemed right—ample resources, a well-sized cluster, and yet, the Spark job kept failing with an out-of-memory error. Logs pointed to memory allocation failures, but with a 63-node cluster, each equipped with 64GB RAM, this shouldn’t have been an issue. We tweaked configurations, analyzed logs, and even considered scaling up the cluster. But the real solution? It wasn’t what we expected.&#xA;The Data Challenge Our task involved processing three datasets:</description>
    </item>
    <item>
      <title>Deep Dive into Spark Jobs and Stages</title>
      <link>https://amarpandey.me/blog/deep-dive-into-spark-jobs-and-stages/</link>
      <pubDate>Sun, 23 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/deep-dive-into-spark-jobs-and-stages/</guid>
      <description>When working with large-scale data processing using Apache Spark, understanding how jobs and stages work is crucial to optimizing performance. This blog is for those who already have some experience with Spark and want to dig deeper into the internal mechanics of jobs and stages.&#xA;Spark Transformations and Actions In Spark, operations are classified into two main categories: Transformations and Actions.&#xA;Transformations: These operations do not trigger execution but define a new dataset from an existing one.</description>
    </item>
    <item>
      <title>Balancing the RUM Conjecture: Navigating Database Trade-Offs</title>
      <link>https://amarpandey.me/blog/balancing-the-rum-conjecture-navigating-database-trade-offs/</link>
      <pubDate>Tue, 05 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/balancing-the-rum-conjecture-navigating-database-trade-offs/</guid>
      <description>When designing databases, there&amp;rsquo;s a constant balancing act among three main factors:&#xA;Read times Update cost Memory/storage overhead The RUM Conjecture suggests that optimizing any two of these factors will negatively impact the third. Essentially, you can only choose two out of the three to prioritize in any design.&#xA;Example: Log-Structured Databases Consider a log-structured database:&#xA;Update-optimized: Records are appended at the end of the file, allowing efficient updates. Low memory/storage overhead: There’s no additional indexing, saving on storage.</description>
    </item>
    <item>
      <title>The CAP Theorem: Balancing the Big Three in Distributed Databases</title>
      <link>https://amarpandey.me/blog/the-cap-theorem-balancing-the-big-three-in-distributed-databases/</link>
      <pubDate>Tue, 15 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/the-cap-theorem-balancing-the-big-three-in-distributed-databases/</guid>
      <description>The CAP theorem, also known as Brewer’s theorem (named after computer scientist Eric Brewer), defines a fundamental trade-off in distributed systems: any distributed data store can provide only two out of three guarantees at any time:&#xA;C: Consistency A: Availability P: Partition Tolerance What Do These Terms Mean? Consistency (C): Every read receives the most recent write or an error. This means that the data you access is guaranteed to be the latest version, or the system will notify you that something went wrong.</description>
    </item>
    <item>
      <title>Fine-Tuning Shuffle Partitions in Apache Spark for Maximum Efficiency</title>
      <link>https://amarpandey.me/blog/fine-tuning-shuffle-partitions-in-apache-spark-for-maximum-efficiency/</link>
      <pubDate>Fri, 24 May 2024 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/fine-tuning-shuffle-partitions-in-apache-spark-for-maximum-efficiency/</guid>
      <description>Apache Spark&amp;rsquo;s shuffle partitions play a critical role in data processing, especially during operations like joins and aggregations. Properly configuring these partitions is essential for optimizing performance.&#xA;Default Shuffle Partition Count By default, Spark sets the shuffle partition count to 200. While this may work for small datasets (less than 20 GB), it is usually inadequate for larger data sizes. Besides, who would work with just 20 GB of data on Spark?</description>
    </item>
    <item>
      <title>Handling Large Broadcast Joins in Apache Spark</title>
      <link>https://amarpandey.me/blog/handling-large-broadcast-joins-in-apache-spark/</link>
      <pubDate>Wed, 22 May 2024 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/handling-large-broadcast-joins-in-apache-spark/</guid>
      <description>In Apache Spark, efficient data processing often relies on the use of broadcast joins. However, when the dataset exceeds a certain size, specifically 8GB, you may encounter the following error:&#xA;Caused by: org.apache.spark.SparkException: Cannot broadcast the table that is larger than 8GB: 13 GB This error arises because Spark is attempting to broadcast a dataset that is larger than the maximum threshold allowed for broadcast joins. By default, Spark&amp;rsquo;s threshold for broadcasting is set to 8GB.</description>
    </item>
    <item>
      <title>Symptoms of Bad Code</title>
      <link>https://amarpandey.me/blog/symptoms-of-bad-code/</link>
      <pubDate>Tue, 19 Jul 2022 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/symptoms-of-bad-code/</guid>
      <description>1. Rigidity Rigidity is the tendency of the system to be hard to change. Code that has dependencies that snake out in so many directions and you cannot make an isolated change without changing everything around it. Rigidity causes compile time error. 2. Fragility A system is fragile when a small change in one module causes other unrelated modules to misbehave.&#xA;It is the tendency of the code to break in many places even when you make changes in one place.</description>
    </item>
    <item>
      <title>Docker - the right way</title>
      <link>https://amarpandey.me/blog/docker---the-right-way/</link>
      <pubDate>Sun, 23 Jan 2022 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/docker---the-right-way/</guid>
      <description>Docker is a software framework for building, running, and managing containers on servers and the cloud. Here are the several best practices for using Docker in production to improve security, optimize image size and write cleaner and more maintainable Dockerfiles.&#xA;1. Use Official Docker Image as Base Image Always use the official or verified base image when writing the docker file. Let&amp;rsquo;s say you are developing a java application and want to build it and run it as a docker image.</description>
    </item>
    <item>
      <title>GitOps - the easy way</title>
      <link>https://amarpandey.me/blog/gitops---the-easy-way/</link>
      <pubDate>Tue, 04 Jan 2022 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/gitops---the-easy-way/</guid>
      <description>What is GitOps? Treat the infrastructure as code the same way as application code.&#xA;Separate repository for Infrastructure as code. DevOps pipeline. How does GitOps works? Infrastructure as Code hosted on Git repository.&#xA;Version controlled. Team collaboration. Use branching strategy to merge code in git repository. With CI pipeline to test the code. With CD pipeline to apply the changes to the Infrastructure. With the above steps we achieve: Automated Process.</description>
    </item>
    <item>
      <title>Finger Detection and Tracking using OpenCV and Python</title>
      <link>https://amarpandey.me/blog/finger-detection-and-tracking-using-opencv-and-python/</link>
      <pubDate>Sat, 28 Jul 2018 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/finger-detection-and-tracking-using-opencv-and-python/</guid>
      <description>TL;DR. Code is here.&#xA;Finger detection is an important feature of many computer vision applications. In this application, A histogram based approach is used to separate out the hand from the background frame. Thresholding and Filtering techniques are used for background cancellation to obtain optimum results.&#xA;One of the challenges that I faced in detecting fingers is differentiating a hand from the background and identifying the tip of a finger.</description>
    </item>
    <item>
      <title>What is Google Summer of Code? How to prepare for it?</title>
      <link>https://amarpandey.me/blog/what-is-google-summer-of-code---how-to-prepare-for-it/</link>
      <pubDate>Sun, 02 Jul 2017 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/blog/what-is-google-summer-of-code---how-to-prepare-for-it/</guid>
      <description>We will talk about Google Summer of Code but before that let’s talk about what Open Source Development is. Yes, it’s very important.&#xA;What is open source development? Open-source software development is the process by which open-source software, or similar software whose source code is publicly available, is developed. These are software products available with its source code under an open-source license to study, change, and improve its design.</description>
    </item>
    <item>
      <title>About</title>
      <link>https://amarpandey.me/about/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/about/</guid>
      <description>Hello, I&amp;rsquo;m Amar Prakash Pandey :)&#xA;I’m a developer and hacker with a knack for solving problems in unconventional ways—finding simpler solutions where conventional methods fall short. Curiosity drives me, and I’m always experimenting with new ideas, whether it’s building efficient software, designing data platforms, or creating tools to make developers’ lives easier. You’ll often find me diving into distributed computing and large-scale data processing while sharing my learnings through open-source contributions and blogs.</description>
    </item>
    <item>
      <title>Projects</title>
      <link>https://amarpandey.me/projects/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://amarpandey.me/projects/</guid>
      <description>Here are some of the projects that I have worked on. You can find the source code and demo link for each project below.</description>
    </item>
  </channel>
</rss>
