My Profile Photo

rubycoloredglasses


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


  1. Ruby Class Name

    I noticed that in a module used on the CalCentral project that logger expressions used in a module referenced ‘self.name’ many times. I checked ApiDock.com for a reference to this class in the Ruby or Rails documentation, but I couldn’t find one. The module itself didn’t define a #name method, so I was perplexed. …


  2. Using 'for in' in Javascript

    Today our lead front-end developer pointed out to me that when using a ‘for in’ loop in Javascript that you want to make sure to use hasOwnProperty() on the element to make sure it belongs to the object, and not properties that were inherited through the prototype chain. …


  3. How to 'head' a text file in Ruby

    I wanted to just view the first 20 lines of a 10,000 line CSV file returned by an API in a Ruby on Rails project I’m working on. Here is the chain of Ruby commands I came up with to effectively ‘head’ the CSV document returned. …


  4. Objective C Notes

    I’m exploring Objective C right now. There are some things that I notice and am curious about, so I’m going to note what I find here. …


  5. Recommended Sublime 3 Packages

    If you haven’t already switched to Vim, and you’re hacking everything out from the command line, you might want to check out Sublime Text 3. Sublime Text is supported for Mac, Ubuntu, and Windows. …


  6. Setting up PostgreSQL for Rails

    I’ve always used either SQLite (the default) with new Rails projects, or I’ve used MySQL because I’ve been using it ever since 2002 when I started doing web development with PHP. Recently however I was challenged with deploying an application to Heroku as part of a code challenge I’m taking part in. Unfortunately, Heroku doesn’t support SQLite, and recommends PostgreSQL. Rather than waste time trying to create a MySQL app and running into problems, I’m going to go the easy route and use PostgreSQL. …


  7. ComputerName: not set

    I recently installed Oh-my-Zsh on a new Macbook Pro running Mountain Lion. When I opened up my terminal, I received the message “ComputerName: not set”. …


  8. Bundler Definitions

    I’m currently starting work on a Ruby gem, ‘annotate_gemfile’, that will grab the title, description, homepage URL, or source URL for every defined gem, and then add them as an annotation / commented for each gem definition in the Gemfile. …


  9. Yard Documentation

    Here are my own notes for using Yard to provide the Ruby API documentation and other notes for your application. …


  10. Exploring Bundler Commands

    You may be used to using ‘bundle install’ or ‘bundle exec’ often, but here are some commands you might have forgotten about or never heard of. …