3 ms·
A few years ago I read a post by Bob Martin about how you can solve code kata problems by applying a sequence of 'transformations' to pass one test at a time. H
by a-priori 10y ago
A few years ago I read a post by Bob Martin about how you can solve code kata problems by applying a sequence of 'transformations' to pass one test at a time. His method is very mechanical... so mechanical, in fact, that I think it may be possible to automate it.
So I started tinkering with the concept, and I've got a bit of a start on it here:
https://github.com/michaelmelanson/autocoder https://github.com/michaelmelanson/autocoder
What's there is very rudimentary. The main class is a good place to start.
Basically I'm building up a library of transformations that can describe solutions to kata problems (the 'word wrap' one currently). The next step is to create a search algorithm to derive an ordered sequence of transformations from that library to pass an ordered sequence of tests.
- hcs 10y agoYou might find Perelman et al's "Test-Driven Synthesis" paper interesting, it also cites that post as inspiration. http://homes.cs.washington.edu/~djg/papers/tds-pldi2014.pdf http://homes.cs.washington.edu/~djg/papers/tds-pldi2014.pdf