Skip to main content

Posts

Spring Boot Global Exception Handling Done Right — Ep 3

In Episode 2 we poured the foundation — the project, every dependency, and all the configuration in one place. Before we build a single feature on top of it, we build the part that most tutorials skip entirely: error handling . Episode 3 is about making every failure look the same. When something goes wrong in an API — a bad password, a duplicate email, an expired token — the client should get back one predictable shape, with the right HTTP status and a stable error code it can actually program against. No stack traces leaking to users. No endpoint returning 200 OK with an error buried inside. Today we build that backbone: a response envelope, a set of typed exceptions, and one handler that translates all of them. What you’ll learn in Episode 3 This episode is the first real code of the series — and it’s deliberately unglamorous, because a consistent error contract is what makes everything after it pleasant to build. By the end you...
Recent posts

Build Instagram's Auth Backend in Spring Boot 4 — Ep 2

In Episode 1 we drew the whole blueprint — nine endpoints, the security filter chain, JWT with refresh-token rotation, Redis, and PostgreSQL. Today we pour the foundation. Episode 2 is where the project comes into existence. We generate it, wire up every single dependency, set up all the configuration in one place, and understand the entry point — so that when the real code starts in Episode 3, we’re building on something solid instead of a mystery pom.xml we copy-pasted off the internet. No business logic yet. Just a clean, deliberate skeleton for a production-grade Spring Boot 4 authentication service. What you’ll learn in Episode 2 This is a hands-on, IDE walkthrough episode. The philosophy: a foundation you don’t understand is a foundation you can’t debug. So instead of pasting a pom and moving on, we go dependency by dependency and explain why each one earns its place. By the end you’ll be able to: Generate a Spring Bo...

Build Instagram's Auth Backend in Spring Boot 4 — Ep 1

Most Spring Boot authentication tutorials on YouTube will get you hacked. Hardcoded secrets. Passwords stored in plain text. Tokens that never expire. People copy that code, ship it to production, and then wonder why they end up in a breach report. This series is the opposite of that. Over ten episodes, we build the authentication backend that real apps — apps like Instagram — actually run on: Spring Boot 4, Spring Security 7, JWT with refresh-token rotation, Redis, and PostgreSQL . Production-grade, from the first commit. Episode 1 is the blueprint: the full architecture and the six decisions behind the stack, before we write a single line of code. What you’ll learn in Episode 1 This is a whiteboard episode — no coding yet, on purpose. Before you write auth code, you need to understand why each piece exists, otherwise you end up copy-pasting patterns you can’t defend in a code review. By the end you’ll understand: Why the most po...

What BITS Pilani Teaches You BEFORE M.Tech Starts (Python + Math Foundation)

Before my actual M.Tech Data Science & Engineering curriculum kicked off at BITS Pilani WILP, the program ran us through two preparatory courses over a couple of weeks — an Introduction to Python course and a Zero Level Mathematical Foundation course. Eight live sessions in total, zero credits, zero pressure on paper. I went in expecting both to be easy refreshers. One of them genuinely was. The other made me reconsider how much rust I'd built up. In this post I'll walk you through what was covered in each course, what I actually learned, and my honest take on whether the bootcamp was worth the time. If you're considering BITS Pilani WILP M.Tech, planning how to prep, or just want to know what the program actually looks like before semester one starts — this should give you a real picture. Watch the Full Video I've recorded a complete walkthrough of both courses on my YouTube channel. The video covers everything below in more detail, including the slides,...

Lead Developer → Future Professor: Why I Enrolled in BITS Pilani MTech at 31

Most developers plan for the next job or the next promotion. "But what's your plan for after 45?" If you can't confidently answer that — this post will make you think. After 10+ years of writing Java in Banking & Fintech, I enrolled in BITS Pilani's Work Integrated MTech program — Data Science & Engineering, April 2026 batch. Not for a salary hike. Not for a job switch. For a 15-year plan . Watch Full Video Explanation Why MTech After 10+ Years of Coding? My long-term goal is to become an Engineering Professor in Delhi-NCR around 2040 — after I retire from corporate. After a decade of building production systems, I genuinely believe that experienced developers make the best teachers . A fresh PhD holder might explain a database index using mathematical proofs. I've debugged a query that brought down a payments system because someone forgot an index. That real-world context doesn't come from textbooks. The Catch In India,...

ArrayList vs LinkedList in Java (Complete Guide for Interviews & Backend)

Most developers think they understand ArrayList and LinkedList … until an interviewer asks: “When would you use one over the other?” If you can’t confidently answer that — this guide will fix it. Watch Full Video Explanation What is a List in Java? A List is an ordered collection that: Maintains insertion order Allows duplicate elements Supports index-based access List<Integer> list = new ArrayList<>(); ArrayList Deep Dive 1. Internal Working ArrayList is backed by a dynamic array . 2. Contiguous Memory [10] [20] [30] [40] 👉 Enables fast access → O(1) 3. Size vs Capacity Size = 3 Capacity = 5 [10] [20] [30] [_] [_] 4. Resizing Mechanism New array created Capacity increases (~1.5x) Elements copied 👉 Resizing cost = O(n) 5. Performance Operation Time Complexity Access O(1) Insert (end) O(1) amortized Insert (middle) O(n) Delete O(n) ⚠️ Limitation Before: [10, 2...