REPL-Based Development and Feedback Loops

REPL-Based development is a fine(‑grained) thing

In recent years we have heard a lot about feedback loops in software development. REPL-Based development gives us additional levels of feedback loop.

Feedback Loops in Software Development    

Some examples of feedback loops, working roughly from fine-grained to coarse-grained loops (the precise order will be different for different processes), are:

  • Run Automatic Test Suite Get continuous feedback from test code.

  • Pair Programming Get continuous feedback from other developers.

  • Stand-ups Every day or so, report on what we are doing and what's holding us up.

  • Software Releases Every so often, release a new version of software; this allows us to get feedback from customers.

  • Retrospectives Every week or two, reflect on what's working and what's not working.

Most lists of feedback loops start with automatic tests, but can we get more fine-grained?

We can, with REPL-Based development.

REPL-Based Feedback Loops    

For a detailed explanation of what REPL-based development is, see my REPL-based development article. One of the points I make there is that REPL-based development gives us the following feedback loops:

  • Explore Using a REPL Window We make use of a REPL window for simple exploration.

  • Evaluate Forms from Editor Windows We build up a program bit by bit in editor windows, and we repeatedly send new and modified forms to the REPL process.

  • Save to File We save our changes to file, and we load and run larger chunks of code in various ways.

  • Reload the REPL We regularly reload from scratch.

Putting it Together    

The list of REPL-based feedback loops almost dovetails with our first list of feedback loops — “almost” because the automatic test level is lower than the reload the REPL level. So we end up with:

  • Explore Using a REPL Window

  • Evaluate Forms from Editor Windows

  • Save to File

  • Run Automatic Test Suite

  • Reload the REPL

  • Pair Programming

  • Stand-ups

  • Software Releases

  • Retrospectives

OK, maybe not deep, but probably worth writing down.