Snapshot / Computational Thinking Repo ↗

Introduction to Computational Thinking

A serverless republish of MIT's Computational Thinking (18.S191) — by Alan Edelman, David P. Sanders & Charles E. Leiserson.


The original course makes its notebooks interactive with a live PlutoSliderServer backend. Here, every notebook is compiled to WebAssembly and runs right in your browser — no server, no kernel, no install — hosted free by Snapshot.

The full course is three modules · 24 interactive lessons. The sidebar groups every lesson under its module — open any one, drag its sliders, and every figure recomputes live.

Module 1 · Images, Transformations & Abstractions

  1. Images as Data and Arrays — a picture is just a grid of numbers you can slice and edit.

  2. Abstraction — one operation, any type: the heart of computational thinking.

  3. Automatic Differentiation — exact derivatives from dual numbers, built from scratch.

  4. Transformations with Images — convolution filters: blur, sharpen, find edges.

  5. Transformations II — a 2×2 matrix is a linear map; drag it and watch a grid bend.

  6. The Newton Method — follow the tangent to a root and watch it converge.

  7. Dynamic Programming — find the cheapest path down a grid of costs in one sweep.

  8. Seam Carving — content-aware image resizing, powered by that same dynamic program.

  9. Taking Advantage of Structure — diagonal, sparse and low-rank: store less, compute more.

Module 2 · Social Science & Data Science

  1. Random Walks — a coin flip each step; watch tiny noise add up into √t spreading.

  2. Epidemic Modeling (SIR) — three coupled rates turn a handful of cases into a wave.

  3. Estimating π with Random Darts — throw darts at a square, count the circle, recover π.

  4. Optimization by Gradient Descent — roll downhill on a landscape to find its lowest point.

  5. Random Variables & the Bell Curve — add many small randoms and the normal curve appears.

  6. Random Walks in 2D — the same drunkard's walk, now wandering across a plane.

  7. Fitting a Line (Least Squares) — the single line that sits closest to a cloud of points.

  8. Principal Component Analysis — find the direction your data actually varies along.

  9. Reliability — exponential lifetimes and the odds a system is still running.

Module 3 · Climate Science

  1. The Energy Balance Model — sun in, heat out: the one equation that sets Earth's temperature.

  2. The Greenhouse Effect — how CO₂ traps outgoing heat and shifts the balance.

  3. Feedbacks & Climate Sensitivity — ice and water vapor amplify a small push into a big one.

  4. Snowball Earth & Tipping Points — when feedbacks run away and the planet flips state.

  5. Heat Diffusion in the Ocean — heat spreading down through depth, a 1-D PDE solved by hand.

  6. Carbon Emissions & Future Warming — turn an emissions path into a projected temperature curve.


Pick any lesson from the sidebar to begin — drag the sliders and everything recomputes live in your browser, no installs and no account.

Course material © the original authors — code under MIT, text under CC BY-SA 4.0. This is an unofficial educational republish.