
Listen to music, look at photography, bicycling, or read ramblings below.
Balloon Maker
France, June 2009
A week in France with my mom. We flew over the Atlantic — the plane had headrest monitors powered by Linux showing our position — then took a train through Barcelona to Cerbère on the French border. Loved it there. Little hostel right by the water.
From Cerbère we made our way inland to Caunes Minervois to stay with Steve and Marilyn: a wonderful little village with cobblestone streets, a 14th century house, and a Roman aqueduct. They were incredible hosts — cooked rabbit with a 2000 vintage opened at 9am, decanted at 5, served at 8. We also drank a 1996. Best wine I’ve ever had.
Day trips to Carcassonne’s La Cité: the church, stained glass on the ceiling, narrow streets, and views overlooking the city.
We also made it to Paris. The line for the Eiffel Tower elevator was long and it was rainy and cold, so we walked up instead.
Toro waiting for the canoe

Toro waiting for the canoe
Obligatory Self-Portrait

Obligatory Self-Portrait
Sunset Beach

Sunset Beach
View From My Old Apt

View From My Old Apt
Use "build", Not "new"
When working with multiple models and forms in Rails, your associations need to use
buildinstead ofnew. I never knew there was a distinction between the two. Apparently, I was wrong :\For example, this will not work when trying to validate the associations:
@account = Account.new(params[:account]) @user = @account.users.new(params[:user])The
newmethod doesn’t actually build the association. The@accountwill be saved, but the@userwon’t be if it fails validation.Using the
buildmethod will automatically take care of the transactional part for us so the@accountobject won’t be saved until both models are valid:@account = Account.new(params[:account]) @user = @account.users.build(params[:user])It’s handy in the controller too. Instead of calling both
@account.saveand@user.save, you simply call@account.saveand it saves the@userassociation.Hubble's Greatest Discoveries
- virtually all major galaxies have black holes at their center
- discovering that the process of planetary formation is relatively common
- detecting first ever organic molecule in the atmosphere of a planet orbiting another star
- and providing evidence that the speed at which the universe is expanding is accelerating–caused by an unknown force that makes up more than 75 percent of the universe
Michael Scott Quote Mac OS X Widget
Rails and exception_notification with McAfee's ScanAlert Subnet Masks
consider_local "64.14.3.193/26", "64.41.168.241/28", "216.35.7.96/27", "64.41.140.96/27", "216.49.80.10/32", "165.193.42.64/26", "165.193.42.128/26", "203.82.140.96/28", "210.59.224.251/32", "210.61.79.253/32", "203.66.219.16/32", "85.92.223.0/26", "217.169.58.64/26"Plop that below the inclusion of the ExceptionNotifiable module and you’ll never get pesky emails from McAfee’s ScanAlert barrage.
Text Editor Timeline
I just realized after seeing a post about Redcar (a programmer’s editor for GNOME) that I am uninterested in finding new editors. This used to be something I was desperate to find because I could never get vim to work right for me. I remember trying all kinds of editors like scream, BlueFish, and Kate. All never really sunk in with me.
Here’s a timeline of my use of text editors:
1. Notepad
2. EditPlus
3. Dreamweaver
4. VisualStudio
5. TextMate
6. VimI feel as though it’s an obligatory crescendo that all developers must play. The desire to find more powerful tools to help them with their daily tasks. It inevitably falls back to the basics. The tried and true editors that have been with us since the dawn of personal computing.
It does feel good knowing that I never will need to go find another editor ever again.
Pier '09

Pier ‘09
Ft. Pickens

Ft. Pickens
Pier 09

Pier 09
Rails and Ordering by Query String Params
I needed a reusable way to do query parameter ordering. Currently in our admin section, we use clickable table headers to sort by ascending or descending. It looks something like this:
Using attr_encrypted with Rails
attr_encrypted is a dead-simple way to two-way encrypt information in your database. In our latest project, we are storing social security numbers, so obviously we needed an encryption solution.
I started off with EzCrypto because I had used it in the past. It worked fine, but I came across attr_encrypted and it seemed more elegant.
I had some problems getting it working, namely getting it included (or required) correctly. Before your class definition, simply put:
require 'attr\_encrypted'and you should be good to go, considering you installed the gem.
Another, more elegant way of making sure the gem is required properly, set it as an environment option:
config.gem 'shuber-attr_encrypted', :version => '~> 1.0.8', :lib => 'attr_encrypted', :source => 'http://gems.github.com'In our case, we have a Customer model. This Customer models needs to store encrypted social security numbers. When I first created the Customer migration, I assumed this column would be called ‘ssn’. I had troubles working with attr_encrypted because it has some conventions that I must have overlooked in the documentation.
In order to use it correctly, the column in the database needs to be named ’encrypted_ssn’. When you specify which column is to be encrypted with the attr_* method, you are essentially creating a virtual attribute that is used to encrypt/decrypt the actual data.
Hope this helps someone who is having similar problems.
Bayfront
One early morning at Bayfront Park. So ominous, yet so peaceful.
Photos

Lily Outside

Another glitch looms over the U.S.

Another glitch looms over the U.S.
