Hey HN!
I wanted to demo TDD with Python, as well as showcase some BDD practices I've been blogging about recently[1].
So I used literate programming to implement Wordle, and rendered the narrative into this "Show HN" webpage.
I'm certainly no Knuth, but I'm pretty proud of the result. Proud enough to chance myself to a HN post, and risk HN's mockery and ire: my first "Show HN".
I hope this crowd will enjoy this annotated walkthrough of Wordle implementation in Python. Codebase available on Github[2].
Relevant for folks here (though not covered in the main narrative) is how the Gherkin files are listed as Requirements[3] via Sphinxdocs extensions[4]
[1]: https://jiby.tech/
[2]: https://github.com/OverkillGuy/literate-wordle
[3]: https://jiby.tech/project/literate_wordle/_collections/gherk...
[4]: https://github.com/OverkillGuy/literate-wordle/blob/6d51eb6d...
With that said, it is not the ideal way (for me) to explain code. There is too much too read, even with the TOC. What I want, instead, is distillation. I want the energy spent on meticulous comments to be redirected into simplification and reduction -- still with a few well-chosen comments for support.
For comparison, even with 0 explanation, I can understand this 57 line hyperscript wordle (a language have almost no experience with):
https://arhamjain.com/hyperwordle/
much more quickly than I could read through the literate version. I understand the goals of each are not exactly the same, but I think both are trying to "clearly and efficiently communicate what the program is doing."
Perhaps a presentation of the literate version where I could suppress all the exposition and dig into it only as needed would help.