Harsh (@Harsh_Harry007) header
Harsh (@Harsh_Harry007) profile picture

Open to Work Founding Engineer (Frontend-Leaning) @huddle01com | @_TheTerminal_ | full stack dev @react @nextjs @typescript @node @langgraph @langchain

Bengaluru, India
Joined May 2021
Photo by Harsh (@Harsh_Harry007)Photo by Harsh (@Harsh_Harry007)Photo by Harsh (@Harsh_Harry007)Photo by Harsh (@Harsh_Harry007)Photo by Harsh (@Harsh_Harry007)Photo by Harsh (@Harsh_Harry007)Photo by Harsh (@Harsh_Harry007)Photo by Harsh (@Harsh_Harry007)Photo by Harsh (@Harsh_Harry007)Photo by Harsh (@Harsh_Harry007)
🚀 Day 24 of my Coding Challenge! After exploring debouncing and throttling, today I'm diving deeper into asynchronous JavaScript by recreating one of its most commonly used Promise methods. Today's Problem: Implement Your Own Promise.all() Implement a custom version of Promise.all() using the Promise constructor without relying on the built-in Promise.all() method. Requirements: Resolve when all promises are fulfilled. Reject immediately if any promise rejects. Preserve the original input order, regardless of completion order. Support both promises and non-promise values. Handle an empty input. Example: Input: [Promise.resolve(10), Promise.resolve(20), 30] Output: [10, 20, 30] Key concepts explored: Promise constructor Asynchronous JavaScript Promise resolution and rejection Concurrent execution Error handling How would you preserve the original order when promises resolve at different times? #100DaysOfCode #JavaScript #Promises #FrontendEngineering #CodingChallenge #SoftwareEngineering
4
Day 23 of my Coding Challenge! 🚀 Today's problem: Implement throttle(fn, delay). Write a function that limits callback execution to at most once per specified time interval. When would you choose throttling over debouncing? #JavaScript #100DaysOfCode #FrontendEngineering
1
1
23
const throttle = (fn, delay) => { let lastCall = 0; function throttled(...args) { const now = Date.now(); if (now - lastCall >= delay) { lastCall = now; fn.apply(this, args); } } return throttled; }; const handleThrottle = throttle(() => { console.log("handle"); }, 500); window.addEventListener("scroll", handleThrottle);
3
Day 22 of my Coding Challenge! 🚀 Today's problem: Implement debounce(fn, delay). Write a function that executes a callback only after a specified delay has passed since its last invocation. Can you implement debounce from scratch without using external libraries? #JavaScript #100DaysOfCode #FrontendEngineering
3
3
124
const debounce = (fn, delay) => { let timer; function debounced(...args) { if (timer) { clearTimeout(timer); } timer = setTimeout(() => { fn.apply(this, args); }, delay); debounced.cancel = () => { clearTimeout(timer); timer = null; }; } return debounced; }; const handleDebounce = debounce(() => console.log("Handle Api call"), 500); handleDebounce();
3
Day 21 of learning DSA! 🚀 Today's problem: Implement a Singly Linked List Create a linked list that supports insertion, deletion, searching, and traversal. Example: 10 → 20 → 30 → 40 → null Unlike arrays, linked lists store elements in nodes connected through references. When would you prefer a Linked List over an Array? #DSA #100DaysOfCode #JavaScript #LearningInPublic
1
2
26
class NodeChild { public val; public next: null | NodeChild = null; constructor(val: number) { this.val = val; this.next = null; } } class LinkedList { private head: null | NodeChild = null; constructor() { this.head = null; } append(val: number) { const node = new NodeChild(val); if (!this.head) { this.head = node; return; } let currentHead = this.head; while (currentHead.next) { currentHead = currentHead.next; } currentHead.next = node; } print() { let result = ""; let currentHead = this.head; while (currentHead) { result += `${currentHead.val} --->`; currentHead = currentHead.next; } console.log(`${result} ---> null`); } }
4
Over the past few days, I've been exploring @prooflinedev open-source Session Recorder and building a feature called Session Diff to help developers better understand the impact of their code changes. The idea behind this contribution was to extend Proofline's existing session recording capabilities by enabling developers to compare browser sessions before and after code changes, evaluate performance improvements, validate bug fixes, and identify potential regressions. What did I learn? One of my key learnings was IndexedDB — an asynchronous, browser-based NoSQL database that allows us to store and retrieve large amounts of structured data locally using keys, indexes, and cursors without making backend API calls. What did I build? I built two independent comparison engines: Network Diff Engine — compares network requests, API response times, HTTP status codes, and request failures. Error Diff Engine — compares console and runtime errors, their origins, messages, and occurrence counts. I connected both engines to the frontend using a React custom hook that retrieves session data concurrently from IndexedDB, processes the events, and provides the comparison results to a dedicated dashboard. The entire comparison runs locally within the browser without introducing additional backend APIs or dependencies. How can developers get the most out of this feature? Compare application behaviour before and after code changes. Evaluate API performance optimizations. Identify unnecessary network requests. Check whether previously observed errors are still occurring. Identify potential regressions before merging a PR. Improve code reviews with recorded browser evidence. By recording the same user journey before and after a code change, developers can better understand whether their changes are producing the expected results. Git Diff tells you what changed in your code. Session Diff helps you understand what changed in your browser. I took this open-source contribution as a learning opportunity, not just from an engineering perspective but also from a product perspective — understanding how a feature can add real value to a developer's everyday workflow. Would love to hear your thoughts and feedback, @mohsen____ and the @prooflinedev team! PR: github.com/prooflinedev/sess… #OpenSource #DeveloperTools #IndexedDB #ReactJS #SoftwareEngineering #BuildInPublic
2
1
2
4
190
Day 20 of learning DSA! 🚀 Today's problem: Implement a Circular Queue Design a fixed-size circular queue that supports the following operations: enqueue() dequeue() front() rear() isEmpty() isFull() Unlike a linear queue, a circular queue reuses empty spaces by wrapping around to the beginning of the array. Can you implement all these operations in O(1) time? #DSA #100DaysOfCode #JavaScript #LearningInPublic
2
3
54
class CircularQueue { private size; private front; private rear; private queue; constructor(size: number) { if (!Number.isInteger(size) || size < 1) { throw new Error("Queue must be greater then 0"); } this.size = size; this.front = -1; this.rear = -1; this.queue = new Array(this.size); } isEmpty() { return this.front === -1; } isFull() { return (this.rear + 1) % this.size === this.front; } enqueue(val: number) { if (this.isFull()) { return "Queue is Full"; } if (this.isEmpty()) { this.front = 0; this.rear = 0; } else { this.rear = (this.rear + 1) % this.size; } this.queue[this.rear] = val; } dequeue() { if (this.isEmpty()) { return "Queue is Empty"; } const value = this.queue[this.front]; if (this.front === this.rear) { this.front = -1; this.rear = -1; } else { this.front = (this.front + 1) % this.size; } return value; } print() { const result = []; let i = this.front; while (true) { result.push(this.queue[i]); if (i === this.rear) break; i = (i + 1) % this.size; } console.log(result); } }
3
2,011 GitHub contributions in 2026 so far! A year full of building, experimenting, breaking things, and learning something new every day. Curious to see how everyone else's GitHub graph looks this year. How many contributions have you made in 2026? Drop your numbers or GitHub graph below!
2
25
Yesterday, I built a basic message queue using Redis Lists. Today, I discovered why libraries like BullMQ exist. A small update on my Redis learning journey. Previously, I used redis.lpush() and redis.rpop() to build a simple FIFO email queue. The idea was straightforward: An API pushes an email job into Redis. Another endpoint picks up the job. The job gets processed. Pretty simple, right? But while building it, I started thinking about real-world scenarios. What happens if a worker picks up a job and crashes? What if the job fails because an external API is temporarily unavailable? How do we retry failed jobs without immediately overwhelming the service? And what happens when thousands of jobs enter the queue? A basic Redis List doesn't automatically solve these problems. You can build your own retry mechanisms, acknowledgment logic, job tracking, and worker management. But then you're building an entire job-processing system yourself. That's when I came across BullMQ. BullMQ is an open-source, Redis-backed job queue system designed for reliable background processing. Some features that caught my attention: → Automatic retries → Fixed and exponential backoff → Optional jitter → Stalled-job recovery → Multiple workers and configurable concurrency → Job lifecycle events → Rate limiting So I decided to build another small project to understand it. Using BullMQ, Redis, Express, and TypeScript, I implemented: • An API that adds welcome-email jobs to a queue. • A worker that simulates processing them. • Up to 3 job attempts with exponential backoff. • Events for waiting, active, completed, and failed jobs. • A rate limiter to control worker throughput. There's still a lot more to explore, especially worker crashes, concurrency, jitter, and idempotency. One thing I've realized: Building a feature that works is relatively straightforward. Building something that can recover when things go wrong is where the interesting engineering problems begin. My Redis Lists implementation: github.com/harry-sketch/Foun… My BullMQ implementation: github.com/harry-sketch/Bull… Would love to hear what else I should explore about message queues and background job processing. Still exploring. Still building. Still learning. #Redis #BullMQ #SystemDesign #BuildInPublic
5
1
6
200
🚀 Day 19 of my DSA Challenge! After exploring Sliding Window and Prefix Sum, today I'm diving into another fundamental data structure — Stack. Today's Problem: Valid Parentheses Given a string containing parentheses (), curly brackets {}, and square brackets [], write a function that determines whether the string is valid. A string is valid if: Every opening bracket has a matching closing bracket. Brackets are closed in the correct order. Every closing bracket has a corresponding opening bracket. Example 1: Input: "({[]})" Output: true Example 2: Input: "([)]" Output: false This problem helps us understand the Stack data structure and the LIFO (Last In, First Out) principle. How would you approach this problem? Can you solve it without using a Stack? #100DaysOfCode #DSA #JavaScript #Stack #LearningInPublic #SoftwareEngineering
1
2
71
const isVaildParenthesis = (str: string): boolean => { if (!str.length) return false; const stack: string[] = []; const freq: Record<string, string> = { ")": "(", "}": "{", "]": "[", }; for (const ch of str) { if (["(", "{", "["].includes(ch)) { stack.push(ch); } else { if (stack.length === 0) return false; const top = stack.pop(); if (freq[ch] !== top) { return false; } } } return stack.length === 0; };
8
Redis might seem like a topic you can cover in a 30-minute YouTube tutorial. But there's a big difference between knowing what Redis is and understanding when, where, and why to use it. Today, I decided to take a deeper dive into Redis, one of the most widely used technologies in modern application development. Many of you probably know Redis better than I do, but I'm sharing this post as part of my own learning journey. What is Redis? Redis is an in-memory data structure store. We often introduce Redis into our applications as a caching layer for frequently accessed or hot data. However, Redis is much more than just a caching layer. Here are some interesting use cases I explored: → Caching: Reducing unnecessary database reads, database load, and response latency. → Shared counters: Managing rate limits, likes, and views across multiple application instances. → Session management: Maintaining shared user sessions across multiple servers. → Background jobs: Using Redis-backed queues for sending emails, delivering notifications, and generating reports. → OTP management: Storing temporary verification codes with automatic expiration using TTL (Time to Live). Understanding the Cache-Aside Pattern I've also attached a small architecture diagram explaining how Redis can help reduce database read pressure. The client sends a request to the application server. The server first checks Redis for the requested data. On a cache hit, the server returns the cached data without querying the database. On a cache miss, the server fetches the data from the database, stores it in Redis, and returns the response to the client. The database remains the single source of truth in this architecture. Putting my learning into practice Instead of just watching tutorials and reading documentation, I wanted to implement some practical use cases as well. So, I started a GitHub repository called Foundation of Redis. Currently, it contains two practical implementations: 1. OTP Management using Redis Generating a six-digit OTP using the crypto module. Storing OTPs in Redis with a 30-second TTL. Verifying and deleting OTPs after successful verification. Checking the remaining expiration time. 2. Site Banner APIs using Redis Exploring Redis through a practical site banner use case. I'll continue adding more real-world use cases, design patterns, and practical implementations to this repository as I explore Redis further. But Redis is not the solution to every problem. Just because Redis is fast doesn't mean every application needs it. The decision to introduce Redis should depend on the application's requirements, access patterns, and scalability needs. My biggest takeaway from today's learning: Knowing how to use a technology is one thing. Understanding when to use it, why to use it, and when not to use it is what makes the difference in engineering. GitHub repository: github.com/harry-sketch/Foun… If you have worked extensively with Redis, I'd love to hear about some interesting real-world use cases or challenges you've encountered. Still exploring. Still building. Still learning. @Redisinc #Redis #SystemDesign #BackendDevelopment #SoftwareEngineering #LearningInPublic #BuildInPublic
1
50
Day 18 of learning DSA! 🚀 Today's problem: Find the Prefix Sum Array Given an array, calculate the cumulative sum of its elements using the Prefix Sum technique. Example: Input: [1, 2, 3, 4, 5] Output: [1, 3, 6, 10, 15] Can you use this technique to answer range sum queries in O(1) time? #DSA #100DaysOfCode #JavaScript #LearningInPublic
🤖 Made with AI
1
1
45
const prefixSum = (arr: number[]) => { const prefixArr = new Array(arr.length); prefixArr[0] = arr[0]; for (let i = 1; i < arr.length; i++) { prefixArr[i] = prefixArr[i - 1] + arr[i]; } return prefixArr; };
4
Day 17 of learning DSA! 🚀 Today's problem: Maximum Sum Subarray of Size K Find the maximum sum of any contiguous subarray of size k. Example: Input: [2, 1, 5, 1, 3, 2] K = 3 Output: 9 Can you solve this in O(n) time using the sliding window technique? #DSA #100DaysOfCode #JavaScript #LearningInPublic
1
2
52
const arr = [2, 1, 5, 1, 3, 2]; let k = 3; k = k % arr.length; const maxSum = (arr: number[], k: number) => { let windowSum = 0; let maxVal = 0; for (let i = 0; i < k; i++) { windowSum += arr[i]; } maxVal = windowSum; for (let i = k; i < arr.length; i++) { windowSum += arr[i]; windowSum -= arr[i - k]; maxVal = Math.max(windowSum, maxVal); } return maxVal; }; console.log(maxSum(arr, k));
12