A brief video showing the basic of REPL driven development, more to come. This was created for the JVM Wars 2020 online meetup last night, where Clojure proved to be very popular by the audience https://youtu.be/rQ802kSaip4 I've posted links to the full video of the event in the #events channel1👏1🦜
Oh yes, that would be simpler.. I guess I got too trigger happy with the anonymous function. I also think I may have used
apply str instead of
clojure.string/lower-case in a previous version and forgot to remove the surrounding anonymous function.
Sometime you need the anonymous function if you have more arguments or want to control the order of those arguments, but not in this case.. Good spot.
I will be doing more videos about REPL driven development over the coming weeks
great example of iterative development
made me think of a testing setup in my Rails apps: • Tests define in RSpec • Guard is listening to changes in files • Whenever I change a test file, the listener automatically re-runs the relevant file Is there anything like this for the repl? Sounds like a lot of wasted computing cycles but the speed up is magical
Thanks for the kind words. There is a lot more I can show, but I had a limited amount of time allowed (which i did over-run)
It is possible to run the tests as just another part of the code, although I prefer to use an explicit test runner. I am now using Kaocha as the test runner and this can be set up to watch for test changes. Kaocha can run unit tests and clojure spec tests (generative testing). I've also been using generative testing in unit tests too, to get a wider scope of testing without writing a lot more testing code. Kaocha also has cucumber, for the Behaviour Driven Development approach which evolved from RSpec, something I'll try soon.