Like most people, you probably write your to-dos in a shorthand way. I do, and most people do it as well. You know, this sort of thing, a one-day list I made for my latest project (which, ironically, includes a To-Do list manager). And along the way, I've discovered that I should never used shorthand or pidgin in my to-dos.
- Write Textbox
- Write List Handler
- Wrap these in a DIV with a depth handler
- Write the page header
- Instrument the event handler
I've discovered that this short-hand is perishable. It lasts for only a day or so and then I forget the intent of the note, or misconstrue, or expand its meaning.
The problem is that these are much bigger than they look, deceptively so. "Page Header" is an entire specialized React component with its own behavior and its own subcontrols. What I really need is a set of bottom-up instructions, written in full-blown English:
- Create an empty Component
- Write a Storybook test to show that component. It should work, but be blank.
- Edit the Component to show a literal value. Storybook should now show it.
- Create a simple JSON blob with the bare minimum content: An ID and a title.
- Edit the component to show the JSON blob passed in. Storybook should now show the title passed in.
- Write a Typescript interface that corresponds to the basic page type according to the server.
- Edit the JSON blob to correspond to the interface.
- Edit the component so that the JSON blob is now of the type created.
... and so on. Very, very small steps. This keeps me on track, and prevents me from expanding the scope of a given project too far. Which is kinda what I need when wrestling every day with my ADHD.