News for hackers. Stuff that matters.
Re:REPL Driven Design by ch4s3 on Thursday May 28, 2020 @12:30PM (#23339216)
Yeah I agree. It almost feels like he's making the argument in bad faith, but maybe he's actually unaware of the way in which you can back-fill tests?
Re:REPL Driven Design by goostavos on Thursday May 28, 2020 @01:36PM (#23340074)
It does come off very strangely dichotomic. As though REPL driven means no tests and bad practices, whereas TDD means tests and good practices?

As an idea, maybe we could do... both? Explore at the REPL, and then commit to tests and clean up once you've solidified your approach (i.e. how most Clojurists likely operate).

Re:REPL Driven Design by sanderjd on Thursday May 28, 2020 @01:57PM (#23340300)
I think TDD purists seem to see no point in unit tests that are not written before the code. That is, if the unit tests were not used to drive the design and implementation of the code under test, they are useless. I find a lot of value in the test driven approach, but this purist view does not make sense to me. I sometimes, or often, write the code first (being able to do so in a repl in languages that support that is even better), when I find it easier to think through the problem in terms of implementation rather than expected output. Sometimes I will then comment out the code and begin writing tests and re-writing the code to pass them. I think that's what he should have done here; he could have benefited from playing around in the repl, but reduced his fear of refactoring later on by having the tests.