News for hackers. Stuff that matters.
Re:On Repl-Driven Programming by mikelevins on Monday January 04, 2021 @09:39AM (#25631846)
I'd say it's more like tests grow naturally out of repl interactions.

Test-driven development as a discipline emerged from the Smalltalk community, and I don't think that's an accident. I think it's a formalization of the way that Smalltalk and Lisp programmers naturally tended to work.

I generally start on something by making a naive model of what I'm trying to accomplish and interrogating it. In successive iterations, I modify the model and the interrogations in the direction of what I need it to be, discovering details along the way.

I'd say that a majority of my actual activity is testing. That's one reason I prefer to interact with a repl from a file: because I want a record of my interactions. I want to be able to do them again and again.

The difference between that record and formal tests is a simple matter of copying the trail of my interactions into a test framework, and that, too, is how I normally work: make model; test it with interactions; keep the interactions around for later.

As I make progress, the models turn into data structures, and the interactions turn into functions and tests.

Re:On Repl-Driven Programming by _theory_ on Friday January 08, 2021 @01:52PM (#25688397)
Thank you for explaining your process. I think I might benefit from this approach.