Skip to main content

Posts

πŸ’₯ ResizeObserver Error in React

πŸ’₯ ResizeObserver Error in React (Why it appears only in DEV and scares everyone 😱) " Uncaught runtime errors: ResizeObserver loop completed with undelivered notifications " If you have ever seen this red screen suddenly appear while scrolling, resizing, or editing an AG Grid… πŸ‘‰ Welcome to the ResizeObserver Club πŸŽ‰ πŸ€” What is ResizeObserver? ResizeObserver is a browser API that watches: Element width changes Element height changes Layout recalculations Modern UI libraries like: AG Grid Material UI Ant Design use ResizeObserver heavily to keep layouts perfect. AG Grid uses it a LOT πŸ‘€ 😈 What does this error actually mean? In simple words: "Hey browser, I tried to recalculate layout again and again… but UI kept changing continuously 😀" So the browser says: "Enough! I’m stopping this infinite resize loop." πŸ’₯ 🧠 Real Reasons Why This Happens (AG Grid Edition) 1️⃣ Dynamic height inside CellRenderer Example: Height keep...
Recent posts

πŸ§ͺ🧠 TDD vs BDD & πŸ€” Why Interviewers Ask Which Design Pattern Are You Using?

πŸ§ͺ🧠 TDD vs BDD & πŸ€” Why Interviewers Ask “Which Design Pattern Are You Using?” Two interview questions that look simple… but silently decide your fate. πŸ˜„☕ If you’re a Java / Spring Boot developer and you’ve attended even 2–3 interviews , you’ve definitely heard these questions: ❓ “Are you using TDD or BDD?” ❓ “What design pattern are you using in your project?” And suddenly your brain goes like… 🧠 “Wait… we are just writing code da… what pattern??” Don’t worry. This blog will spoon-feed you the answer πŸ‘ΆπŸ₯„ — slowly, clearly, and in an interview-safe way. πŸ§ͺ Question 1: TDD vs BDD – What are you really doing? 🀯 Dumb Question: “Both are testing… then why two names?” πŸ’‘ Brilliant Answer (Baby Explanation): Think like this πŸ‘‡ TDD BDD Developer talking to code πŸ§‘‍πŸ’»➡️πŸ’» Business talking to system πŸ§‘‍πŸ’Ό➡️πŸ–₯️ πŸ”΅ TDD – Test Driven Development πŸ§ͺ πŸ‘Ά One-line concept: Write test first ❌, then write code ✔, then clean it πŸ”„ @Test...

🧩 Avoid Mixed Orders! Thread-Based Transaction Handling in Spring Boot Explained

Handling Transactions in Thread-Based Environments (Java + Spring Boot) 🧠 How Do You Handle Transactions in a Thread-Based Environment? (The ultimate fresher-friendly explanation — with jokes, questions & real-life pain πŸ˜‚) 1️⃣ First — Why This Question Comes in EVERY Interview? Interviewer thinking: “If this candidate can’t handle concurrent transactions, I’ll hire him and later he’ll break my production database.” 😭 You thinking: “Why this fellow always asking this tough question?” 😫 Reality: πŸ‘‰ In real applications multiple threads hit the system. πŸ‘‰ Multiple users click at the same time. πŸ‘‰ If your code is not transaction-safe, DB becomes “Kaboom πŸ’₯”. That’s why interviewers ask: “How do you handle transactions in multi-threaded scenarios?” Because they want to check: ✔ Do you understand data consistency? ✔ Do you know why @Transactional exists?...

πŸ”₯ MongoDB Index Types Explained — With Real Examples, Colors & Interview Tips

πŸƒ What is MongoDB? MongoDB is a NoSQL document-based database that stores data in JSON-like format. Instead of rows and columns, it uses collections and documents . This makes it super flexible and schema-less — perfect for fast-moving modern apps πŸš€. πŸ’‘ Difference vs SQL Databases: SQL = Tables, Rows, Columns πŸ“Š MongoDB = Collections, Documents πŸ“š ❓Why Indexes Matter Imagine searching a phonebook without alphabetical order — painful, right? πŸ˜… Indexes make your searches faster by letting MongoDB skip scanning every document. ⚡ Tip: Without indexes, MongoDB performs a collection scan — meaning it checks every record. That’s fine for 10 docs... not for 10 million! 🧠 Types of Indexes in MongoDB 1️⃣ Single Field Index Most basic and common. You index one field. db.users.createIndex({ "name": 1 }) 1 = ascending , -1 = descending . Used for queries like { name: "Priya" } . 2️⃣ Compound Index Multiple fields combined to improve multi-fi...

🐱 Tomcat vs ⚡ Netty – Which One Should You Use?

🐱 Tomcat vs ⚡ Netty – Which One Should You Use? So recently I got curious about this too πŸ€”. Everywhere in Spring Boot tutorials we see Tomcat . Then suddenly while exploring Spring WebFlux , the name Netty pops up. And I was like – “Wait, who’s this Netty guy trying to replace Tomcat?” πŸ˜… Let’s break it down with real-time examples , icons , and fun comparisons . 🐱 Tomcat – The Traditional Web Server Type: Servlet Container (blocking I/O) World: Used with Spring MVC Style: Thread-per-request model πŸ‘©‍πŸ’» Pros: Stable, widely used, battle-tested Cons: Struggles with huge concurrent connections πŸ‘‰ Example in real life: Tomcat is like a restaurant with fixed waiters 🍴. - Each customer = one thread/waiter - If too many customers come in at once → waiters run out → customers wait outside πŸšͺ ⚡ Netty – The Reactive Rockstar Type: Asynchronous Event-Driven Network Framework World: Default for Spring WebFlux Style: Event-lo...

πŸš€ Spring Batch – Beginner’s Guide with Real-Time Example

πŸš€ Spring Batch – Beginner’s Guide with Real-Time Example Ever wondered how large amounts of data are processed in batches, like a boss? 😎 Welcome to Spring Batch – your friend when you need reliable, fast, and scalable batch processing in Java! 1️⃣ What is Spring Batch? πŸ€” A framework to process large volumes of data efficiently. Handles batch jobs, transactions, retries, skip logic, and chunk-based processing . Perfect for ETL jobs, report generation, invoice processing – basically, anything your database hates if you run it all at once πŸ˜‚. 2️⃣ Important Concepts & Flow πŸ”„ Core Components: Job – The whole batch process (like a movie 🎬). Step – A phase of a job (like a scene in that movie). ItemReader – Reads data from source (DB, CSV, API…think Sherlock reading clues πŸ•΅️‍♂️). ItemProcessor – Processes/validates data (Sherlock deduces πŸ”). ItemWriter – Writes data to destination (He reports findings ✉️). Flow: Cont...

🧩Understanding on AOP in Spring Boot

🌟 My Understanding on AOP in Spring Boot AOP = Aspect-Oriented Programming 🧩 AOP is like OOP concepts but works on an Aspect model . It was developed for handling common logic like security πŸ”’, logging πŸ“, transactions πŸ’°, caching πŸ—ƒ️, scheduling ⏰, and metrics πŸ“Š. These are called cross-cutting concerns . πŸ“Œ Core Terms Aspect: A module containing cross-cutting logic (@Aspect class). Join Point: A point during execution of a program, e.g., method call. Pointcut: Expression that defines where the aspect applies. Advice: Action taken at a join point, e.g., logging before a method. Proxy: Wrapper around the actual object that intercepts calls. πŸ“Œ Types of Advice Advice Type When it Runs @Before Before method execution @After After method execution (regardless of outcome) @AfterReturning After method successfully returns @AfterThrowing After method throws exception @Around Wraps method execution (before + after) ⚙ How AOP Works Internally in Spring Boot S...