REPLs All The Way Up: A Rubric For Better Feedback Loops
youtubevideoSections
Properties of the REPL
Read
A prompt is welcoming & open ended
Discoverable : Autocomplete/suggestions
It is highly incremental
REPLs are SAFE: a private place to try things
Eval
In the same language as used on implementation
Allows to poke the system, see what happens
Automates the repeating parts of exploration, leaves the rest open-ended
Multi-channel: result, STDOUT/ERR, exceptions, ...
Rich errors
Scrollback buffer creates a story
Basic serialization of the data, exposes threads that can we can pull on
You get stuff you don't expect (open to surprise)
For experimentation AND exploration
Loop
Build context over time
Interactions are lossy (we can throw them away)
Are responsive
Are conversational
How they would be presented at other levels of complexity (>1 unit of code)
Unit
unit tests
Feature
how to measure?
Tracing
Debugger
Reload-driven development
Hot-reload
Service
Make friends with SQL (the REPL to your data store)
ChatGPT the web as a REPL
Application
Design with tactile, conversational methods
CRC Cards
Event Storming
Whiteboards
Automate scenario reproduction
Application in production
Use CI/CD
But beware of blockings/context switching that it might produce
Beware of feedback via users -> support ticket -> meeting
Enabled by
feature flags
Release & deploy are two loops with different scopes, decoupled by feature flags
Use observability & distributed tracing
Product team
Make friends with customer support
Make friends with your salesperson
Business
Facilitate REPLy behavour
Support business metrics and analytics
Provide spreadsheets
Commidity software for commodity needs