Setting the Moo'd
Two Weeks, Too Weak
So I know I missed last week's and I'm late on this week's. This is a good thing. If I had free time to write a blog in the wee hours, then I obviously wouldn't be as absorbed in the program as I needed to be.
That being said, I still wanted to provide some small updates to ye fellow followers, to see where I'm at and where we're going so far. Instead of doing dailies, I'm going to break it down by subject and a brief note as to what I learned, and a few things I thought were really interesting.
NB: Please note that as I am just learning software development, anyhting I think is really interesting may be completely boring/inane/stupid to you.
Ruby on Rails:
Building Our First App
We got to build our first app from the ground up! While we had a few weeks to work on this, we started by just building a rails app and modifying it as we went onward.
One of the tricky parts is that we also had to learn Postgres, which is something that allows us to build a database (series of tables with columns). The hardest part for me, however, was making these tables in relation to each other, specifically being able to reference them through each other. That's definitely something I'm working on more outside of the course.
I'm not going to pretend that I understand Rails fully now, so I'm doing a second run-through using some other resources and trying to build my knowledge to a better position. I do feel like I can build a simple thing like this again, but I want to get more into the deep parts of Rails!
Heroku & GH-Pages
git checkout -b gh-pages
Deploying Our Back-end to Heroku
Max Blaushild had a really tough job to do on Thursday, and he handled it magnificently. His task was to get 19 students up and running and deployed on not one but two platforms. Patience-abound, he decided to take us through it handling the dozens of errors various students encountered, and absolutely dominated GitHub Pages and Heroku.
Deployment (for those unfamiliar) is the ability to put your code somewhere other than your computer where other people can access it. Heroku is where we hosted our backend (database and other stuff), and GitHub Pages is where we put our front ends, where we could put our Single-Page-Apps based simply off of our GitHub repositories.
My front-end was built with Bootstrap, which proved to be really easy for me to set up, and I'm super glad I did. Simple and ready to go, and now...on to the back end!
Seeding & Scraping
Getting My Data
So one of the primary problems that I had with my database is that I wanted to have all of the Ben & Jerry's flavors as well as all of the Starbucks roasts as well as their resepective descriptions and ingredients! I had to take a really interesting route to do this: scraping. This is when you take the content of a website and try to parse the information in a logical manner in order to get certain pieces of information from it.
I used a Rails Gem Nokogiri to do so, and it was immensely valuable to the mission. I ended up writing some code to do this during the phase of the database where all of my pre-existing data is added to the database for you to search! Really it involved some clever loops (going through a list of things and doing something to each thing), but I'm overall still quite proud of the work it did.
My Project: Get Moo'd
This week was focused on our second project. Mine can be found at getMood.us, and the instructions are as follows (to prevent breaking it too badly):
- Please click "Log in" in the top right to set up your account
- You can use any information here, but please use caution, as it's not a 100% secure thing (don't use a real email/password, I am not a cryptographer).
- Go ahead and click on either the cow or the cone!
- Type something into the search bar to see if it comes up. My favorite list definitely goes to the Starbucks Vanilla Latte results. Yum.
- Click Get Moo'd!
- The My Profile section does not work (here's looking to V1.1), so don't try to delete your account or anything, it won't really do much.
Thanks for reading, everyone, that about does it for this week's episode, and I hope to come back at you next week with some new cool stuff about git and how it's been learning that on the fly vs. with a plan!