Week 04

160328 – 160403 — Total classroom hours: 18.25

I was excited to start this week’s work with rails. I feel like I have a relatively good handle on Ruby (emphasis on ‘relatively’) and Im curious to see what this infamous Rails beast is all about. It started out, as most lessons into new territory do, with a few checkpoints of setup. What I find most interesting in this new endeavor is how even the most simple tasks can throw me for a loop. One aspect of the workspace was to set up an account and push the project to Heroku. It probably took me an hour to get a successful push to Heroku. When it was all said and done, and after abandoning the initial setup to start from scratch, I realized that I had not properly setup the git process (I added only the single README.md file, instead of add all) and that was preventing it from pushing properly to Heroku. So much of this whole programming ecosystem is about precision. Miss a comma, add an accidental spacebar stroke, give the monitor a weird look, and you’ll get an error. But what I love about it is that in almost all errors lies the solution to the error, you just have to know where to look.

Ok, so now everything is pushing to Github and Heroku properly, time to get rolling. Theres a lot of infrastructure to setup: controllers, routing, models, proper paths. To be completely honest, Im not confident that its all sinking in as much as Id like. There were definitely some points where I was typing what I saw in the browser into iTerm and crossing my fingers when it came to testing. About half the time the tests would fail when they were supposed to pass. But, as Ive come to learn, a failed test is a learning experience. When a test fails it forces me to ‘wake up’ from the copy/paste trance that I was in and find/resolve the problem. As Im digging through the last 5 minutes worth of code Im revisiting the exercise -usually multiple times- and its sinking in that much deeper.

I had some trouble with models (which are new to me) and git (which is not) this week, which was probably the biggest hurdle I overcame. The assignment for Checkpoint 28 was to take what I had learned in the lesson and create two new models that would reference each other. Sounds simple enough, after all, I had literally just spent the last hour and a half doing exactly that. I had some trouble, I tried to edit an existing table, I tried to remove a table, I tried to go back in git and start from scratch, but every attempt was failing. I was not surprised to be struggling with the models, but I really thought I had a handle on git and it was not responding the way I thought it would. The problem with the models was merely a matter of knowing how they can be manipulated, particularly the order of events that has to occur for edits to take place. And what I learned about git was that if you leave the changes you have made in the current branch uncommitted they will follow you around no matter how far back you go in the git history. Both resolutions came from my mentor

Don’t let the previous text fool you. As many problems as I have solved this last week I feel like my handle on Rails up to this point is weak at best. Once I complete the Rails checkpoints I plan on going back and reviewing the entire section again.

Leave a Reply

Your email address will not be published. Required fields are marked *