Loading
Build a TypeScript Project From Scratch Tutorial (19 exercises)
Lesson

Discuss Readme-Driven-Development

In this lesson, you will learn about Readme-Driven-Development, a practice where you write your README.md before writing any code. You’ll be tasked with a prompt and then see a possible solution after.

Resources

The following resources provide more information for this lesson:

Transcript

Instructor: [0:00] A couple years back, I heard about this practice called Readme Driven Development. This is an original post from Tom Preston-Werner, one of the founders of GitHub and the former CEO. It's back from 2010, so it's been around for a while.
[0:16] It's the idea that you write the readme first. That's what we're going to try with our tutorial today. Head back to your IDE and create a folder at the root called streak-counter and add a README.md.

[0:29] The prompt is this, similar to Duolingo, we're building a streak counter library. Imagine this is a library that an end user is going to import which will keep track of a streak, and streak meaning one day to the next of logging into an app or something of that sort.

[0:47] With that single piece of information, I want you to take a second, pause the video, spend a minute or two writing out a readme for the Github repo that someone would visit when they used this package. Then, come back and we'll discuss it together.

[1:01] Welcome back. As promised, here is the solution that I came up with. I'm actually going to open the preview, which will be a little bit easier to read.

[1:11] The package is called streak-counter. We're going to be publishing it under our namespace, not super important.

[1:17] You install it like any other package and then it's got some usage here. You import it. You pass into local storage. You date and it will return an object with these properties.

[1:28] This is one solution, but again, the whole idea of this was to practice Readme Driven Development, which is very, very useful when you're developing a library.