OK, I really enjoyed this one. The scope was nicely limited and I felt like I knew enough to chomp through it in a pretty workmanlike way.
The only point I got bogged down was in the construction of the api query, and that’s the real purpose of the exercise, so that’s fine. And even at that I wasn’t too phased by it.
So here’s how things went:
Having done the Design Patterns course on Udacity (well, the first part, anyway!), I was keen to apply the MVC model.
1) I mocked up the main elements of my viewer - title, search field, random button.
2) Made a shell MVC structure, sticking in placeholders for functions I knew I’d need and as they came up
3) Added the functionality to track user input and grab it with a Submit function
4) Figured out how to parse the user input into the API call
5) tinkered with the API until I was getting something back (though not what I wanted just yet!)
6) Worked on a preliminary approach to the render function
7) Figured out how to use a promise to call view.render
on API resolve
8) Did more research on the API to get the right query.
9) Added logic to parse the right API results to the render function and styled it
10) worked back over secondary functionality and todo items I’d come up with along the way.
and
There was a fair amount of interplay between steps 4-8, but I tried to be methodical and avoid work that might need to be replaced by a change in other parts of the program.
I used git obsessively for this, making branches for all kinds of trivial stuff that really didn’t need it - but it was an exercise in discipline and avoiding my own errors.
A few times I managed to catch myself on the the master branch, randomly tweaking things in dangerous fashion. When I did I got things back to a stable condition, branched, resolved the matter, merged and deleted.
It’s nothing special, but I think it’s reasonably solid and I’m proud that I didn’t crib code to any significant extent (there’s one thing I think I need to double check).
There’s outstanding issues on my todo, most important of which is adding breakpoints for mobile use, but TBH I’m probably going to do that on future projects intsead.
Be realistic, right?