Tuesday, April 25, 2006

Joining the Rails fashion set

Last weekend Simon and Stuart The Blogless and I joined the fashion set by putting our first Rails application into production. It's a real estate web site for a beautiful part of Australia called the Southern Highlands (about an hour from Sydney). You can visit Campbell Jones Property for a look if you like.

A few features of the site:
* the constrained box design was chosen by the client so don't blame me!
* funky interactive map on the search page - go Stuart!
* little ajaxy forms to submit feedback without doing page refreshes
* main image on the property listing page changes as you hover over the thumbnails
* client-side scrolling of bio information on the meet the team page

A few 'behind the scenes' things:
* all the images are in a Postgres database but are cached by Rails as they are used
* images are uploaded in hi-res by the client and crunched on the server using ImageMagick to generate the various form factors required for the site - a real time saver for the client
* lots of admin screens for updating listings, team members, etc

A few lessons learned as a J2EE guy working on his first Rails app:
* Rails makes the backend stuff so easy that the pain in the butt becomes all about the HTML and CSS - by far the most painful part on such a pixel-perfect design like this. Normally on a J2EE app you don't notice because everything is that painful!
* Postgres rocks
* Rails caching is very cool. The site warms up nicely
* database migrations are good but you can't sustain writing them using model objects if your model is changing (which it will). So you're basically writing SQL for migrations, but that's ok
* some of the Rails association stuff is a bit weird, but the worst thing is some of the 'silent failures' you get when saving related records. Never a good idea.
* some of the Rails plugins are a bit naive. For example, acts_as_list, which lets a model include positional ordering, doesn't let you put a UNIQUE constraint in the database for the position column as the update code is not transactional. Hope to find some time to fix that one.
* Rails routes rock

So what's the conclusion about Rails? Is it perfect? Hell, no! Is it productive? Hell, yes! Does it beat the J2EE stack for database-backed web apps? By a country mile. I will not choose J2EE over Rails to build such an application, that's for sure. To be honest, it feels a little like the Mac/Windows discussions I find myself having reasonably regularly. To say something is way better than something else does not mean the thing is perfect. It just means it's better. Rails is like that - it's not perfect, it's just way better. I sincerely hope that Rails does not go mainstream or we'll all have to go find something else to be our competitive advantage. May the industry behemoths ignore Rails for many years to come!

Sunday, April 16, 2006

The 'Things That S**t Me' List

As a card-carrying member for several years of the cult of 'Getting Things Done', a way of running one's life that has proven hugely beneficial, I find that every year or so I tweak and extend the system in an effort to make it work better. For example, I've tried several different computerised systems to implement the GTD methodology, from Personal Brain to GTD Tiddlywiiki to Mind Manager. My latest incarnation is some hand-written shell scripts using a command line (bash shell) that runs on both Mac and PC and is super-fast to use. I'll blog about this in more detail some time soon.

But now I have stumbled across an enhancement to the methodology itself. If you're not familiar with it, it's basically a personal workflow system wit major steps: collect, process, organise, review, do. At first it's hard to get your head around how much work you have to do before you do any work! There are also several defined lists that you maintain, such as agendas for each person you interact with regularly, a list of things you're waiting for others to do, a 'someday maybe' list, next actions lists organised by context (such as home, work, online, travelling, out and about) etc, etc. The idea is that you capture everythhing (and I do mean everything), review it regularly and enable yourself to notch forward on many fronts in small increments in a context-optimised way just like a multitasking operating system.

So I offer to the GTD community my personal recommendation to maintain a 'things that shit me' list. Keep it up to date, capture new things into it often, review it every week, and use it as inspiration to make improvements. If you think I'm being flippant, think again. When you're angry, frustrated, stressed,or otherwise unhappy and the solution isn't immediately apparent, it's an effective short circuit just to name it, look at it next to all the other things that drive you nuts, and choose when you have the energy and time to pick some of them to turn into projects in your GTD system for improving your life. There is a very good feeling when you delete something from this list, let me tell you, and that's the real key. It's a smell if all you ever do is add to it, so make sure you pat yourself on the back each week by knocking something off your 'things that shit me' list. You'll be a nicer person to be around and that is probably the biggest benefit of all.

I assume you're interested in an example, so here's an excerpt from my current 'things that shit me' list:

The leaves in the skylight in the kitchen
I don't have enough storage space in the office at home
my house keys don't open the side door
the way my phone only starts telling you the battery is low when it has a minute of life left
I can't use my little dictaphone in bright sunlight 'cos I can't read the screen
the tree that overhangs the carport
I haven't figured out how to do my fortnightly trips with just a backpack
you can't get clip-on sunnies for my glasses
I'm not set up to scan things conveniently at home or at work
the handrail in the bathroom keeps falling off
the laundry door leaked in the last big storm we had
I never have time to play the drums
theres piles of mysterious crap in my book case
i am notsure if priorities in my gtd system should be related to projects or actions
i get so much comment spam on my blog
moving around the screen on the mac when the zoom is on is too slow
i cant print on my home printer when i'm connected to the vpn
the plumbago outt the front is out of control
wikiwords seems to have been turned off in the wiki
ruby barking drives us mad
the hard drive on the mac is just about full
i do not have a functional tickler file at least electronically
i have no way to track how much support work we're doing versus project work
we don't use a single issue tracking system
i can't print from the mac on my home network