Journal — Look both ways before you code
My accomplishment of the day was realizing that a feature that I’d been scoped to work on for 1 week to build was ALREADY BUILT! Here’s a summary of how this played out.
To give a little context: for one of the new test prep products we’re building at Magoosh, our IELTS expert requested a feature that would allow text input responses to be matched against a couple (3 or 4) different possible inputs so that students would have some leeway in how they input their answers. When I was initially scoping this project work out with a PM at the beginning of Q4, I took some a look at our code and realized that there was a good amount of digging to do for me to understand all the existing wiring and then come in and develop the feature. I had been a little occupied working on some other projects, so I gave a loose estimate of 2 days but my mentor suggested we scope it to 1 week (40 hours) to make room for more iterations (just in case) and writing some extra tests that we didn’t have before for related modules.
So today, I started digging in and immediately felt overwhelmed. This part of our code base was the most nuanced, layered, and chunky because it had to do with one of the core functionalities of our product: practice questions. So I decided I needed to break my work down into more digestible chunks, and also understand better what the expected flow for the admin working with this feature would be.
I made a to-do list that looked something like this:
Exploration
- Set up the product on dev the same way it works in prod
- Create a new question using an admin account
- Create an associated text-input prompt for that question
- Set a “correct” answer
- Answer that prompt using a student account
Development
- Draft idea for “invisible” answer choice type
- Update controller to save invisible answer choices
- Create a test factory for invisible answer choices
- Write specs
Quick aside — I’ve recently realized how great checklists are as a way to outsource precious developer-mindspace. Asana + Evernote have been godsends for team + personal workflow management.
Turns out, as soon as I got to this step:
Set a “correct” answer
it became obvious that we already had the feature, but it was hidden in a way that made it not obvious to our admins that the feature was usable. Because I’d started from the ground up, it worked for me, but for others who were looking for the feature, they were only checking prompts that were published already, which don’t give you an option to add extra “correct” answers. We don’t have multiple-answer checking on any other prompts either.
I showed this to my mentor and to the PM and they both agreed this problem doesn’t need my fixing anymore. However, I do think there are two things we need to do:
- Add some factories + specs to make sure this feature doesn’t break going forwards
- Make answer editing more obvious in our admin tools, either with a form input label or with documentation somewhere.
All in all, this was a fun journey reading into some legacy code and not having to write anything!