When I begin a coding session, I start by taking the task I need to do and breaking it down in fine detail. For example I am working on personal productivity system, which has a “Project” concept. In my first pass, Projects just had a name field. I was just working on getting the relations right. Now, I want to flesh it out a bit. I have a Jira issue with the title: Add “color”, “startDate”, and “endDate” fields to Projects.
Here’s how I break that down:
- Add fields to DB entity
- Add fields to DB createProject, updateProject
- Test DB
- Add fields to server GQL createProject, updateProject
- Add fields to client GQL createProject, updateProject
- Add fields to client GQL project query
- Add fields to client model and redux initialize
- Add fields to redux createProject, updateProject
- Add fields to API/Optimistic updateProject, createProject
- Test API/optimistic update/redux
- Add a color picker for setting color
- Add UI to create project dialog
- Add UI to update project dialog
- Test UI
I could get more granular, but this is about the level I like. I put them in my task manager to keep me on track and to make sure I’ve thought the problem through. This will roughly be the order I do it and the commits I make.
It guides the session and keeps me on track. If I don’t finish, I just move the incomplete tasks to the next day, which lets me preserve some of the momentum from the previous one. Also see: Green, Refactor, Red, where I end the session with a failing test for the next task I want to do.