Search
Lessons (40)
- React vs Vue vs Angular
The same counter in three frameworks, a side-by-side comparison of reactivity, templates, state and tooling, and …
- Count, for_each, Functions, and Stable Identities
… Use a moved block when you intend to preserve the original object under a new address. count remains …
- JavaScript Essentials: Event Loop, Closures & this
… a separate backpack mermaid flowchart LR MC["makeCounter() runs<br/ creates count = 0"] -- F["returns increment()"] F -- BP …
- Hash Maps & Sets
… string/symbol keys only; fine for simple records const counts = {}; counts["a"] = (counts["a"] ?? 0) + 1; 💡 Prefer Map …
- Sorting Algorithms
… toSorted() (ES2023) const sorted = prices.toSorted((a, b) = a - b); Counting sort: beating n log n Comparison sorts …
- KISS: Keep It Simple, Stupid
… Simplify conditions js // ❌ function getShippingCost(country) { if (country === "US") { return 5; } else if (country === "CA") { return 8; } else …
- SQL Language, Identifiers & Data Types
… A sequence is a reusable database counter. UUIDs can be generated without a central counter and help distributed …
- React Fundamentals
… Counter() runs again with count = 1 C-- R: new JSX R- R: diff old vs new R- D …
- Database Indexing & Transactions
… by country, then city, then age. sql CREATE INDEX idx people location ON people (country, city, age); Query …
- Arrays & Strings
… count[ch] = (count[ch] ?? 0) + 1; for (const ch of b) { if (!count[ch]) return false; count[ch …
- Data Structures for Scale
… Measure memory, query latency, false-positive rate and count error; “smaller” is useful only if the error contract …
- SQL Interview Query Drills
… Find repeated rows SELECT name, section, COUNT( ) AS copies FROM students GROUP BY name, section HAVING COUNT( ) 1 …
- 10,000 Users Do Not Need 10,000 Database Connections
… Tune from database saturation and query behavior, not user count alone. Walk through a failure and recovery A …
- CloudWatch: Know What Your App Is Doing
… To count failures by operation: text fields operation, status code filter status code = 500 stats count() as failures …
- Rust: Types, Errors and Concurrency
… Vec< = (0..8) .map( { let counter = Arc::clone(&counter); thread::spawn(move { counter.lock().unwrap() += 1; }) }) .collect(); for …
- REST vs GraphQL vs gRPC
… GET /users/42/followers/count API-- App: count Note over App: 3 round trips on a slow 4G …
- Trees & Binary Search Trees
… empty tree return 1 + Math.max(height(node.left), height(node.right)); // combine } // Count nodes const count = (node …
- Recursion & Backtracking
… countdown js function countdown(n) { if (n === 0) { // base case console.log("🚀 Liftoff!"); return; } console.log(n); countdown …
- GitOps, Progressive Delivery and Observability
… queue length, Kafka lag, cron, with scale to zero Cluster Autoscaler / Karpenter Node count; Karpenter picks the cheapest …
- Python and Math Foundations with Runnable Examples
… These hand-written vectors demonstrate the calculation without pretending to provide semantic understanding. Count classification mistakes Suppose a …
- Creational Patterns: How to Make Objects
… Builder 🍔 Analogy: At a burger counter you build your order step by step: bun → patty → cheese → no onions …
- Hexagonal Architecture (Ports & Adapters)
… Promise<void ; countActiveFor(memberId: string): Promise<number ; } export interface Notifier { loanConfirmed(memberId: string, loan: Loan): Promise<void ; } export …
- AWS Data Pipelines in Plain Language
… Record input version, transformation version, output location, and row counts. Re-running a job for the same input …
- Batch vs Stream and Data Modeling
… Measure stream freshness, late-event count and reconciliation differences; streaming speed is useful only when outputs are correct …
- Capacity, Availability, Latency and CAP
… Payments/inventory normally reject uncertain writes; feeds/counters can serve a stale value. CAP is about partitions, not …
- Go Concurrency: Goroutines, Channels and Context
… each iteration has its own url }() } wg.Wait() // block until the counter reaches zero ⚠️ Before Go 1.22 …
- Deploying & Operating Microservices
… user.id, country: user.country })) { return renderNewCheckout(); } return renderOldCheckout(); mermaid flowchart LR D["🚀 Deploy<br/ (code is in …
- Python Fundamentals
… start = time.perf counter() try: return fn( args, kwargs) finally: print(f"{fn. name } took {time.perf counter …
- Go Fundamentals
… total } counter := func() func() int { // closure n := 0 return func() int { n++; return n } }() counter(); counter() // 1, 2 …
- Resilient Service Calls: Retries, Breakers and Load Shedding
… Measure attempts per original request, queue age, successful throughput and unrelated-endpoint latency; a low downstream call count …
- Concurrency, Resilience & Distributed Workflows
… available 0 RETURNING available; If the returned row count is zero, the reservation failed. For more involved work …
- Capacity Planning, SLOs and Error Budgets
… responses, so latency looks good while checkout fails. Count success and latency together, and compare budget consumption to …
- Rust: Ownership, Borrowing and Lifetimes
… f64 = 9.99; // explicit type println!("{name} {count} {price:.2}"); } Rule 1: every value has one owner rust …
- Production Capstone and Interview Practice
… Ephemeral and supported write-only mechanisms address persistence. When use for each instead of count? When stable named …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… No separate cluster needed; it runs inside your service. java // Count orders per customer in 1-minute windows …
- Caching & Redis
… Its data types solve many real problems: Type Commands Use case --- --- --- String SET , GET , INCR , EXPIRE Cache, counters …
- Graphs: BFS & DFS
… Each cell is a node; its neighbours are up, down, left and right. Number of islands: count groups …
- TypeScript Essentials
… you rarely need to write the type let count = 5; // inferred as number count = "five"; // ❌ error Type Meaning …
- Microkernel (Plugin) Architecture
… Claims or tax engine One plug-in per country or state's rules The parts mermaid flowchart TB …
- Scaling, Load Balancing & Rate Limiting
… window Count per minute (resets at :00) Simple; allows 2× bursts at window edges Sliding window Count over …