Search
Lessons (40)
- Clean Error Handling
Fail loudly, fail early, and never swallow errors. Learn how to handle errors so bugs are easy to …
- Go Web Services with Gin
… errors │ ├── service.go business rules (no Gin imports!) │ ├── repository.go interface + Postgres implementation │ └── handler.go Gin handlers: HTTP …
- Event-Driven Architecture
… compensate I ✅ The flow and error handling are in one place. ❌ The mediator is extra coupling and a …
- Serverless: Lambda and API Gateway
… Check other created resources separately. Practice: the handler passes a console test but API Gateway returns an error …
- Node.js and Express
… routing, the middleware pipeline, validation, async error handling, project structure, configuration, security, rate limiting, logging and graceful shutdown …
- Event-Driven Patterns, Step Functions and Reliable Lambdas
… See [Step Functions error handling](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html …
- Behavioral Patterns II: Chain, Template, Iterator, Mediator, Memento, Visitor
… Each handler either handles the request or passes it on. js // Express middleware IS a chain of responsibility …
- NestJS Core Concepts
… middleware → guards → interceptors → pipes → handler → interceptors → filters on error. - Use a global ValidationPipe with DTOs, guards for auth …
- AI Evaluation, Safety, and Security
Build representative tests, measure retrieval and model quality, defend against prompt injection, and handle sensitive data responsibly. The …
- React Hooks in Practice
… the new one renders useActionState Handle form actions: pending state, result, errors useOptimistic Show the expected result instantly …
- Frontend Testing Strategy
… Your components, hooks and data libraries run for real; only the server is fake. ts // mocks/handlers.ts …
- Rust: Types, Errors and Concurrency
… when --- --- ? Propagate the error to the caller (most of the time) match / if let Handle each case differently …
- Backend Languages: Node.js, Go, Python & Rust
… Docker and Kubernetes are written in Go) Verbose error handling, a smaller ecosystem than JS/Python Python async …
- Behavioral Patterns I: Observer, Strategy, Command, State
… transition(order, action) { const handler = orderStates[order.status][action]; if (!handler) throw new Error( Cannot ${action} an order …
- Scalable Frontend Architecture
… not each invent fetch calls, base URLs and error handling. Put transport and response conversion behind a feature …
- Consumers & Consumer Groups
… how offsets are committed, and how to handle lag, errors and retries. The big idea A pile of …
- Async JavaScript: Promises, async/await and Node's Event Loop
… running work in parallel, handling errors, timeouts and cancellation with AbortController, and how Node.js orders nextTick, microtasks …
- AWS Databases: Choose the Right One
… managed SQL database RDS runs engines such as PostgreSQL and MySQL while AWS handles hardware, backups, and many …
- Delivery Guarantees: At-Most, At-Least & Exactly Once
… catch (error) { await tx.abort(); // nothing written, offset not committed → the message will be retried throw error; } }, }); Consumers …
- Atomic Design & Component Libraries
… Prefer the browser's native element before recreating it with div plus click handlers. tsx type IconButtonProps = { label …
- Database Indexing & Transactions
… call or user input inside one. - Always handle rollback on errors (most ORMs do this for you). - Lock …
- Edge, Platform & Frontend Delivery
… Monitor error rate, Web Vitals and server latency after release. 5. Roll back to the previous known-good …
- Prompting and Structured Outputs
… library or provider-supported schema enforcement, handle refusal and parsing errors, and do not cast untrusted output into …
- Concurrency, Resilience & Distributed Workflows
… Idempotency is required for retryable HTTP requests, queue consumers, scheduled jobs and webhook handlers. Retries, exponential backoff and …
- JavaScript Language Fundamentals
… objects and prototypes, classes, modules, array methods and error handling. The big idea JavaScript has only a few …
- Domains, Load Balancers and HTTPS
… http.server import BaseHTTPRequestHandler, HTTPServer import json class Handler(BaseHTTPRequestHandler): def do GET(self): if self.path == "/health …
- Testing, Preconditions, and Policy Checks
Use validation, lifecycle conditions, Terraform tests, and policy checks to catch different classes of errors. Different checks answer …
- React Internals & Concurrent Rendering
… Rendering may happen more than once; network calls and other side effects belong in event handlers, effects, or …
- AWS: Start Here
… With a managed database, AWS handles more infrastructure work, but you still choose network access, credentials, backup settings …
- Go Concurrency: Goroutines, Channels and Context
… messages: handle(msg) case err := <-errs: return err case <-time.After(2 time.Second): return errors.New("timeout …
- CI/CD and Reviewed Production Changes
… 1 means an error, and 2 means changes exist. Configure the scheduler to handle 2 as a drift …
- Scaling, Load Balancing & Rate Limiting
… It gives clients one stable address while it decides which healthy backend should handle each connection or request …
- Premiere-Night Video Streaming
… img/system-design-l6/premiere-streaming.svg) Plane Handles Goal --- --- --- Control Auth, entitlement, manifest, progress Small, stateless, scalable …
- Go Fundamentals
… with value or pointer receivers, implicit interfaces, explicit error handling with wrapping, defer/panic/recover, and generics. The …
- Timeouts, Retries & Backpressure
… latency, retries, and error-budget burn. A concrete overload plan Imagine image processing can handle 100 jobs at …
- Message Delivery: Queues, Kafka, Ordering and DLQs
… Bound retries and quarantine poison events with original payload, error and metadata. Define who repairs and replays them …
- YAGNI: You Aren't Gonna Need It
… Clear names and structure Generic BaseAbstractManager<T classes Error handling and security Caching layer before measuring slowness Code …
- KISS: Keep It Simple, Stupid
… Too simple. KISS doesn't mean skipping validation, error handling or tests. Key takeaways - The simplest solution that …
- Python and Math Foundations with Runnable Examples
… In production, handle zero denominators explicitly and report results for relevant classes and groups. What math should you …
- Backend Design Scenarios
… Route only replica-safe reads and handle replication lag. 4. Shard when the primary cannot handle the write …