Search
Lessons (40)
- The Hot SKU Alert Problem
… Good for volatile pricing, with added notification delay. - Threshold-based: alert only when the price crosses a user …
- Python Fundamentals
… str price: float tags: list[str] = field(default factory=list) safe mutable default @property def price with tax …
- Normalization & Denormalization
… Asha email repeats, Keyboard price repeats, and an order has several products. If the keyboard is renamed, every …
- Frontend Testing Strategy
… 2 }, { price: 5, qty: 1 }])).toBe(25); }); it("applies a discount", () = { expect(cartTotal([{ price: 100, qty: 1 }], 0 …
- Caching, Consistent Hashing and Sharding
… Its price changes during the rush. What must be true Reduce read cost while defining how quickly price …
- Cost Optimization and the Well-Architected Framework
Measure spend, pick the right pricing model, remove waste, and review architectures against the six Well-Architected pillars …
- React Fundamentals
… cart, products"] -- products, onAdd PL[ProductList] PL -- name, price, onAdd PC1[ProductCard] PL -- name, price, onAdd PC2[ProductCard …
- Comments & Formatting
… A sign that says "Sharp bend ahead, icy in winter" is priceless. A sign every 10 metres that …
- SQL vs NoSQL Databases
… 1, priceCents: 4999 }, { productId: 9, name: "Mouse", qty: 2, priceCents: 1999 } ], totalCents: 8997, createdAt: ISODate("2026-09-28T10 …
- TypeScript Essentials
… They're erased from the output, so TypeScript adds zero runtime cost. ts function total(price: number, quantity …
- Domain-Driven Design: Strategic Design
… Stripe<br/ (upstream)"] -- Conformist Billing Ordering <-- Partnership Pricing["🏷️ Pricing"] Anti-corruption layer in code ts // Legacy ERP …
- Storage, Search and Location Queries
… Search may be briefly stale; the checkout path should always verify price and availability against the authoritative data …
- Domain-Driven Design: Tactical Patterns
… Quote { const lines = cart.items.map((item) = QuoteLine.from(item, this.pricing.priceFor(item, customer))); return Quote.create …
- O — Open/Closed Principle
… new rules never touch this class class PriceCalculator { constructor(private rules: DiscountRule[]) {} total(cart: Cart): number { const best …
- What Is Clean Code?
… 3. The steps read like a sentence: filter the items in stock, then add up price × quantity . The …
- Vertical Slice Architecture & the Modular Monolith
… update price"] direction TB c1[endpoint] -- c2[handler] -- c3[(db)] end This fits naturally with CQRS : queries read …
- Code Smells & Refactoring
… which currency? cents or dollars? rounding? function addTax(price) { return price 1.2; } // ✅ A small object that knows …
- Finding Service Boundaries with DDD
… Ordering stores the product ID, name and price at the time of ordering , not the full catalogue entry …
- Resilience Patterns
… Reviews "Reviews are temporarily unavailable" Personalised prices Show the standard price Search A simple database LIKE query Payments …
- React Hooks in Practice
… sortedProducts = useMemo( () = products.toSorted((a, b) = a.price - b.price), [products], ); // Remember a function identity (useful when passing …
- Serverless: Lambda and API Gateway
… 2500}, "43": {"id": "43", "title": "Python Basics", "price cents": 1800}, } def reply(status, payload): return { "statusCode": status, "headers …
- C4 Architecture Diagrams: Context, Container, Component and Code
… CheckoutItem[]) PricedItem[] } class PaymentGateway { <<interface +charge(amount: Money, token: string) PaymentResult } class StripePaymentGateway { +charge(amount: Money, token: string …
- EC2, Storage and Auto Scaling
… Word Meaning --- --- Instance type CPU, memory, network, and price shape of a server AMI Starting machine image for …
- Proxies, APIs and Real-Time Protocols
… needs order creation, live driver positions and internal price calculation. These interactions have different latency and delivery needs …
- Rust: Ownership, Borrowing and Lifetimes
… f64 = 9.99; // explicit type println!("{name} {count} {price:.2}"); } Rule 1: every value has one owner rust …
- Machine Learning Fundamentals
… Estimating a home's sale price is regression. Train, validate, test The training set fits model parameters. The …
- Which Pattern Do I Need?
… 🗺️ Strategy — pluggable algorithms (payments, pricing, auth) 7. 🚦 State — order and payment workflows 8. 📞 Chain of Responsibility — request …
- Small Functions That Do One Thing
… for (const item of cart.items) total += item.price item.qty; // low-level detail chargeCard(cart.user, total …
- How a Web Request Works
… 42, "name": "Keyboard", "price": 49.99 } HTTP methods Method Meaning Safe? Idempotent? --- --- --- --- GET Read ✅ ✅ POST Create / action ❌ ❌ PUT …
- Two Pointers & Sliding Window
… searching a sorted bookshelf for two books whose prices add up to $50: one starts at the cheap …
- Layered (N-Tier) Architecture
… const total = items.reduce((sum, i) = sum + i.priceCents i.qty, 0); return this.repo.save({ customerId, items …
- VPC Endpoints, Transit Gateway and Hybrid Networking
… Compare the costs of the architecture using current regional prices rather than assuming every private path is cheaper …
- REST API Design
… http GET /products?category=keyboards&minPrice=20&sort=-price&limit=20&cursor=eyJpZCI6MTAwfQ Style Request Pros Cons --- --- --- --- Offset …
- Serverless Architecture
… Functions as a Service, event triggers, cold starts, pay-per-use pricing, managed backends, and the patterns and …
- Atomic Design & Component Libraries
… layout) ├── ProductGallery (organism) │ └── Image, IconButton (atoms) └── PurchasePanel (organism) ├── Price (atom) ├── QuantityPicker (molecule) └── Button (atom) Start with tokens, not …
- Frontend Security
… Hidden form fields, disabled buttons, client-side validation, prices in JavaScript, "isAdmin" flags: all of it can be …
- Sorting Algorithms
… toSorted() (ES2023) const sorted = prices.toSorted((a, b) = a - b); Counting sort: beating n log n Comparison sorts …
- Choosing an Architecture
… vertical slices (mostly CRUD)"] c1[search slice] c2[update price slice] end Ord -.- OrderPlaced, in-process event Bill …
- Next.js Rendering: CSR, SSR, SSG, ISR & Server Components
… p) = ( <li key={p.id} {p.name}: ${p.price} <AddToCartButton productId={p.id} / </li ))} </ul ); } tsx // app/products …
- Domains, Load Balancers and HTTPS
… Check current pricing for the certificate type and features you select. For a CloudFront distribution, request the certificate …