logoalt Hacker News

simonwyesterday at 1:35 PM1 replyview on HN

Yeah I'm going to ditch those examples and find better ones. I was hoping to illustrate the idea as simply as possible but they're not up to scratch.


Replies

eesmithyesterday at 5:05 PM

I think the problem-to-solve is a good one. The Google Markdown spec is very clear, with plenty of examples, and I think the problem is well-defined.

I've seen entirely too many examples of how to use TDD which give under-specified toy problems, where the solution is annoyingly incomplete for something more realistic.

And I've seen TDD projects which didn't follow the spec, but instead implemented the developers' misconceptions about the spec.

That's exactly what we see here with Markdown, where there's a spec, along with a lot of non-conformant examples in the training set by people who didn't read the spec but instead based it on their experiences in using Markdown.

The code generated by ChatGPT is almost correct. Seeing the process of how to get from that to a valid and well-tested solution would make for a good demonstration of the full process.

I'll again add that showing how to integrate something like branch coverage or hypothesis testing for automatic test suite generation would be really useful.