M. Mirra's notebook[?]

created: 2019/05/04, tags: programming

starter templates encourage isolated experiments

code defects are best attacked in minimal reproductions. feature experiments too benefit from tinkering in isolation.

it's not just to tightening the write/run/verify cycle by avoiding to rebuild the 99% of the codebase that is irrelevant to the problem at hand. it's about eliminating distractions. coding in a minimal environment mirrors leaving a noisy room or closing your eyes to better think through a problem.

problem: setting up a minimal project nowadays takes a discouraging amount of brainwork. index.html + main.js won't do; it's bundler, transpiler, typechecker, build scripts, and plugins for each.

solution: templates and low-tech "generator".

$ cp -r ~/templates/browser-experiment \ 
$ cd ~/lab/replace-side-effects-library
$ npm install
$ npm run dev

or, after minimal scripting:

$ start.sh browser-experiment try-out-new-library