[HN Gopher] Readme Driven Development
       ___________________________________________________________________
        
       Readme Driven Development
        
       Author : pcr910303
       Score  : 59 points
       Date   : 2020-11-26 18:48 UTC (4 hours ago)
        
 (HTM) web link (tom.preston-werner.com)
 (TXT) w3m dump (tom.preston-werner.com)
        
       | leoplct wrote:
       | Would be great to have a dynamic Readme generated from tests (eg.
       | RSpec etc...)
        
         | kemitchell wrote:
         | For sufficiently small libraries, I've done a number of READMEs
         | with usage examples that include test assertions. The examples
         | then serve as the test suite. For example:
         | 
         | https://www.npmjs.com/package/spdx-expression-parse
         | 
         | I've released free scripts for Node.js that do the job of
         | parsing the Markdown, extracting fenced code blocks, and
         | filtering by infostring. That leaves just lines of code, which
         | you can pipe straight to the Node interpreter:
         | 
         | https://www.npmjs.com/package/defence-cli
        
       | clashmeifyoucan wrote:
       | nice, I just went on the first commit of the first repo on his
       | github and he's stuck with it!1
       | 
       | edit: I see similar examples on the og hn thread
       | https://news.ycombinator.com/item?id=1627342
       | 
       | [1]
       | https://github.com/redwoodjs/redwood/commit/e2ceb0dcdffe4c28...
        
       | forgotmypw17 wrote:
       | I agree, this is a great tactic.
       | 
       | I'd been writing my project for over a year and hoping to get
       | help, buy-in, and collaboration. Then I realized that I hadn't
       | updated my Readme since starting out, and it was out of date,
       | and, frankly sucked. It was not convincing, and it was the first
       | thing that devs saw when assessing my project!
       | 
       | Kudos to the author.
        
       | mojombo wrote:
       | Author here. Fun to see this come up on HN again, every so often.
       | Readme Driven Development still serves me well (that's how we
       | drove RedwoodJS early on) and we even expanded that into Tutorial
       | Driven Development, where we wrote the RedwoodJS tutorial to show
       | what we wanted to be possible from a DX perspective, and then
       | figured out what code we needed to write to make it possible.
       | It's been an efficient way to focus on what's important and not
       | make usability sacrifices for the sake of easy coding. It's
       | really just the design-first approach, applied to a framework!
        
         | snypox wrote:
         | Great article. Btw, you're the guy who invented TOML, right?
        
           | clashmeifyoucan wrote:
           | yes, he is1
           | 
           | [1] https://github.com/toml-
           | lang/toml/blob/master/README.md#L8
        
       ___________________________________________________________________
       (page generated 2020-11-26 23:00 UTC)