contact

Send me a message through the form to the right, or contact me directly at mdmills1990@gmail.com

         

123 Street Avenue, City Town, 99999

(123) 555-6789

email@address.com

 

You can set your address, phone number, email and site description in the settings tab.
Link to read me page with more information.

Blog

Sinatra project - starting to feel like a programmer.

Marc Mills

I can't say that my sinatra project is done. I can say that it meets the requirements and I'm happy with where it is for version 0.0.0.0.1. I chose to work on an app idea that I had a little less than a year ago, well before I was even thinking about learning how to code or starting into a program like this. It was one of those "oh, wouldn't this be a really cool and convenient piece of software" ideas that I often have, so getting a chance to start actually building it myself is really exciting to me - even if it's the Flinstone's car version of the Tesla in my head.


As most people described in their blogs about the sinatra unit, I also flew through the initial material with sql, orms, html & css, and sinatra basics, followed by a screeching slow down as the labs grew increasingly difficult in the final 15 or so lectures and labs. But as I learned the ways I felt most comfortable debugging MVCs, I started to really love this integration of all of the symantic languages and conventions that we've gathered over this second unit. I spent a long time conceptualizing my models and their relationships, I took the time to draw out how I wanted my finished product to work before I started, and I took a TON of notes which can only be described as written rubber ducking (a process I sometimes find as helpful as verbal rubber ducking, since it forces me to slow down a little - I speak fast, even when it's to myself). With this careful foundation, I found that I moved much more quickly through actual coding phase of this project than I had antipated, and had several triumphant, "I CAN'T BELIEVE THAT JUST WORKED" moments, which felt great.


One major snag I had to overcome was that after a while, I had to admit that one of my models was conceptually flawed and needed a major overhaul. My Ingredient class, which is meant to keep track of your kitchen inventory, was given three attributes: fridge_freezer_item, pantry_item, and spice_cabinet_item, so that the user could input 3 items at a time into different categories on the new items page, and so I could easily organize the show page into "fridge & freezer", "pantry", and "spice cabinet". The problem came when I built my delete button and I realized that if you wanted to delete one of those items, you would end up deleting the entire Ingredient object, losing the other two along with it. Or if you didn't have anything to add in the spice cabinet while adding fridge and pantry items, my database was full of a bunch of ingredient objects with ingredient.spice_cabinet_item = "", which seems like a fast way to end up with a messy database. I switched to a new branch and altered my ingredients table to instead consist of simply "item" and "food_type", so that each food item is tied to it's own ingredient object, and "food_type" functions as the "where in the kitchen is it from" attribute. I think this also make creating a ingredient to recipe matching algorithm easier in the future.


Overall I had a great deal of fun making this project. I am so excited that I can start developing my ideas at this point, as it gives me a really strong motivation to work hard, thoroughly, and meticulously.