Step 4

Drew Pilgrim
Off by One
Published in
2 min readMar 5, 2018

This post is actually going to detail a somewhat different mistake or process error than normal. Previous posts have gone over syntax issues, what I need to do when faced with an unknown problem but this post will be discussing an issue I had that occurred before I had started typing anything. While working on my capstone project for Actualize (A web application which would take in previous nutritional data and suggest a recipe to fill in nutritional gaps in the user’s diet) I was struggling in setting up what models and what their attributes should be in setting up my database.

Having to recently reset which API I was pulling data from I was having to rebuild those models from my previously thought out design. I spent a few hours rehashing and trying to get the models to easily mesh with the new API I was using which would help make my project work more effectively in the long run. When I brought up these issues with the teacher she pointed out a very easy solution. I didn’t need to store everything on hand because I was already getting the data from the API in the first place. If I pull a recipe from the API using whatever search params are appropriate I only need to save that specific recipe and it’s ID in the API’s database and I can get any information from the database at that point. A straight forward and simple solution I frankly should of noticed considering my background in economics and my general love for problem solving and addressing the key issues posed by a problem.

I was trying to limit my API pulls due to having a limit imposed by the API I am using (The API, Yummly, charges non academic students a minimum of $500/Month) but this solution would not force me to go over that limit by any means. I think I was simply trying to stick to the core of what I was expected to do due to still being new into web design and back end schema setups. Sticking to the familiar techniques of holding all the data in models was a familiar setup to me in the wide wide world of backend design so it makes sense that I would naturally approach the problem from that angle first. Still overall this is an interesting mental trap I seem to have constructed for myself. I think I will probably have to manually force myself to step back from my first approach when exploring new avenues and reevaluate my goals and approaches and making sure the latter solves the former efficiently. At least until my mind goes there more naturally. Still this is certainly an interesting experience to learn from.

--

--