Every lesson, on one page
All 364 CodeSparring lessons, grouped by course and level. Each one is free to read: the explanation, the worked example, and both exercise prompts are open to everyone. Sign in when you want to run your answer and have it graded.
Python
5 levels, 79 lessons
Level 1: Foundations
Reference-style basics: variables, types, loops, and functions.
First Steps
Data Types
Strings & Formatting
Collections
- Lists10 min
- Tuples & sets10 min
- Dictionaries10 min
Control Flow & Functions
- if / elif / else & logical operators10 min
- Small syntax that shows up everywhere: ternary, swap & match11 min
- for, while, range & break/continue11 min
- Looping like a Pythonista: enumerate, zip & items10 min
- Functions, parameters & defaults11 min
- Debugging: reading a traceback & stepping with breakpoint()13 min
- References, copies & the mutable-default trap11 min
- Choosing the right data structure10 min
- Recursion: a function that calls itself11 min
Level 2: Idioms
Comprehensions, generators, classes, dataclasses, decorators, and the standard-library idioms for dates, text, files, and APIs.
Comprehensions & Generators
Functions in Depth
OOP Foundations
Data Modeling
Errors, Files & Modules
Standard Library Toolkit
Talking to Services
Level 3: Patterns
The production-shaped syntax: modules, imports, and working across real files.
Project Structure & Packaging
Working across files
- Working across files18 min
Type Hints & Static Typing
Testing with pytest
Files, Data & Robustness
Real Programs & Tooling
Optional: the data track (numpy & pandas)
Level 4: Engineering
Advanced OOP, decorators, concurrency, async, profiling, and packaging.
Advanced OOP & Design Patterns
Decorators & Metaprogramming
Concurrency & Async
Performance & Production Practices
Quality, Packaging & Capstone
Level 5: Judging Code You Did Not Write
Read it, break it, test it, repair it. The review skills that decide what ships.
Read It Before You Run It
The Test Is the Verification
Debugging Code You Did Not Author
Calling a Model Like Any Other Unreliable Dependency
SQL
6 levels, 77 lessons
Level 1: SQL Foundations (Reading Source Data)
SELECT, WHERE, ORDER BY, types: querying raw source tables the way a DE does on day one.
Module 1.1: Projecting Columns from a Source Table
Module 1.2: Filtering Rows
Module 1.3: Shaping the Result Set
- Sorting with ORDER BY11 min
- LIMIT and DISTINCT11 min
Module 1.4: Types, Casting, Strings, and Dates
Level 2: Aggregation & Joins (Combining Source Data)
Aggregates, GROUP BY/HAVING, every join flavor, subqueries, CTEs: building metrics.
Module 2.1: Aggregation and Grouping
- Aggregate Functions20 min
- GROUP BY30 min
- HAVING: Filtering Groups25 min
Module 2.2: Joining Tables
Module 2.3: Set Operations and Subqueries
Module 2.4: Readability and Conditional Logic
Level 3: Data Modeling & Schema Design
DDL, keys, constraints, and normalization: designing schemas the database enforces.
Module 3.1: DDL, Types, and Loading Data
Module 3.2: Keys and Constraints
Module 3.3: Normalization
Module 3.4: ER Modeling, Relationships, and Indexes
Module 3.5: Dimensional Modeling Introduction
Level 4: Data Engineering with SQL
Window functions, recursive CTEs, SCD, idempotent merge, data-quality: warehouse transforms.
Module 4.1: Analytical SQL (Window Functions)
Module 4.2: Recursive CTEs
Module 4.3: Warehouse Modeling and History
Module 4.3b: Dimensional Modeling in Depth
Module 4.4: Pipeline Correctness
- Deduplication20 min
- Idempotent Loads: Upsert & MERGE26 min
Module 4.5: Quality, Performance, and Capstone
Level 5: Advanced & Company-Specific SQL for DE Interviews
Rehearse the four rounds of a Data Engineering loop as graded SQL: the power screen, the modeling round, the pipeline round, and the system-design round.
Module 5.1: The Advanced SQL Power Round
Module 5.2: The Warehouse and Modeling Round
Module 5.3: The Streaming and Pipeline Round
Module 5.4: The DE System Design Round
Level 6: Cloud & Data Engineering Foundations
Learn the platform your SQL runs on: object storage, columnar files, partitioning, and distributed pipelines, the way a DE interview asks about them. It is beginner-friendly and can be started right after Level 2, since its graded queries lean on GROUP BY and joins.
Module 6.1: The Cloud Data Platform
Module 6.2: File Formats and Why Columnar Wins
Module 6.3: Partitioning a Large Table
Module 6.4: Distributed Processing & Pipelines
System Design
12 levels, 208 lessons
Level 0: Interview & Communication Method
Run a system-design round like a senior: scope, estimate, structure the walkthrough, and drive tradeoffs.
Requirements & Scoping
Back-of-the-Envelope Estimation
The Structured Walkthrough
Driving the Conversation & Tradeoffs
Level 1: Foundations & Mental Models
The networking, API-contract, and performance fundamentals every later design assumes.
Networking & the Request Lifecycle
API Design & Contracts
- REST vs gRPC vs GraphQL30 min
- Contract & Schema-First Design25 min
- Versioning & Backward Compatibility25 min
- Idempotency & Safe Retries30 min
- Pagination & Error Modeling30 min
- Real-Time Delivery: Short-Poll, Long-Poll, SSE, WebSocket & Webhooks30 min
- HTTP Semantics: Methods, Status Codes & Caching Headers30 min
- Serialization, Content Negotiation & Compression30 min
Edge, Proxies & Caching Foundations
Performance & Resilience Fundamentals
Level 2: Data Storage & Modeling
Relational vs NoSQL, storage engines, indexing, and modeling for access patterns.
Relational & Transactions
Storage Engines & Indexing
NoSQL Families
- Key-Value Stores25 min
- Document Databases25 min
- Wide-Column / Column-Family Stores30 min
- Graph Databases25 min
- Time-Series Databases30 min
- Vector Databases & Embeddings30 min
Data Modeling
Blob Storage & Choosing a Store
Level 3: Scaling the Data Tier
Replication, sharding, caching, CDN/search, and keeping derived data in sync at scale.
Replication
Partitioning & Sharding
Caching at Scale
CDN, Search & Geo
Derived Data & Sync
Level 4: Scaling Compute & Traffic
Stateless scale-out, load balancing, gateways, rate limiting, autoscaling, and overload protection.
Horizontal Scaling & Load Balancing
Global Traffic & Gateway
Rate Limiting & Overload
Autoscaling & Isolation
Level 5: Distributed Systems Core
CAP/PACELC, consistency, clocks, consensus, distributed transactions, and failure handling.
Failure Models & CAP
Consistency & Time
Consensus & Coordination
Distributed Transactions
Membership & Failure Handling
Level 6: Asynchronous & Event-Driven Systems
Messaging models, Kafka and the log, delivery guarantees, stream processing, and schema governance.
Messaging Foundations
Kafka & the Log
Delivery Guarantees
Stream Processing & Event Patterns
Schema Governance & Ops
Level 7: Reliability, Resilience & Operations
SLOs and error budgets, observability, resilience patterns, redundancy and multi-region DR, and safe deploys and chaos.
SLOs & Error Budgets
Observability
Resilience Patterns
Redundancy, DR & Multi-Region
Level 8: Security, Privacy & Multi-tenancy
Authentication and identity, authorization and tenancy, encryption and secrets, abuse and perimeter defense, and privacy, compliance, and audit.
Authentication & Identity
Authorization & Tenancy
Encryption & Secrets
Abuse & Perimeter Defense
Privacy, Compliance & Audit
Level 9: Modern Architecture & Delivery
Service architecture, containers and orchestration, serverless and edge, delivery and FinOps, and data-intensive analytics.
Service Architecture
Containers & Orchestration
Serverless & Edge
Delivery & FinOps
Data-Intensive & Analytics
Level 10: Applied Case Studies
The full-length 'design X' interviews: foundational building blocks, social and feed, geo and media, storage and infra systems, and commerce, money, and analytics.
Foundational Building Blocks
Social, Feed & Messaging
Geo, Media & Collaboration
Storage & Infrastructure Systems
- Design a Distributed Cache (Redis-like)40 min
- Design a Key-Value Store (DynamoDB/Cassandra)40 min
- Design an Object Store (Amazon S3)40 min
- Design a Message Queue / Streaming Log (Kafka)40 min
- Design a Distributed Job Scheduler / Cron40 min
- Design a Distributed Lock / Coordination Service (ZooKeeper/etcd)40 min
- Design a Code Execution Sandbox / Online Judge40 min
- Design a Reliable Webhook Delivery System40 min
Commerce, Money & Analytics
- Design a Payment System & Ledger40 min
- Design E-Commerce Inventory / Flash Sale (Ticketmaster)40 min
- Design a Web Crawler40 min
- Design a Metrics & Monitoring System (Prometheus/Datadog)40 min
- Design an Ad Click Aggregator / Real-Time Analytics40 min
- Design a Leaderboard / Top-K / Distributed Counter40 min
- Design a Stock Exchange / Order-Matching Engine45 min
Level 11: Specialized & Frontier Systems
The frontier: ML systems, LLM and GenAI infrastructure, real-time analytics and globally consistent data, and IoT, edge, and time-series.