---
layout: post
title:  "Off the Rails"
date:   2016-10-07
---

For our third project at learn.co, we were tasked with building a CMS (content management system) in Rails. The project had several requirements such as user authentication & authorization, incorporating a third party login (e.g. Facebook), joining together multiple tables, and more. With those requirements in mind, I decided to create an application for a fictitious task running (delivery) company called “FetchIt”.  

From a personal standpoint I had been hoping to use the project as my first real opportunity to incorporate TTD (Test Driven Design) and to really push my comfort level with Active Record relationships. While reading, watching videos, completing various labs will get you so far, at the end of the day it’s about building applications. There’s simply no substitute for creating your own project(s) and ultimately learning from those inevitable mistakes. Sure it can be painful at times which I can and will attest to.  However learning from these growing pains is ultimately how you’ll improve and this project was no exception.

For me the idea of TTD seemed unnatural at first. For someone new to writing tests, the notion of “Red - Green - Refactor” was somewhat hard to comprehend, yet oddly intriguing at the same time. As I eventually became more comfortable with the practice, I quickly began to enjoy it. I found writing test first not only helped with my code organization, but it significantly impacted and shaped my strategy.  I felt more methodical in what seemed to be an inside out approach. Unfortunately TTD can also impact your time schedule and for someone (like myself) who’s still learning how to write effective tests, it eventually became too time consuming. While it’s important skill to continue and build upon, it will simply have to wait another day.

My second focus had to do with Active Record and more specifically Active Record relationships. I wanted to use this project as an opportunity to incorporate some complex model relationships. And after implementing several polymorphic relationships, it’s safe to say I was successfully pushed outside of my comfort zone in that regard. Of course I could have easily created a bunch of tables with similar attributes and perhaps saved myself a week or two, and there was ample time for second guessing. Yet despite all the various challenges, in retrospect I’m glad I stuck with it.  From learning what errors to expect, to anticipating the SQL Active Record will run in the background, it was an experience well worth it. 

Overall the project was challenging enough for a newbie without adding additional obstacles, but would I have learned as much without them?  
Sure I could have easily met the requirements by creating a simple blog and most likely saved myself a few weeks of frustration.  However much like a bootcamp, it’s about recognizing the opportunity, and ultimately what you get out of it will depend on the effort and time you’re willing to put in.

Create Off the Rails post
Create Off the Rails post