Search

Lessons (28)

  • Delivery Guarantees: At-Most, At-Least & Exactly Once

    … write again → duplicate unless idempotent Fix the duplicates on the consumer side with idempotency: js // Option 1: remember …

  • DRY: Don't Repeat Yourself

    … Learn when to remove duplication, and when duplication is actually fine. The big idea Imagine your phone number …

  • SQL Language, Identifiers & Data Types

    … UNION vs UNION ALL UNION removes duplicates, usually with sort/hash work. UNION ALL returns every row and …

  • N+1 Queries, Loading & Pagination

    … In development, log duplicate query fingerprints. In production, sample traces rather than logging sensitive SQL values.

  • Kafka Producers

    … But a retry can create a duplicate : mermaid sequenceDiagram participant P as Producer participant B as Broker P …

  • Design a Polite Web Crawler

    … Measure frontier age, duplicate rate, host compliance and fetch success.

  • Batch vs Stream and Data Modeling

    … Denormalized read model Measured read path is costly Duplicates must stay in sync Streams need an ordering key …

  • Message Queues & RabbitMQ

    … be lost, never duplicated Ack before processing At least once ⭐ Never lost, may be duplicated Ack after processing …

  • SQL Interview Query Drills

    Correct solutions for duplicates, above-average values and third-highest salary. Covers PDF questions 23, 25 and 26 …

  • DSA Interview Patterns Cheat Sheet

    … Ask about input size, duplicates, negatives, empty input. 2. Examples: work one normal example and one edge case …

  • Event-Driven Architecture

    … local copy and never call back; data is duplicated 3. Event sourcing Events are the source of truth …

  • Exactly-Once Payment Processing

    … Store UNKNOWN , query the provider, and reconcile in a worker. Watch: duplicate attempts, age of UNKNOWN records, provider …

  • The L6 System-Design Thinking Loop

    … 2M checkouts in five minutes. Failure window Finds duplicate/lost-work gaps. Provider charge succeeds, app crashes before …

  • Code Smells & Refactoring

    … long function, large class, duplication, feature envy, primitive obsession, switch statements. - Tiny steps, run tests, commit, repeat.

  • Two Pointers & Sliding Window

    … remove duplicates in place (fast & slow) js // [1, 1, 2, 2, 2, 3] → first 3 slots become [1 …

  • REST API Design

    … 404 Not Found] F -- yes C{Conflict?<br/ duplicate / stale version} C -- yes E409[409 Conflict] C -- no …

  • Normalization & Denormalization

    … It is not an accidental duplicate of current catalog price: it represents a different business fact. Third Normal …

  • What Are Design Patterns?

    … 2. Recognise the pain. A growing switch , duplicated creation logic, tight coupling… 3. Then reach for the pattern …

  • Hash Maps & Sets

    … 1: "Have I seen it before?" → Set Contains duplicate? js function hasDuplicate(nums) { const seen = new Set(); for …

  • Clean Architecture

    … No database, no network, milliseconds per test. js test("rejects duplicate emails", async () = { const userRepository = new InMemoryUserRepository([{ id …

  • React Fundamentals

    … minimal. Derive everything you can during render. jsx // ❌ Duplicated state that can get out of sync const [items …

  • Recursion & Backtracking

    … Sudoku guess the moment a row has a duplicate. Good pruning is the difference between milliseconds and hours …

  • Database Indexing & Transactions

    … users email ON users (email); -- UNIQUE also prevents duplicates CREATE UNIQUE INDEX idx users email unique ON users …

  • Choosing an Architecture

    … to bottom Feature-heavy apps, CQRS, fast iteration Duplication without a shared domain System shape Style Core idea …

  • Vertical Slice Architecture & the Modular Monolith

    … cases; parallel work causes fewer conflicts. ❌ Risk of duplicated logic between slices (refactor shared rules into the domain …

  • Data in Microservices: Sagas & the Outbox Pattern

    … a duplicate fails here UPDATE stock SET reserved = reserved + 1 WHERE sku = 'KB-1'; COMMIT; Outbox on the …

  • Domain-Driven Design: Strategic Design

    … JSON Schemas, Avro events Separate Ways No integration at all; duplicate if needed Integration costs more than it …

  • Domain-Driven Design: Tactical Patterns

    … a bag of data; the rules live somewhere else (and get duplicated) class Order { status!: string; lines!: OrderLine …