Jared's Weblog

Main Page - Books - Links - Resources - About - Contact Me - RSS

Jared Richardson Most Popular
Help! I've Inherited Legacy Code
Testing Untestable Code
Continuous Integration... Why Bother?
Mock Client Testing
The Art of Work
Technical Idiot Savants
Targetted Skills Aquition vs Free Range Chickens
The Habits of Highly Effective Developers

Blog Archive

Thu, 20 Apr 2006

Tips for Writing a Ruby On Rails Database Adapter

I've been working on a Ruby database driver for Ingres. Most of the work has been in C, but I finally have my Ruby code (via C) fetching data from the database.

Now I'm starting on the Ruby on Rails portion. It involves adding a lot of additional calls that I didn't have in place. It's actually a pretty big test suite to get your head around. I'm sure it'll be simple once I understand it all. :)

I met Mike Laster at a local Ruby meetup. He's writing a Rails adapter too (small world!) and he's been giving me a few hints. I thought I'd pass on a few of them.

Build against the stable version first so you don't have a moving target. Once you pass 100% of the tests, then work on integrating it into the trunk code.

When you run the unit tests, it is easier during development to focus on one unit test at a time instead of getting flooded with thousands of errors at a time.

The trick I use is:

- Change to the rails/activerecord/test directory
- run "ruby -I "connections/native_frontbase" adapter_test.rb -v

adapter_test.rb seems to be a good one to start with. If it doesn't pass 100% there is no hope of any other test functioning.

The first few that I remember needing to pass were:

The other tests tend to fall into place once these are working.

Hopefully this will help out a few other people as well.



posted at: 19:56 | path: | permanent link to this entry

Looking For a Job? Evoca is Hiring.

One my college buddies, Eric Star is at Evoca, a very cool startup. I'm not going to try to tell you everything they do... I'll just say that they let you post audio "blogs" and make them searchable. There are free accounts and professional level accounts as well.

Here's an article about them over at TechCrunch.

Eric and I recently talked and he asked if I knew anyone looking for work. He wants some JSP experience as well as some database background. Telecommuting doesn't sound like it would be a problem for the right candidate.

Here's an Evoca clip of Eric describing the job himself. :)


Here's a text description as well.

Evoca.com is Seeking a Java/JSP Developer Our startup (warning, marketing term follows :-) ) web 2.0 team is looking for 2 Java/JSP Developers (full time hours) who can join us to help develop and enhance an existing web application. The developer should have a solid understanding of developing web applications and be able to solve bugs and generate new developments based on project scopes. This position requires the ability to use your own computer as a development environment since the position would mostly involve telecommuting. We are still in "seed money" stage and are aggressively seeking VC so this will not be a top dollar gig and all positions at this point are Contract based.

posted at: 08:52 | path: | permanent link to this entry