Setting up my local environment

I’m two weeks into a new position and i’ve set up my local environment: Two laughing Buddha statues sit under my 27 inch monitor whilst joyfully hoisting bowls over their heads. My chair is adjusted for a generous recline (slouching is good for you) and my desk situated mostly at a constant height ideal for typing.

I’ve located the coffee making materials and know where and when to be to ensure maximum caffeination in or immediately outside the office.

I’ve picked out a favorite coat hanger and have tried out and settled on the form of mild, but fleeting disappointment when it is taken in the mornings.

I’ve internalized, mostly, when its ok to blindly occupy a meeting room for tangential white-boarding or a bit of quiet seclusion.

I’ve decided which elevator is most auspicious of the six in the lobby and claim a small victory when I get to ride it.

I’ve gotten to know my coworkers warmly and quickly.

Oh, I also got production code to run locally on my work laptop, so that’s alright too.

 

Testing http requests with VCR

Ruby Gem: VCR

VCR on Github

When working on Discuss-it the team found that testing our API http requests slowed down our testing in a big way and sometimes returned inconsistent results.  Since we didn’t want to test the reliability of our external dependencies VCR was the perfect tool to step in between our http request and our test.

What it does is create a ‘cassette’ file in your spec folder which records the first response to your http request and then on ‘replay’ when you rerun your tests it uses the cassette data instead.  If your tests are http request heavy you’ll be able to test how the requests are handled much more consistently with VCR.

 

 

 

Rails app the Second

A new group project is well underway already: a site that searches out discussions for articles and gives you back links.  We’re making a few Ajax calls and parsing some of the data and feeding it back to the user.  This version doesn’t explicitly need Rails to run an could probably have functioned just as well using Sinatra (i’ll post a little more on why I like Sinatra soon), but its a good exercise in working with the rails filesystem and dealing with its idiosyncrasies.  You should see the final website version of the app posted on the portfolio page very soon.

Step two is to wrap it in Javascript and make it into an site pluggable button, but one thing at a time!

We’re using a lot of cool little gems that i’ll write a little bit about in the next few days, so stick around.

First Rails App

At this point it appears i’ve got a few “first” apps in progress.  One from Hartl’s Ruby on Rails Tutorial and the other a group project.  My group consists of Erica and Lucas from the current Portland Code School cohort.  We’re building a discussion finder, which takes a URL and spits out a discussion about that particular URL on one or more sites.

I’m pretty excited about having a functioning rails app under my belt! I’ll throw it up in the portfolio soon.

Rails against the machine

The dive into Rails has begun during week 5 at Portland Code School.  Sinatra, ActiveRecord and other complimentary technologies are filtering in to our brains.  So far i’m enjoying the division of labor between the different components of web apps we’ve looked at.  I may just be grokking a little more than I used to.

We’ll be plodding through a lot of different resources in the coming days including:

Ruby on Rails Tutorial

Treehouse Rails track

Rails for Zombies

My body is ready.