My Profile Photo

rubycoloredglasses


I'm Jason, a web applications developer in the San Francisco Bay area.


  1. Minecraft Mods

    I’ve been playing Minecraft for a little while now. Want to see what else this thing can do, so I want to get access to console commands. This is a challenge it seems, so I’m going to document how it’s done here. …


  2. Obtain MySQL Query Statistics using Explain

    Sometimes it really counts to restructure the queries made to your MySQL database, especially so that they do make use of indexes which are present on the table. …


  3. Git Branching Model

    I just want to put this here for future reference. …


  4. Referencing Gem Source Code

    It’s often difficult to work with Ruby Gems that your Rails application depends on because the source code for the gem itself is packed away in a gem directory. I’ve often found myself using the command ‘rvm gemdir’ to output the path to the gem directory that my application is using, changing to that directory, and opening the source using Textmate. This is a time consuming process. …


  5. You can be a programmer too!

    I’ve been telling people to check out CodeSchool.com because it has well laid out interactive courses that you can take to learn advanced web development technologies (jQuery, Coffeescript, Rails, etc). …


  6. Spree Extension Development Environment using RVM

    I’ve found that there is trouble working with a Spree extension when your gem set does not include the gems included with the Spree gem itself. I discovered this after generating a Spree extension, confining the extension to it’s own gem set using RVM, and then running ‘bundle install’ based on the Gemfile/gemspec configuration of just the extension itself. …


  7. Creating a Gem

    In the past gems were created manually, or generated using the echoe gem (last release Sept 21, 2011), or the Jeweler gem (last release November 7, 2011). …


  8. Ruby File Modes

    When working with files, you can open them in one of several modes. …


  9. Return FALSE or Raise Error?

    I was working on a gem a couple months ago, and it came time for my boss to do a code review before we install the gem on another teams system. My boss pointed out that there were areas where I was returning FALSE, and baking in a lot of conditional statements and other handling, instead of using Ruby’s built in feature of error handling, which is designed to bubble exceptions up the call stack. He informed me that in situation that are not expected to occur, it’s best to raise an exception to halt execution and report the issue. He even recommended that I read Exceptional Ruby, a book devoted to the subject of proper exception handling. …


  10. When Testing Seems Pointless

    I remember when I was first exposed to the concept of test driven development (TDD), it seemed like you were writing a test that did the same thing as the function itself. This really left me perplexed as to why everyone was raving about it’s value. …