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!
Tuesday, April 25, 2006
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
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
Thursday, March 23, 2006
A Revised National Anthem for Australia
To celebrate the 10th anniversary of the most pathetic government in Australia's history (I mean, really, how you can keep a straight face sending troops to Iraq while funding the Iraqi regime via the AWB and locking up those who flee the chaos and seek asylum with no legal recourse is quite beyond me), I hereby present a revised national anthem in Little Johnny's honour. Just in time for the happily frequent renditions at the Commonwealth Games:
by James Ross
Australians all let us rejoice
For we are rich and white
With golden soil and lust for oil
We reckon she'll be right
Our land abounds in nature's gifts
We've never learned to share
In history's page let every stage
Advance whose skin is fair
Beneath our radiant southern cross
We'll toil with hearts and hands
To make sure noone different
Sets foot upon our lands
For those who come across the sea
We've prison cells to spare
With courage let us all combine to
advance whose skin is fair
In joyful strains then let us sing
advance whose skin is fair
Copyright © 2006 James Ross. All Rights Reserved. Of course. This machine kills fascists.
We now return you to your regularly scheduled program of agile software development....
"Advance Whose Skin Is Fair"
by James Ross
Australians all let us rejoice
For we are rich and white
With golden soil and lust for oil
We reckon she'll be right
Our land abounds in nature's gifts
We've never learned to share
In history's page let every stage
Advance whose skin is fair
Beneath our radiant southern cross
We'll toil with hearts and hands
To make sure noone different
Sets foot upon our lands
For those who come across the sea
We've prison cells to spare
With courage let us all combine to
advance whose skin is fair
In joyful strains then let us sing
advance whose skin is fair
Copyright © 2006 James Ross. All Rights Reserved. Of course. This machine kills fascists.
We now return you to your regularly scheduled program of agile software development....
Saturday, December 24, 2005
Signal to Noise Ratio in Rails
Like all the other Mac-toting fashion hounds, I've been playing with Ruby on Rails of late. I have the good fortune of having a buddy who has a paying gig building a Rails site and he is kind enough to give me commit rights so I can use it in a meaningful way without giving up my day job as a J2EE guy, and without having to find an excuse to use it at work.
Without getting all hysterical about it, there are many things in Rails that should give pause to the J2EE crowd. When I switched from C++ to Java, the thing I liked most about coding in Java was the much improved signal-to-noise ratio compared with C++. I found I spent much less time thinking about computer stuff and much more time thinking about the problem at hand and the concepts of the problem space, largely ignoring the problems of the implementation space. This was partly the language, partly the libraries, and partly the community around Java at the time, but when you add it all up, the result was better software faster, which is really all I want.
Now, having used the classic J2EE stack for a while (Struts/Tiles/Hibernate, et al), and having watched J2EE vendors bloat their products to the point of collapse, using Rails has given me the same feeling. No struts-config.xml, no tiles-defs.xml, no *.hbm.xml files, and much less time thinking about the machine and its implementation layers. The signal-to-noise ratio is simply better than in the form of J2EE I've learned. Ruby/Rails also appear to have the libraries and the community to make the whole stack work. The whole setup feels more supple and malleable than Java, and, since that feeling was what attracted me to Java, that has to be a concern for those who think Java is some kind of universal maximum, rather than just a local one, as all technologies are.
There are some things in Rails about which I retain mixed feelings. ActiveRecord seems to me to be less of an O/R mapping layer, and more of an O/R unification layer. This caused me severe brain ache for a while, but I'm suspending disbelief for the moment. The unit testing model involves database access (and lots of it), which is a definition of unit testing I've always disliked strongly. The functional testing model (so far as I have looked) doesn't use a model based on parsing and filling out and submitting the HTML forms served by the running application. It appears to be more a controller-testing setup than what I would call a functional testing setup. But I'm only a newbie and might have missed some stuff.
Without getting all hysterical about it, there are many things in Rails that should give pause to the J2EE crowd. When I switched from C++ to Java, the thing I liked most about coding in Java was the much improved signal-to-noise ratio compared with C++. I found I spent much less time thinking about computer stuff and much more time thinking about the problem at hand and the concepts of the problem space, largely ignoring the problems of the implementation space. This was partly the language, partly the libraries, and partly the community around Java at the time, but when you add it all up, the result was better software faster, which is really all I want.
Now, having used the classic J2EE stack for a while (Struts/Tiles/Hibernate, et al), and having watched J2EE vendors bloat their products to the point of collapse, using Rails has given me the same feeling. No struts-config.xml, no tiles-defs.xml, no *.hbm.xml files, and much less time thinking about the machine and its implementation layers. The signal-to-noise ratio is simply better than in the form of J2EE I've learned. Ruby/Rails also appear to have the libraries and the community to make the whole stack work. The whole setup feels more supple and malleable than Java, and, since that feeling was what attracted me to Java, that has to be a concern for those who think Java is some kind of universal maximum, rather than just a local one, as all technologies are.
There are some things in Rails about which I retain mixed feelings. ActiveRecord seems to me to be less of an O/R mapping layer, and more of an O/R unification layer. This caused me severe brain ache for a while, but I'm suspending disbelief for the moment. The unit testing model involves database access (and lots of it), which is a definition of unit testing I've always disliked strongly. The functional testing model (so far as I have looked) doesn't use a model based on parsing and filling out and submitting the HTML forms served by the running application. It appears to be more a controller-testing setup than what I would call a functional testing setup. But I'm only a newbie and might have missed some stuff.
Tuesday, November 22, 2005
Brain Fade?
How can the most important application I have be so neglected by its creators? I've been waiting a year and a half for a new version of Personal Brain and this is what I get - half a dozen fixes to bugs I hadn't noticed and not a single new feature. One of the highlights is that they've updated their phone number because they moved offices! I don't know if this company is starved for resources, but if ever there was a company that deserves some, this is it. I hope I don't jinx them and they get snapped up by Microsoft and ruined, but this slow death is possibly worse!
Friday, October 28, 2005
Now we're cooking
I've only recently started using a laptop all day every day, so I thought it was time to put to use a trick shown to me by some buddies for making the all-day laptop experience a lot more ergonomic. So a quick trip to the homewares store for a cook book stand, and bingo! You've got the screen at eye level. Check out the picture for an idea of how it works. You need to invest in an external keyboard and mouse, of course, but it's the poor man's docking station. Start a fashion trend in your cube farm today!

Thursday, October 27, 2005
Flat Out in First
Imagine you're driving from one side of the city to the other with a friend and you're in a big hurry. You're running really late and you're desperate to get where you're going. To your amazement, your friend sets off down the road and puts the pedal to the metal in first gear. He's gripping the wheel, concentrating fiercely, the engine is screaming, and you're being overtaken by every car on the road, doing about 30kph.
You say to your friend, "Hey, don't you want to go into second gear?"
But your friend says, "Don't interrupt me, man, I'm going as fast as I can and I really need to concentrate here"
You try again. "But we'll get there faster if you change gears!"
But your friend says, "No we won't! I tried that before and putting in the clutch __definitely__ slows you down, silly! And the last thing I can do now is slow down when we're running so late!"
The problem with development teams is that you can't actually hear the engine screaming and see the car shaking and feel the lack of speed. But it seems to me a lot of development teams are flat out in first gear. Agile development has a lot of practices that are all about changing gears.
You say to your friend, "Hey, don't you want to go into second gear?"
But your friend says, "Don't interrupt me, man, I'm going as fast as I can and I really need to concentrate here"
You try again. "But we'll get there faster if you change gears!"
But your friend says, "No we won't! I tried that before and putting in the clutch __definitely__ slows you down, silly! And the last thing I can do now is slow down when we're running so late!"
The problem with development teams is that you can't actually hear the engine screaming and see the car shaking and feel the lack of speed. But it seems to me a lot of development teams are flat out in first gear. Agile development has a lot of practices that are all about changing gears.
Subscribe to:
Posts (Atom)