Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 16:59:00 GMT)

Canada on Rails

Posted by Thu, 17 Nov 2005 03:51:00 GMT

If you haven’t submitted your proposal for speaking at Canada on Rails, you should do that soon! I submitted my talk, “How to Explain Your Obsession With _Why to Your Grandparents” the other day. I’m pretty sure that it’ll be accepted and in April I will be explaining to you how I tried to explain _Why to my grandparents.

Actually, the title of my proposed talk is, “Sneaking Rails Into The (Legacy) System.”

If you haven’t submitted your proposal talk yet… head over here (canadaonrails.com) and do so. :-)

I still think that I should have submitted my first idea… but my peers convinced me otherwise. :-)

Heading to San Francisco, CA. Meet Up?

Posted by Thu, 17 Nov 2005 01:47:00 GMT

Jeremy and I are flying down to San Francisco (well Petaluma) tomorrow night for some on-site work with one of our Rails consulting clients. We will be driving back to San Francisco on Friday night and will probably have a few extra hours to kill on Saturday before we fly back to Portland at around 6pm. So, pretty much all day Saturday is open.

Anyone interested in meeting up with us on Saturday and talking about Ruby, Rails, or whatever? This will be Jeremy’s first visit to SF. :-)

If you have some pointers as to where two geeks that love free wifi + (coffee|beer) should go… please advise. We will be staying downtown… so things within walking distance of that area would be ideal.

Jeremy comes to Portland

Posted by Mon, 14 Nov 2005 06:05:00 GMT

I announced almost two weeks ago that Jeremy Voorhis was taking the position as Lead Architect at PLANET ARGON.

He’s been here for a week and a day now… and it feels like we’ve worked together for quite a long time already. When he hasn’t been coding in Emacs and working with the awesome Ruby on Rails framework, we’ve been wandering the city…. and yes, he’s been Powells! He claims to like Portland. :-)

I took a picture of him yesterday when he was discussing a clients project that we’re currently refactoring. The project comes to us with an existing schema, codebase, and opinions.

We’ve been working on several of these types of projects together in the past few months… which prompted us to deciding to start our project, Refactoring Rails.

It’s been great working with him in person. He, like some of the other developers that we call upon for some projects, had been assisting us through IRC, IM, and BaseCamp... and being able to be in the same office together… has been very beneficial.

In any event… I thought it would be fun to post a picture of Jeremy. :-)

Stay tuned…

P.S. You can see a drawing that Allison created of Jeremy on the PLANET ARGON about page.

There is a rumor that his mother photoshoped the drawing and put his head on the body of SuperMan. I beg you all to convince him to post ig on his blog. ;-)

...off to get some sleep.

Interviewed by CRN regarding Oracle, MySQL, and PostgreSQL

Posted by Sun, 13 Nov 2005 02:49:00 GMT

I was interviewed by CRN regarding my personal thoughts on how the release of Oracle Express might compete with MySQL and PostgreSQL.

Read the short article…

Oracle Express… {yawn}

Rails Migrations and PostgreSQL Constraints

Posted by Fri, 11 Nov 2005 15:42:00 GMT

A question was posed on the Rails mailing list concerning how one would go about adding CONSTRAINTs to the database tables with ActiveRecord::Migration.

One argument was raised stating that it is easier to handle these in plain SQL schema files. I disagree. :-)

Migrations to the Rescue

Databases evolve and I have recently found the Migration structure to be perfect for handling iterations and schema changes. Using the #execute method has helped move more of my code into the Ruby/Rails framework… and that just makes things easier to manage in the long-run. This is the approach that we are using at PLANET ARGON with some of our current client projects.

# db/migrate/6_add_foreign_key.rb
class AddForeignKey < ActiveRecord::Migration
  def self.up
    execute "ALTER TABLE bees ADD CONSTRAINT beehive_id_fkey FOREIGN KEY
(beehive_id) REFERENCES beehives (id);"
  end

  def self.down
    execute "ALTER TABLE bees DROP CONSTRAINT beehive_id_fkey;"
  end
end

This gives us an easy way to use the standard, #create_table syntax for building our tables with Ruby… and then we can slap these constraints on later.

This would add the constraints…

rake migrate VERSION=6
...run tests…
rake
...roll back…
rake migrate VERSION=5

I have found that this approach is really useful with testing in Rails. When I think that I have everything working great (without CONSTRAINTS in PostgreSQL), I run another migration to add a bunch of foreign key and data constraints to the tables and… run my tests again.

Let’s give Active Record a Hug

This has helped me gain some trust in Active Record while still giving me that comforting feeling that PostgreSQL is acting as the body guard for my data.

Even if you don’t end up using Migrations to handle these types of database schema changes, I would highly suggest that you model your implementation after this. I’ve worked with many database schemas and this just makes it easy to add your new change and run one command to commit it to the database.

...and now I go play with beehives…

PostgreSQL 8.1 was released!

Posted by Wed, 09 Nov 2005 23:21:00 GMT

Just a quick announcemnet:

Yesterday, the PostgreSQL team released version 8.1. Take a peak at the latest changes and enhancements.

Yes, we’re offering PostgreSQL 8.1 Hosting and Support for it now at PLANET ARGON. :-)

Older posts: 1 2 3