Tossed Salad

June 15th, 2006

I’ve been keeping myself user busy the last few weeks and haven’t made the time to post anything.

  • RailsConf 2006 is only 5 days away. I'm flying. While the ArgonExpress would be a good opportunity to hang out with the cool kids, I can't stomach the thought of being stuck in on a train for several days. I hope they make it to Chicago alive.
  • The server migration is almost complete. Last night I installed lighttpd on the new box, setup Apache to proxy requests to the Rails sites running under lighttpd, and migrated all of the Subversion repositories. There is only one site left to move. Just waiting on the client.
  • I've written a lot of stuff in Rails over the last several weeks which may be useful to others. I'll try to package these up and post them before or during RailsConf:
    • Global unit tests: Tests that are defined in one place that will run for any ActiveRecord model with the right attributes. So far I have test_acts_as_versioned, test_optimisitic_locking, and test_fixtures_loaded_for_all_associations. The last one is very handy. It reflects on all associations and gives you a list of fixtures that need to be defined in each unit test.
    • Plugin: update_attributes_if_changed. Only updates the attributes if anything has changed. If you are using update_attributes on models with updated_at columns and acts_as_versioned you'll want this.
    • ActiveRecord synchronizer: One way synchronization with data transformations, conditions, defaults, etc. Very handy for synchronizing with legacy databases. Complete with DSL.
    • Datadumper plugin: Dump data in several format, but mosty used for dumping data into a format usable in migrations. Especially nice for prepopulating domain tables using migrations.
    • Validation: validates_association. Not to be confused with validates_associated. Validates_association validates that the associated object is of the correct class as specified in the association declaration.
  • Surprisingly, I found out that I really like watching soccer.

Dongle --> Sprocket

June 6th, 2006

Dongle, the venerable old web server that has served well for the last several years, is being replaced with her younger sibling Sprocket. I should have all the sites moved, along with all the subversion repositories and other stuff within a week or so. If you have your site on Dongle and I haven’t contacted you about the migration already, expect to hear from me soon.

This site has already moved, and the code highlighting plugin for Wordpress is not functioning. I’ve turned it off for now. Everything looks good as far as I can tell. Shoot me an email or leave a comment if anything looks wonky.

Back

May 27th, 2006

Back from Kauai. Maybe some pictures tomorrow.

YourSQL for Intel based Macs

April 20th, 2006

If you’re a fan of the YourSQL utililty for MySQL, and you’ve recently switched to an Intel based Mac you’ve probably found that it runs slowly (or not at all) under Rosetta. I’ve compiled an Intel only binary and am making it available here. This is the latest development build (1.8.0e). Just open the disk image and drag the YourSQL icon to your Applications folder.

You can download here, or click on the icon to download:

Miraculous Rails

April 18th, 2006

If you’re heavily using the AJAX helpers in Ruby on Rails like I am, you may want to check out Thomas Fuchs’ awesome presentation from Canada on Rails 2006.

You may find a few little tasty morsels that aren’t adequately (at all?) documented.

My favorite? Call your own. Although… respond_to is a close runner up, though I’ve been aware of it for a whie now.

BTW- If you are still building new sites/application in PHP, can I just ask… WTF?