Search

Lessons (40)

  • Interfaces vs Abstract Classes

    An interface is a contract with no code; an abstract class is a half-built parent with shared …

  • Classes and Objects

    A class is a blueprint and an object is a thing built from it. Learn constructors, properties, methods …

  • Composition over Inheritance

    Build objects from small, swappable parts instead of deep class trees. Learn the "has-a" test, why inheritance …

  • OOP Mistakes and Interview Questions

    The most common OOP mistakes (god classes, anemic models, deep hierarchies, getters for everything) and clear answers to …

  • S — Single Responsibility Principle

    A class or module should have only one reason to change. Learn to find the hidden responsibilities in …

  • Object Relationships: Association, Aggregation and Composition

    … a UML class diagram mermaid classDiagram direction LR class University class Department class Professor class Student class Course …

  • L — Liskov Substitution Principle

    … Car"] -- T[🚗 Toyota ✅] D -- F[🚙 Ford ✅] D -- W["🚘 WeirdCar<br/ steers backwards ❌"] classDef bad fill: fecaca,stroke: ef4444 …

  • Polymorphism

    … number; } class Circle implements Shape { constructor(private radius: number) {} area() { return Math.PI this.radius 2; } } class Rectangle …

  • Inheritance

    Build a new class on top of an existing one to reuse its code. Learn extends, super, method …

  • Abstraction

    … Promise<void ; } Any class that promises to follow the contract can be used: ts class StripeGateway implements PaymentGateway …

  • SOLID at a Glance

    … add new exporters class ExcelExporter { export(report) {} } // without editing old ones class ReportService { constructor(repository, notifier) { // D: injected …

  • Creational Patterns: How to Make Objects

    … 10 }); js // anywhere.js import { pool } from "./db.js"; // always the same pool The classic class version: js …

  • What Is Object-Oriented Programming?

    … the data is protected by the object class BankAccount { balance = 0; // private: only code inside the class can …

  • Code Smells & Refactoring

    … return shape.side 2; } } // ✅ Each shape knows how to compute its own area class Circle { constructor(r) { this …

  • O — Open/Closed Principle

    … new rules never touch this class class PriceCalculator { constructor(private rules: DiscountRule[]) {} total(cart: Cart): number { const best …

  • I — Interface Segregation Principle

    … Document) { printer.print(report); // accepts BasicPrinter AND OfficeMachine } mermaid classDiagram class Printer { <<interface print() } class Scanner { <<interface scan …

  • Clean Error Handling

    … Custom error classes let them react precisely. js class AppError extends Error { constructor(message, statusCode) { super(message); this …

  • Finding Service Boundaries with DDD

    … If one giant Product class tries to serve everyone, every team edits it, it grows to 80 fields …

  • Month 1: Data, Math Intuition and Classic ML (Weeks 1-4)

    … 2. Tuesday: Handle class imbalance with class weights and threshold tuning. Plot the precision-recall curve. 3. Wednesday …

  • Layered (N-Tier) Architecture

    The classic way to organise an application into presentation, business and data layers. How it works, its rules …

  • Domain-Driven Design: Tactical Patterns

    … a static method like Order.start() , or a separate class. ts export class QuoteFactory { constructor(private pricing: PricingPolicy …

  • NestJS Core Concepts

    … true }), OrdersModule, UsersModule] }) export class AppModule {} mermaid flowchart TB App[AppModule] -- Orders[OrdersModule] & Users[UsersModule] & Config["ConfigModule (global …

  • Structural Patterns: How to Connect Objects

    … making incompatible pieces fit, adding features without editing classes, and hiding complexity behind simple fronts. --- 1. Adapter 🔌 Analogy …

  • Encapsulation

    … private data + public methods ts class BankAccount { balance = 0; // private history: string[] = []; // private deposit(amount: number) { if (amount …

  • Python Web APIs: FastAPI and Django

    … serializer class = TaskSerializer permission classes = [permissions.IsAuthenticated] def get queryset(self): return Task.objects.filter(owner=self.request …

  • C4 Architecture Diagrams: Context, Container, Component and Code

    … string) void } class CatalogService { +reservePricedItems(items: CheckoutItem[]) PricedItem[] } class PaymentGateway { <<interface +charge(amount: Money, token: string) PaymentResult } class …

  • Domain-Driven Design: Strategic Design

    … boolean }; // The ACL is an Adapter that keeps legacy concepts OUT of our model export class ErpCustomerTranslator { toBillingCustomer …

  • Behavioral Patterns II: Chain, Template, Iterator, Mediator, Memento, Visitor

    … anything with [Symbol.iterator] works with for…of , spread and destructuring. js class Playlist { constructor(songs) { this.songs …

  • 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 …

  • AI Specialties and Real-World Examples

    … classification is different from detection Image classification gives an image a label, such as “damaged.” Object detection finds …

  • JavaScript Language Fundamentals

    … values vs references, equality and coercion, let/const scope, functions, objects and prototypes, classes, modules, array methods and …

  • Clean Architecture in Depth

    … one class per user action The application's behaviour changes Entities + port interfaces 🔵 Interface adapters Controllers, presenters, gateways …

  • Onion Architecture & Clean vs Hexagonal vs Onion

    … they're the same core idea All three were created to fix the same problem with classic layered …

  • Clean Architecture

    … pure business rules js // domain/User.js — no imports from frameworks or databases export class User { constructor({ id …

  • From Software Architect to AI Architect: The 24-Week Plan

    … Data, Math Intuition and Classic ML](/learn/ai/month-1-data-math-and-classic-ml) 2. [Month 2 …

  • KISS: Keep It Simple, Stupid

    … class NotificationStrategyFactory { create(type) { return new (this.registry.get(type))(); } } class AbstractNotificationStrategy { send() { throw new Error("abstract"); } } class …

  • D — Dependency Inversion Principle

    … invert the dependency js // ✅ OrderService depends only on "shapes" it receives class OrderService { constructor({ orderRepository, mailer }) { this.orderRepository …

  • Docker & Containers

    … classDef cached fill: dcfce7,stroke: 22c55e,color: 14532d classDef changes fill: fef3c7,stroke: f59e0b,color: 78350f class L1 …

  • Comments & Formatting

    … classDef code fill: dbeafe,stroke: 3b82f6,color: 1e3a8a classDef cm fill: fef3c7,stroke: f59e0b,color: 78350f class C …

  • AI Architect Reference: Decisions, Glossary, Resources and Career

    … rules, SQL and classic ML often beat an LLM. - Learn one tool deeply per area, and use the …