Railsconf => 4 tracks; JavaOne => simultaneous 14 tracks!!

Posted by Dr Nic on April 27, 2007

MyConfPlan now includes all the sessions for next month’s JavaOne conference. It is huge! 400+ sessions, with up to 14 simultaneous sessions.

I’m going to JavaOne 2007

Remember to go see Charles Nutter’s JRuby session.

Railsconf – the sessions I’ll be attending

Posted by Dr Nic on April 26, 2007


http://myconfplan.com/conferences/RailsConf2007/users/drnic

Dr Nic's conference selections

This is a new site called MyConfPlan, built using Hobo, on Rails. Hobo is awesome, but more on that another day.

MyConfPlan came about from the following thought sequence:

  1. Stupid Railsconf schedule is too hard to read
  2. Needs to be a table, yeah I should do that [Meanwhile, elsewhere on the InterWeb, another man tackles this problem too]
  3. Oooh, it would be cool to click on the sessions and select them
  4. And then I could show them off [as above]
  5. And other people could do that too
  6. And I’ll make MILLIONS OF DOLLARS!!!!

Going to RailsConf Europe? JavaOne? the local FooBarCamp or Unconference? You could use MyConfPlan to setup the schedules. If you’re organising an Unconf, soon you’ll be able to tick a box and all attendees can add/edit sessions. Neat indeed!

Going to RailsConf?

Use the comments below if you want to discuss Railsconf schedule or future MyConfPlan features. Or to adorn me with non-specific praise.

Not Going to RailsConf?

Be a devil – pretend to go to the conference. Click some buttons, select some sessions. You can cancel your attendance later.

An Interview with Dr Nic

Posted by Dr Nic on April 17, 2007

Do you want answers to questions like:

  • What do you think about the current Twitter vs DHH discussion?
  • How did you come by with the Magic Model solution?
  • What does the New Gem Generator actually do?
  • Will we see ‘Rails Distros’ in the long run?
  • Where are you from? What’s your current day job, is it Rails related? And what’s your history with Rails?
  • Did you get your free t-shirt?

Brazilian Fabio Akita – author of the first Brazilian book on Ruby on Rails also wanted to know, so he asked.

Thanks to my friend Carlos Eduardo for teeing it up.

Go to interview

Aliases to the latest branch folder you’re working on

Posted by Dr Nic on April 16, 2007

For my Rails and RubyGem projects I’ll run multiple branches plus a trunk. The trunk represents the live, public/production code, and the branches represent new features being developed [1]. So if I’m working on a branch for a feature, and I open a new terminal shell, THAT’s the working folder I want to go to, not the trunk, nor any other branch. Just that one.

Even for small gems and projects where I have no branches, just a trunk, I want quick ways to get to the working folder. [2] You know, the branch I was just working on two seconds ago.

So, if I have a project (rails app or gem) called wizzo, and I’ve checked out the trunk and some branches into a common folder:

  • /path/to/wizzo —trunk
  • /path/to/wizzo_feature1 —branch for feature1 (Last touched)
  • /path/to/wizzo_feature2 —branch for feature2

OR, if I checkout the trunk and all branches into one folder:

  • /path/to/wizzo/trunk —trunk
  • /path/to/wizzo/branches/feature1 —branch for feature1 (Last touched)
  • /path/to/wizzo/branches/feature2 —branch for feature2

I want an alias wizzo to take me to /path/to/wizzo/branches/feature1 if that is where I’m working at the moemnt.

If you want this too, do the following:

$ sudo gem install latest_branch

And for each folder that contains your projects, add the following to your .profile:

alias_all_projects --path=~/Documents/rails_apps/
. ~/.project_aliases

And this will generate many wonderful, dynamic aliases for you.

See the latest_branch website for the ins-and-outs, and its helper app latest_branch.

[1] At work – a non-ruby/rails, billing system on CVS – we do it differently. The trunk is for development of all new features, and production releases are tagged, and also branched for critical fixes. But the above code would be useful for both situations.

[2] Lucky zsh shell users can do fancy stuff like map folders to ~proj folders, and use autocomplete, such that cd ~p/t might go to ../proj/trunk. Neat.

“Reads -> slaves, writes -> master” plugin

Posted by Dr Nic on April 15, 2007

Another solution to multiple connections in Rails has been put together by the Revolution Health team.

Look at this sweet database.yml syntax:

dbs:

  database: master_db
  host: master-host

  read_only:
    database: slave_db
    host: slave-host

ActsAsReadonlyable adds support of multiple read-only slave databases to ActiveRecord models. When a model is marked with acts_as_readonlyable, some of AR finders are overridden to run against a slave DB. The supported finders are find, find_by_sql, count_by_sql, find_[all_]by_*, and reload.

README all about it.