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.

Examine closely

There will be reading comprehension questions following this excerpt.

Project based testing versus question testing:

We’ve had both, but I think its more difficult to demonstrate mastery when you are just regurgitating memorized terms or not directly applying the concepts you are supposed to be demonstrating knowledge of.

An open ended project can quickly swallow you whole, but when you are given clear goals you can scale and plan a project that matches the scope of the guidelines.

I have definitely preferred the project based version of exams so far because they allow me to demonstrate to myself that I know the topics and have a work sample when i’m finished.  Whereas working on a much smaller code example won’t be as useful when its just sitting around by itself to show I can manage the syntax.  Project exams have the added benefit of grading doubling as a code review which means you get more valuable and applicable feedback.

In “Examine Closely” the author compared to different approaches to exams.  List the two methods and three key differences.

Discuss the effect of Plato’s Theory of Forms on testing in education.

Extra credit: In less than three tries and with no references spell the Author’s full name correctly.

Sleep Hygiene

Or lack thereof…

We were assigned 10 hours of sleep before our first exam and that is the last time I managed more than 8 hours of sleep in this program.

I need a better nights rest for memory and retention, mood, and keeping my brain generally spongy, pliable and absorbent.  So far just going to bed at the right time has failed. is something i’ve been experimenting with along with general good sleep hygiene:

  • Don’t sleep in the same place you work
  • Get enough water during the day
  • Meditate before bed
  • Exercise everyday (okay, this one needs some work)
  • Less sugar and caffeine

I can’t seem to eliminate my computer time right before bed and when I do manage it my mind is filled with code (pseudo code really… if I dreamt in syntax I might be a bit better at it by now).

I almost forgot to close those parentheses just now.

Until then:  sudo sleep

Well underway – Week 3

Three weeks in and already onto our second programming language (3 really, if you count a cursory introduction into Javascript).  I can already see how jQuery will be useful and that I don’t want to start any sentences with it on account of that lower case ‘j’.

Its a relatively satisfying change of pace to see functioning code make immediate changes in a browser window as opposed to the command line for the past two weeks in Ruby.  Although we’re accomplishing similar tasks jQuery is less abstracted from the end user… who I sympathize with having been one three weeks ago and by all accounts also still being one today.

Three weeks means our third textbook as well and Learning jQuery 3rd Edition is proving a little more dense and less elegant than Eloquent RubyJavascript and jQuery are also more dense and a little less elegant than Ruby, so it feels at little consistent at least.