Search

Lessons (19)

  • Comments & Formatting

    … Plus the formatting habits that make code easy to scan. The big idea Think of comments as road …

  • S — Single Responsibility Principle

    … user, isLoading } = useUser(id); if (isLoading) return <Spinner / ; return <div <h2 {user.name}</h2 <p Member since {formatMemberSince …

  • Clean Architecture in Depth

    … convert data between formats APIs, UI or storage formats change Use cases (and their ports) 🟣 Frameworks & drivers …

  • API Contracts, Gateways and Security

    Make APIs evolvable and safe with explicit formats, versioning, idempotency, gateway policy, authentication and authorization. ![API boundary: a …

  • YAGNI: You Aren't Gonna Need It

    … nobody asked for PDF, XML, plugins or custom delimiters class ExportEngine { constructor({ format = "csv", delimiter = ",", encoding = "utf-8 …

  • Code Smells & Refactoring

    … this.currency }).format(this.cents / 100); } } Switch statements → Polymorphism js // ❌ This switch is repeated in area(), perimeter(), draw …

  • Kafka Producers

    … But producers and consumers must agree on it. Format Pros Cons --- --- --- JSON Human-readable, easy Larger, no enforced …

  • REST API Design

    … Consistent error format Pick one error shape and use it everywhere. [RFC 9457 "Problem Details"](https://www.rfc …

  • Small Functions That Do One Thing

    … validateEmail() "checks that an email has a valid format" → one thing. ✅ Before: one function doing everything js async …

  • How a Web Request Works

    … You write the letter in a format everyone understands → HTTP . 5. Someone at the destination reads it and …

  • REST vs GraphQL vs gRPC

    … verbs Query language, one endpoint Remote procedure calls Format JSON (text) JSON (text) Protobuf (binary) Transport HTTP/1 …

  • TypeScript Essentials

    … typo caught! Narrowing: TypeScript tracks what a value can be after each check. ts function format(value: string …

  • MVC, MVP & MVVM

    … views/products/show.ejs -- <h1 <%= product.name % </h1 <p <%= product.formattedPrice() % </p ⚠️ Fat controller, anaemic model: a common …

  • Finding Service Boundaries with DDD

    … or legacy model Published language A shared, documented format (for example, event schemas) Shared kernel A small, jointly …

  • CQRS & Event Sourcing

    … events, upcasters (convert old events to the new format on read) Querying is hard ("all accounts over $1 …

  • Event-Driven Architecture

    … Standard envelope e.g. CloudEvents , a CNCF standard format The hard parts (be honest) Challenge Mitigation --- --- Eventual consistency …

  • Frontend Performance & Core Web Vitals

    … Optimise images (usually the LCP element) html <!-- ✅ Modern format, right size, loaded with high priority -- <img src="/hero …

  • Frontend Testing Strategy

    … Unit tests: pure logic Best for pure functions: formatters, calculations, validation, reducers. ts // cart.ts export function cartTotal …

  • Domain-Driven Design: Strategic Design

    … everyone Many consumers Published Language A documented shared format (schemas, events) Paired with OHS: e.g. JSON Schemas …