You’ve now built the Elm Street toy library’s tracker from a brief and explained it to the mentor. Someone else wrote that brief, though. They picked the kinds of items, decided what lending had to do, and listed the checks. For a program of your own, those decisions are yours.
This lesson walks you through the method behind the brief, so you can use it on an idea of your own. You’ll write a short pitch, cut your features down to what matters first, sketch the data and the files, and get a skeleton running before any feature works. Start by saying what your program is for, since that decides every step after it.
Pitch It and Cut It Down
A program without a clear purpose grows in every direction at once, so before you write any code, draft a pitch: one paragraph that says who uses the program, what they use it for, and what it doesn’t do. Here’s how the toy library’s pitch could have read before anyone wrote the brief:
The Elm Street toy library’s volunteers lend board games, puzzles, and ride-on toys from a garage to children whose families have signed them up. The tracker is a set of Node.js scripts they run at the desk. It knows each kind of item and its rule, lends an item only to a child it suits and only while it’s on the shelf, and reads the ages that volunteers type. It doesn’t send reminders or take payments.
Don’t skip the last sentence. Every “it doesn’t” is a feature you’ve decided not to build, so you won’t drift into building it.
Pick an idea from your own life that fits in one paragraph. A good fit for this course has a family of related types, parts that one object holds, a failure worth naming, and values someone types. Three ideas that have all four:
- A plant-watering log for a shared house, where cacti and ferns follow different watering rules and someone types how many days have passed
- A neighborhood book swap, where paperbacks and comics are kinds of books and a swap desk lends them out
- A bike club’s kit shed, where helmets and pumps are lent to members and a helmet comes in sizes
Next, cut the features. Write every feature you can think of, then sort them into three lists:
- Must: The program is useless without it.
- Should: It makes the program better, and you’ll build it once every must works.
- Could: A nice extra, built only if you still want to.
Here’s how the toy library’s features fit into those lists, as if you were planning it from scratch: