Rails 2.0 has been released

December 8th, 2007

Oh yes: Rails 2.0 has been released

For some tips on moving your codebase to version 2.0:

I’ll be moving some of my projects and will be blogging about my experiences.

Help Wanted: Advanced Slicehost with Capistrano

December 3rd, 2007

I’m looking for someone to help me with some advanced server setup adminstration.

I have configured a Slicehost VPS to deploy my applications, but I need to get MySQL Replication working, along with some Capistrano/Deprec Recipes to automate deployment and configuration.

If anyone is interested in some paid work, drop me a line:

Performance testing Mongrel and Rails with httperf and autobench

December 1st, 2007

I posted recently about my experiences with Slicehost, Capistrano and Deprec.

As part of my approach for migrating the Top Secret Project to Slicehost, I’ve been testing my new VPS using httperf and autobench.

Maybe it’s just me, but performance testing and statistics is a whole lot of fun.

My 256 Slice running Apache proxied to two Mongrel instances peaks at about 41.6 requests/second, but can handle about 40 req/sec as consistent average. The single instance averages about 15 req/sec but can burst up to 30.

I think 40 requests/second is more than enough for my needs at the moment … it provides a pretty good peak capacity, and with Slicehost you can always get more resources when you need them - running extra Mongrels is wonderfully straight forward, but can also create slice to act as a dedicated database host. The options are endless.

One useful lesson: your client connection makes a BIG difference to these tests.

On my laptop running a wireless ADSL connection, the results were all over the place. Running the tests from one of my servers with a much fatter pipe, gave consistent test results.
For more information on using httperf and autobench, this is your best friend: HTTP performance testing with httperf, autobench and openload

Capistrano, Deprec: Best Things Ever

December 1st, 2007

I signed up for a slice on Slicehost a little while ago (there’s quite a waiting list, which is a good sign).

I’m planning on moving some stuff from a local provider to Slicehost, but wanted to experiment first.My current host is a CPanel VPS and it’s proved a little challenging to get that configured for Rails - CPanel doesn’t provide great support out-of-the-box, so it’s all manual, but with the added complexity fo having to work with CPanel’s configuration. I’ve only been able to get a single Mongrel instance running, because CPanel doesn’t support Apache 2.2.x.

System Administration is definitely the weakest part of my skill set - I have always been focussed on the code, and have had the advantage of working with dedicated sys admins - so configuring a VPS from scrach is a little daunting.

Enter Capistrano and Deprec to the rescue.

These tools automate the installation of your Rails stack and deployment of your applciation from Subversion (or GIT, or whatever is hot this week).

The basic steps:

cap setup_admin_account_as_root
cap setup_ssh_keys
cap install_rails_stack
cap deprec_setup
cap deploy_with_migrations
cap restart_apache

And that’s it, you’re done …

You bneed to create a deploy.rb file with your Apache and Mongrel configuration details and Cap will work the rest out.

It’s pretty incredible.

Slicehost has some detailed instructions for configuring Configuring Rails on Ubuntu using Capistrano and Deprec. The instructions pretty much worked out of the box for me.

RailsCamp 2.0

November 21st, 2007

RailsCamp is on this weekend. 40 uber-geeks gathered to immerse themselves in Ruby On Rails.
It should be pretty cool.

I haven’t prepared any materials, but might present something on Amazon Web Services - I did this for the Melbourne Ruby User Group a little while ago.

Converting a FaceBook App to use Amazon S3

November 16th, 2007

I’ve just completed work on another Facebook application: Songbook.

This was a relatively straight forward conversion of the existing application to use S3 for data storage. Songbook allows users to upload and display a song in their Facebook Profile. The original development stored the files on disk and hit limits really fast … hosting large numbers of files becomes very expensive very quickly, not to mention performance issues.

I converted the whole thing to S3 very quickly - it’s actually easier in some respects to handle storing files in S3 than to disk. The application now has essentially limitless and very cost-effective storage capacity.

S3 really is incredible.

New York, New York

November 12th, 2007

I’ve been living in Melbourne for 7 years now, and I have decidely itchy feet.

I moved to Melbourne for work just after the dot-com crash of 2000 and it was always meant to be a temporary stop on my way to New York, which I visited and fell in love with.

I think it’s time to get that dream moving again.

I am happy to work remotely to get a foot in the door, if that suits. Happy to sign up for a short-term contract if it gets me to your fair city.

So, if you’re in New York and need a developer with lots of experience, expert skills in Java, PHP and Ruby, and a penchant for user experience, drop me a line.

Software Federations - the philosophy of Web 2.0 can help solve issues in the Enterprise

October 26th, 2007

I’ve been pondering the recent spate of comments and discussions about the State of the Software Nation.

Enterprise Systems seem to be broken by design. As SvN declares: Enterprise Software Sucks because the buyers aren’t the users. Khoi Vin recently detailed some of the issues and Sig at Thingamy has been talking about the philosophy of contemporary business software for a couple of years, so none of this comes as much of a surprise.

However, the problem is much deeper and broader than the amorphous cloud of “Enterprise” applications. Lots of consumer-level software has real problems. Jeff at Coding Horror has been posting recently about the troubles with consumer software (Are Features the Enemy? and Why Does Software Spoil?) .
Small, Light, Vertical
———————————————————–

Web 2.0 is a terribly misused term, but the broad sweep of the “philosophy”, rather than the marketing hype is what I am referring to here.

The core ideas underpining Web 2.0 is that the web is a platform, driven by data and enabling systems and sites to be composed by pulling together features (http://en.wikipedia.org/wiki/Web_2).

At the moment we’re seeing the effects of this vision largely in social and personal applications - Flickr, Facebook, Twitter.

But

One of the most interesting recent developments is a slew of small, light, and tightly-focussed applications targeted toward very specific functions. One of the most well-known examples of such an application is the Basecamp Project Management tool.

Although most people seem to associate sites like Flickr and Facebook with Web 2.0, I think the real revolution is in these small vertical applications - common focussed on perfoming a single business function incredibly well. Coupled with elegant, sophistciated interfaces, most of this class of application also offer open access through an API.

Software Federations
———————————————————–

I propose thinking about your “enterprise” software as a loose federation of individual applications.

A Software Federation isĀ  a set of small, light, vertical applications coupled together.

Software Federation

Data flows between your applications through the use of APIs and process flows can be ad-hoc and are focussed on being “good enough” rather than being perfect. Ideally, the Federation is constructed with lightweight frameworks rather than high-end “Enterprise Platforms”.

One of the important ramificationsĀ  of this type of thinking is on the role of the developer. Software Federations require developers who are capable of both understanding the business and creating the code that ties the pieces together. There are some and opportunities here for Domain Specific Languages to help drive developmt and the advances in the handling of REST in Rails 2.0 look like making much of this style of development simpler.

The Republic
———————————————————–

I’ve been thinking about what would be required to assist developing Software Federations. Consuming APIs is already pretty simple and parsing XML data is very definitely a solved problem. What seems to be missing is a lightweight system for managing process flows - something that would allow developers to easily define a flow through an series of applications, combining many small simple scripts to massage and process the data into a single Software Federation. Although “lightweight” and “workflow” don’t really seem to go together - the workflow system I have experienced are all in the category of “Enterprise Software Sucks”, it seems like it may be possible to create a framework that provides support to developers.

What do you think?

Timesheets - the secret to software estimation for Freelancers

October 26th, 2007

I realised when I started developing projects as a freelance contractor that the real trick was going to be estimation. Software estimation is incredibly difficult, and the only real way of doing it effectively is through an empirical approach:

  • Guess
  • Measure
  • Refine your guess
  • Repeat until you approach accuracy/reality

I’ve been using 14Dayz to track my projects. The Free Plan is more than enough for a solo operator like myself. You can track up to 4 Projects with 10 Categories of work. Categories can have dollar values assigned, and you can generate reports in both time and total dollar values.

The reporting means I can track my budgets for individual projects, as well as track my weekly workload (good for figuring out if you can pay the rent, for example) and I can also gain a precise insight into exactly how long particular tasks take me.
On my current project I have only a couple of final pieces of work to go, and I am am currently only 5% off the budget. At the moment I think I will hit smack on the budget. Not too shabby.

Being able to estimate effectively means you can bid for project work with confidence that you will be on time, and on budget.

This is great for both you and your clients.

Now Hiring!

October 2nd, 2007

Been very swamped with contract work, but I have managed to roll a Facebook App called Now Hiring into production for Taleo.

I had a list of updates, but the blog died a horrible and fatal death, and I can’t for the life of me remember what they where.

Except pagination in Rails with will_paginate is so good it’s terribly terribly frightening