Skip to content

About

Learning Computer Science Fundamentals With Theory Quiz Questions and Practical Mini Projects. One Step At Time 🐢

Topics

Resources

Contributing

Security policy

Stars

1.3k stars

Watchers

33 watching

Forks

Latest commit

 

History

310 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer Science Fundamentals

Computer science fundamentals you can answer, run and measure: a trilingual quiz covering 32 areas, and small runnable mini-projects that show each concept working, with tests, benchmarks and step-by-step explanations written for beginners.

CI License: MIT Conventional Commits SemVer

Table of contents

Introduction

Computer Science Fundamentals is a long-term, open source (MIT) study reference. It has two parts that point at each other:

  • A quiz. Multiple choice, 5 alternatives, in English, Portuguese and Spanish. After you answer, the explanation appears next to the question: the concept, why the right alternative is right, why each of the others is wrong, and a link to the mini-project that shows the idea running.
  • Mini-projects. Small programs that make one concept observable: a race condition that loses updates and four ways to fix it, a B-tree that reads 3 pages where a binary tree reads 16, a SQL injection and the query that stops it. Each one has tests, a demo or benchmark, and documentation in all three languages (English, Portuguese and Spanish). Everything runs in Docker, so the only requirement is Docker.

The live status of every area (questions written, blind review, mini-projects done) is generated from the repository itself: docs/en/README.md.

Work on this project started in October 2026, written with Claude Code (Claude Opus 5.5) and reviewed by its author. See How this project is built.

What you will learn

Each area has a quiz and, except for the two theory-only areas, a folder in projects/ with its mini-projects and study references.

Area What the mini-projects show
Big O and algorithm analysis measuring a function and naming its growth curve, the master theorem, why comparison sorts cannot beat n log n
Algorithms the same six sorts in seven languages, dynamic programming, where brute force stops, hybrid quicksort
Data structures a hash map from scratch, graph algorithms, a B-tree on disk, LRU cache, Bloom filter, trie, balanced trees
Operating systems CPU scheduling, paging and the TLB, memory allocators, deadlock detection, a mini shell
Networks reliable delivery over a lossy channel, a mini TCP, ALOHA and CSMA/CD, a DNS resolver, subnets
Databases (theory) a mini relational engine with three join algorithms, a normalisation tool
Transactions isolation levels and their anomalies, overselling under load, what an ORM costs, outbox and saga
Concurrency a counter race and four fixes, dining philosophers, ten thousand connections on three runtimes
Parallelism speed-up by cores and Amdahl's law
Security defensive, local-only labs: SQL injection, XSS and CSP, CSRF, access control, SSRF, passwords and sessions, JWT, uploads
Compilers a lexer and parser, a tree-walking interpreter, a bytecode VM, a regex engine
State machines an order life cycle driven by one transition table
Information theory entropy, Huffman and LZ77, CRC and Hamming codes
Digital logic gates, Karnaugh minimisation, adders, a NAND-only ALU and a 4-bit CPU
Object-oriented programming the same domain in OOP and functional style, a catalogue of code smells
Functional programming pure functions and property-based tests
Design patterns and SOLID back-end patterns where they pay off, SOLID before and after
Software architecture a clean architecture application and its dependency rule
Testing the full test pyramid, a TDD kata, mutation testing, flaky tests, a test framework from scratch
Protocols REST, GraphQL and JSON-RPC, HTTP/1.1 to HTTP/3, an HTTP server on raw TCP
Messaging queues compared, idempotency and dead letters, pub/sub and backpressure
Load balancing NGINX against Caddy, a hand-written layer 7 balancer
Performance Bun against Node, load test scenarios with k6, cache-friendly code
Cache caching strategies and the cache stampede
Rate limiting the four classic algorithms, in memory and on Redis
File systems records and indexes inside a file, external sorting
Observability traces, metrics and logs together, correlation ids, SLOs and alerts, flame graphs
Blockchain hashing, proof of work and a longest-chain rule
Continuous integration the pipeline of this repository, explained
Artificial intelligence and LLMs a tokenizer, a neural network from scratch, embeddings, a tiny language model, a diffusion toy
Electronics theory only: a 170-question quiz
Software engineering theory only: a 150-question quiz

Every area is finished: the 32 quizzes (3,384 questions, each one in the three languages, with a theory summary to read before answering) and the 86 mini-projects. The status page shows the numbers of each area, and PLAN.md has the full roadmap with the acceptance criteria that were checked.

Roadmap for beginners

You do not need to follow the areas in the order above. This order builds each step on the previous one. For every step: read the area page, answer the quiz at the basic level, run the first mini-project, then come back for the harder questions.

  1. How to think about cost. Big O, then Algorithms (start with the sorting race).
  2. How data is organised. Data structures: lists, stacks, queues, trees, hash tables, graphs.
  3. How a computer is built. Digital logic, then the Electronics quiz if you want the physical layer.
  4. What runs your program. Operating systems, then File systems.
  5. How computers talk. Networks, then Protocols.
  6. Where data lives. Databases, then Transactions.
  7. Doing many things at once. Concurrency, then Parallelism.
  8. Writing code that lasts. OOP, Functional programming, Design patterns and SOLID, Testing, Software architecture, and the Software engineering quiz.
  9. Keeping systems safe. Security.
  10. Running systems at scale. Cache, Rate limiting, Load balancing, Messaging, Performance, Observability, Continuous integration.
  11. How languages work. State machines, Information theory, Compilers.
  12. Modern topics. Artificial intelligence and LLMs, Blockchain.

Books, courses, papers and videos for every step are in REFERENCES.md.

Quick start

The only requirement is Docker.

Run the quiz:

./quiz/setup-unix-quiz.sh        # Linux and macOS
./quiz/setup-windows-quiz.ps1    # Windows

Then open http://localhost:3000.

Quiz demo

Light and dark theme:

Quiz home screen switching from the light to the dark theme and back

Reading the theory summary of an area:

Scrolling through the theory summary of the Big O area

Answering questions, with the explanation next to each one:

Answering quiz questions and reading the correct or incorrect feedback

Run a mini-project (each one brings its own setup scripts, which build pinned images and run the tests):

./projects/big-o/big-o-lab/setup-unix-big-o-lab.sh

Its README says what it teaches, how to run the demo, and which quiz topics it demonstrates.

To work on the repository itself you also need Bun 1.4.2:

bun install
bun run lint && bun run typecheck
bun test quiz/tests/unit tools
bun run quiz:validate

Tech stack

Layer Technology
Quiz app Next.js static site generation, Tailwind CSS v4, no back end
Content validation Zod
Languages of the mini-projects TypeScript (Bun), Python, Go, Rust, C++, Java, Elixir
Environment Docker and docker-compose, one pinned image per language
Databases and brokers PostgreSQL, SQLite, Redis, RabbitMQ, Kafka, LocalStack
Web servers and proxies ElysiaJS, Caddy, NGINX
Benchmarks and load tests hyperfine, k6, local targets only
Testing bun:test, Playwright, and the test runner of each language
Lint and format Biome, ruff, rustfmt and clippy, gofmt and golangci-lint, clang-format, mix format, Spotless
CI GitHub Actions

Docs

Document What it covers
docs/en/README.md live status of every area, with links to each mini-project
REFERENCES.md books, courses, papers, documentation and videos, by area
PLAN.md the roadmap, with checklists and acceptance criteria
docs/en/quiz.md design of the quiz
docs/en/quiz-authoring.md how questions are written and blind-reviewed
docs/en/environment.md pinned Docker images and formatters
docs/en/benchmarks.md the benchmark contract and runner
docs/en/decisions.md project decisions and their reasons
quiz/README.md the quiz app
CHANGELOG.md release history
SECURITY.md scope of the security labs and of the load tests
AGENTS.md onboarding for AI coding agents

Every document under docs/en/ has an equivalent under docs/pt/ and docs/es/.

Repository layout

/quiz/         the quiz app and its questions (quiz/content/<area>/<topic>.json)
/projects/     mini-projects, by area, each with tests, a demo and three READMEs
/benchmarks/   cross-language benchmark workloads and their dashboard
/docs/         documentation per area, in English (en/), Portuguese (pt/) and Spanish (es/)
/tools/        benchmark runner and mini-project generator
/docker/       one pinned base image per language
/.github/      continuous integration
/.claude/      rules and notes for AI coding agents

How this project is built

  • Written with an AI coding agent. Development started in October 2026 with Claude Code (Claude Opus 5.5), working in parallel git worktrees, one complete area per worktree.
  • Every question is blind-reviewed. A second agent answers each area without seeing the answer key. Where it disagrees with the key, or flags an ambiguous statement, the question is fixed and the resolution is logged in the area's review.md.
  • Every checkbox has an acceptance criterion. PLAN.md states a command or an observable fact for each item, and a box is ticked only after it was run. Where a criterion could not be met as written, the plan says so.
  • Everything is verified on Linux by CI, including the tests of each mini-project whose folder changes.
  • Security content is defensive. Labs run only locally, in Docker, on internal networks, and every vulnerable example ships with its fix and a test proving it. Load tests never target third-party hosts.
  • AI-written material can be wrong. If you find a mistake in a question or an explanation, please open an issue: that is the most useful contribution.

How to contribute

See CONTRIBUTING.md. Commits follow Conventional Commits, versions follow SemVer, and each finished quiz area or mini-project gets its own release.

Credits

Built by Alex Galhardo, with Claude Code.

Licensed under the MIT License.

About

Learning Computer Science Fundamentals With Theory Quiz Questions and Practical Mini Projects. One Step At Time 🐢

Topics

Resources

Contributing

Security policy

Stars

1.3k stars

Watchers

33 watching

Forks

Releases

Packages

Used by

Contributors

Languages