Engineering Code Lab · JavaScript in your browser
Code that measures, filters and controls.
32 short programming problems pulled straight from engineering: average a sensor, debounce a button, find a root, tune a PID loop, fit a calibration line. Each has starter code, automated tests (some hidden), hints that unlock one at a time, and an explanation once you solve it.
How the sandbox keeps you safe
- runs in your browserNever on a server.
- no networkThe sandbox cannot fetch, post or open sockets.
- 3 s limitInfinite loops are stopped, not frozen.
- nothing uploadedDrafts stay in this browser.
Level 5: Research Engineer
10 exercises also come as a buggy version to fix: guided debugging, the way real engineering often starts.
Levels describe what you can already do, not your age.
- ✦ L5 · SimulationMonte Carlo with a seeded RNGEstimate π by throwing random points at a square, using a seeded generator so results are reproducible.randomness and reproducibilityseeded RNGplots
- ✦ L5 · EstimationA one-dimensional Kalman filterFuse noisy thermometer readings into a steadier estimate that knows how uncertain it is.recursive estimationplots
- ✦ L5 · Signal processingFind the vibration frequencyCompute a DFT magnitude spectrum and report the dominant vibration frequency of a motor.discrete Fourier transformplots
- ✦ L5 · RoboticsShortest route for a delivery robotUse Dijkstra's algorithm to find the cheapest route between rooms connected by corridors.graph algorithms
- ✦ L5 · Numerical methodsHow accurate is your solver?Compare Euler and fourth-order Runge–Kutta on exponential decay against the exact answer.error analysisplots
How it works
- Write in the editor: Tab indents, Ctrl/⌘ + Enter runs.
- Run to see
console.logoutput, line charts fromplot(xs, ys, "label"), or a step-by-step sorting and searching visualiser. - Check to run the visible and hidden tests. Hidden tests show pass or fail, never the expected answer.
- Stuck? Hints unlock one at a time. Nothing is timed and nothing is ranked.