Hey, I’m Justin ๐Ÿ‘‹

Welcome to my blog โ€” Its some random thoughts from a foolish developer!

เดฎเดงเตเดฐเด‚ เดฎเดฒเดฏเดพเดณเด‚. เด’เดฐเต เดฎเดฒเดฏเดพเดณเด‚ เดชเตเดฐเต‹เดฌเตเดฒเด‚ เดธเต‹เตพเดตเดฟเด™เต

เดŽเดจเดฟเด•เตเด•เต เดชเดฒเดชเตเดชเต‹เดดเตเด‚ เดคเต‹เดจเตเดจเดฟเดฏเดฟเดŸเตเดŸเตเดฃเตเดŸเต เดจเดฎเตเดฎเตเดŸเต† เดเดคเต เดญเดพเดทเดฏเดฟเดฒเดพเดฃเต เดจเดฎเตเดฎเดณเตเดŸเต† เดฌเตเดฐเต†เดฏเดฟเตป เดชเตเดฐเดตเตผเดคเตเดคเดฟเด•เตเด•เตเดจเตเดจเดคเต เดŽเดจเตเดจเต. เด‡เดจเตเดฑเตผเดจเต†เดฑเตเดฑเดฟเตฝ เดชเดฐเดคเตเดฎเตเดชเต‹เตพ เดจเดฎเตเดฎเตเด•เตเด•เต เดฎเดจเดธเดฟเดฒเดพเด•เตเด‚ เดฌเตเดฐเต†เดฏเดฟเตป symbols เด‰เด‚ เดฎเต‹เดกเดฒเตเด•เดณเตเด‚ เด†เดฃเต เด‰เดชเดฏเต‹เด—เดฟเด•เตเด•เตเดจเตเดจเดคเต เดŽเดจเตเดจเต.ย เดชเด•เตเดทเต† เด’เดฐเต เดชเตเดฐเต‹เดฌเตเดฒเด‚ เดธเต‹เตพเดตเต เดšเต†เดฏเตเดฏเตเดฎเตเดชเต‹เตพ เดจเดฎเตเดฎเตเดŸเต† เดฌเตเดฐเต†เดฏเดฟเตป เด•เต‚เดŸเตเดคเตฝ เดธเดฎเดฏเดตเตเด‚ เดšเดฟเดฒเดตเดดเดฟเด•เตเด•เตเดจเตเดจเดคเต เดเดกเดฟเดฏเด•เดณเต† เดชเดฐเดฟเดญเดพเดท เดšเต†เดฏเตเดฏเดพเตป เด†เดฏเดฟเดฐเดฟเด•เตเด•เตเด‚. เดชเตเดฐเดคเตเดฏเต‡เด•เดฟเดšเตเดšเต เดฎเดฒเดฏเดพเดณเดพเดฏเดฟ เด†เดฏ เดŽเดจเดฟเด•เตเด•เต เด‡เดคเตŠเดฐเต เดชเตเดฐเดถเตเดจเดฎเดพเดฏเดฟ เดคเต‹เดจเตเดจเดฟเดฏเดฟเดŸเตเดŸเตเดฃเต. เดšเดฟเดฒ เดชเตเดฐเต‹เดฌเตเดฒเต†เด‚เดธเต เดธเต‹เตพเดตเต เดšเต†เดฏเตเดฏเตเดฎเตเดชเต‹เตพ เดŽเดจเดฟเด•เตเด•เต เด•เต‚เดŸเตเดคเตฝ เดตเดดเด™เตเด™เตเดจเตเดจ เดญเดพเดท เด…เดคเต เดฎเดฒเดฏเดพเดณเด‚ เด†เดฃเต. เด‰เดฆเดพเดนเดฐเดฃเดคเตเดคเดฟเดจเต เดˆ เดชเตเดฐเต‹เดฌเตเดฒเด‚ เดจเต‹เด•เตเด•เต‚. Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining....

April 6, 2025

Managing Concurrent Updates with Distributed Locks

Managing Concurrent Updates with Distributed Locks Managing Concurrent Updates with Distributed Locks In distributed systems, managing concurrent access to shared resources is crucial to ensure data consistency and prevent corruption. Letโ€™s explore how to handle this using a Java example, starting with a basic implementation and improving it step-by-step. Basic Implementation Without Proper Lock Handling Hereโ€™s a simple version of a method that tries to acquire a distributed lock, perform an update, and release the lock:...

May 30, 2024

Revisiting Dynamic Programming

The main problem with me w.r.t DP problem is forgetting it if i don't practice. So I decided to revisit all the DP problems i solved once again just to refresh my memory. So first Lets start with a simple one. Here we go!!! Climbing stairs from Leetcode. Explanation : You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps....

March 19, 2024

Java Design Patterns - JDP Series #1

Design patterns are general reusable solutions to common problems that occur in software design. They are not code, but rather guidelines on how to solve a particular problem in a particular context. They are not a finished design that can be transformed directly into code. They are a description or template for how to solve a problem that can be used in many different situations. Types of design patterns in Java -------------------------------- There are three types of design patterns in Java: * Creational...

March 7, 2024

Fed 27 2024. A Day of Compassion and Unexpected Encounters

Today was not an ordinary day for me; it began with the need to take an unexpected sick day. The morning unfolded with urgency as I planned to drop off my child, but fate had a different story in store. Around 9:30 AM, near Hopefarm in Whitefield, my day took a dramatic turn. As I attempted to overtake a car on the right, an elderly man crossing the road appeared in my path....

February 27, 2024

Jump Game

Jump Game Peak and Valley approach. Jump game is a medium level leetcode problem which is very interesting yet brainy. Once you understand the problem correctly then the answer is obvious. The probelm goes like this according to leetcode.ย You are given an integer arrayย nums. You are initially positioned at the arrayโ€™sfirst index, and each element in the array represents your maximum jump length at that position. Returnย true_ย if you can reach the last index, orย falseย otherwise_....

February 22, 2024

From Painful Tables to Performance Bliss: My Journey with Database Partitioning - Part II

Skewed workloads and Relieving Hot Spots Imagine you have a library with books categorized by their first letter (A-Z). This is like partitioning data based on a key (like the first letter of a book title). Problem: One letter (say, โ€œXโ€) becomes super popular (a celebrity author!). Everyone wants to read โ€œXโ€ books, causing a โ€œhot spotโ€ (overcrowding) in the โ€œXโ€ section. Hashing doesnโ€™t fix it: Even if you assign different โ€œbucketsโ€ based on a hash of the title, all โ€œXโ€ books still end up in the โ€œXโ€ bucket....

February 15, 2024

From Painful Tables to Performance Bliss: My Journey with Database Partitioning - Part I

Ah, the early days of wrangling massive data tables! I vividly remember the struggle โ€“ slow queries, performance bottlenecks, and the ever-growing cloud bill. It was an uphill battle until we unearthed the magic bullet: database partitioning. Talk about a revelation! This newfound approach not only eradicated performance issues but also slashed computational costs. But the story doesnโ€™t end there. My exploration revealed a treasure trove of partitioning techniques, each unlocking unique advantages....

February 11, 2024

Event Sourcing - Moving out of traditions | Simplified version

Introduction A colleague recommended Martin Kleppmannโ€™s โ€œDesigning Data-Intensive Applicationsโ€ to me. Initially, I found the beginning somewhat tedious and opted for a non-linear approach, selecting topics of interest at random rather than reading from start to finish as one might with a novel. This strategy seemed fitting given the bookโ€™s comprehensive coverage of software system design, akin to an engineering bible. Today, Iโ€™ve chosen to delve into the concept of Event Sourcing....

February 6, 2024

Designing a Browser History Feature

Objective The goal is to create a class capable of handling browser history operations efficiently. This includes: Initializing the browser with a specified homepage. Navigating to new URLs (visiting pages). Enabling backward and forward navigation through the history. Key Components Constructor: Initializes the browser with a homepage. Visit(URL): Navigates to a new URL and updates the current position in the history. Back(steps): Moves back a specified number of steps in history and returns the current URL....

February 4, 2024