Search
Lessons (26)
- N+1 Queries, Loading & Pagination
… It can turn a 50-row page into 50 times 20 times 10 joined rows. Ask which fields …
- Indexes, EXPLAIN & Query Plans
Design indexes from real filter, join and sort patterns, then prove improvements with query plans and production-like …
- SQL vs NoSQL Databases
… no JOIN needed to read it { id: ObjectId("…"), customer: { id: 17, name: "Ana", email: "ana@mail.com" }, items …
- Batch vs Stream and Data Modeling
… Normalized tables Integrity and flexible writes Reads may join Denormalized read model Measured read path is costly Duplicates …
- Database Relations & Foreign Keys
… use a join table, never a comma-separated list An enrollment is a relationship with its own facts …
- Arrays & Strings
… Collect parts in an array and join("") at the end. js // ✅ Efficient string building const parts = []; for (const …
- Views, Triggers & Stored Procedures
… It can simplify joins, expose a secure subset, and give clients a stable interface. A materialized view stores …
- S — Single Responsibility Principle
… then(setUser); }, [id]); if (!user) return <Spinner / ; const joined = new Date(user.createdAt).toLocaleDateString("en-GB", { year: "numeric …
- Replication, Partitioning & Sharding
… Cross-shard joins and transactions are expensive. Prefer colocating related data, asynchronous aggregates and explicit workflows. Do not …
- CQRS & Event Sourcing
… 10–1000× more Shape Normalised, enforces rules Denormalised, joined, pre-computed Storage Postgres (transactions) Elasticsearch (search), Redis (fast …
- YAGNI: You Aren't Gonna Need It
… escapeCsv(o.customer)},${o.total} ); return [header, ...rows].join("\n"); } If PDF export is requested next quarter, you …
- Stacks & Queues
… Queue Operation Meaning Cost (proper queue) --- --- --- enqueue(x) join the back O(1) dequeue() leave the front O …
- Small Functions That Do One Thing
… user.email, subject: "Welcome!", html: <h1 Hi ${user.email}</h1 <p Thanks for joining.</p , }); return user; } After …
- Hash Maps & Sets
… const word of words) { const key = [...word].sort().join(""); // "eat" → "aet" if (!groups.has(key)) groups.set(key …
- Deployments, ReplicaSets & Rollouts
… log collectors, monitoring agents, CNI Adds a pod when a node joins Job Run to completion once: migrations …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… filtering, mapping, joining streams, windowed aggregations, with exactly-once support. No separate cluster needed; it runs inside your …
- Consumers & Consumer Groups
… Understand it before relying on it. Rebalancing When a consumer joins , leaves or crashes , the group rebalances : partitions …
- Creational Patterns: How to Make Objects
… both come from the same factory return [uiFactory.createInput(), uiFactory.createButton()].map((c) = c.render()).join(""); } buildLoginForm(prefersDark …
- Scaling & Health Probes
… rescues them ( liveness → restart). - "Are you ready to join the relay race?" A swimmer catching their breath sits …
- Finding Service Boundaries with DDD
… for example, event schemas) Shared kernel A small, jointly owned shared model (use sparingly) mermaid flowchart LR Legacy …
- Scaling, Load Balancing & Rate Limiting
… all celebrities on one) Cross-shard queries and JOINs Must query every shard and combine the results Re …
- Database Indexing & Transactions
… keys (automatic), foreign keys, columns in frequent WHERE , JOIN and ORDER BY clauses. Queries that can't use …
- Normalization & Denormalization
… A query cannot safely join, constrain, index, or update one item inside that string. Good 1NF shape: one …
- Data in Microservices: Sagas & the Outbox Pattern
… Options: Approach How Trade-off --- --- --- API composition A BFF/gateway calls each service and joins in memory Simple …
- Behavioral Patterns II: Chain, Template, Iterator, Mediator, Memento, Visitor
… mediator between users class ChatRoom { members = new Map(); join(user) { this. members.set(user.name, user); user.room …
- Domain-Driven Design: Strategic Design
… Two teams succeed or fail together; they plan jointly Tightly linked features, good collaboration Shared kernel A small …