Archive for the ‘Beautiful Code’ Category

Favourite code

Posted by Rahoul Baruah on November 12th, 2009 under Beautiful Code, General, Ruby on Rails and Software Development Tags: , , , , ,  •  Comments Off

I think Bigwig has become my favourite bit of code that I’ve ever worked on.
Before Bigwig, it was Object Factory, before that it was a Delphi class that I used to create tree-structured data (imaginatively called TNode).
Bigwig’s doesn’t have a test suite and it’s not even my code – it was [...]

Free Software and Brightbox

Posted by Rahoul Baruah on March 9th, 2009 under Beautiful Code, General Tags: , , , ,  •  Comments Off

I’ve just done a quick post at the Brightbox blog detailing their use of free and open source software and showing some of the free Brightbox projects.
In particular, Warren & Bigwig and Object Factory could be of use to many people and are probably worth a look.

MVC: A brief history of Models, Views and Controllers

Posted by Rahoul Baruah on January 31st, 2009 under Beautiful Code, Designing Great Software, Smalltalk Tags: , , , ,  •  Comments Off

Any web-developer Rubyist knows about models, views and controllers. The MVC paradigm is embedded in the structure of Rails and Merb and encouraged by Ramaze and Sinatra. If you’re a Mac developer or an iPhone bod then MVC is common practice there as well. Same goes for Sproutcore and even Microsoft is [...]

The curious case of beauty in Ruby (or Rails vs Merb part 2)

Posted by Rahoul Baruah on December 27th, 2008 under Beautiful Code, Designing Great Software, General, Ruby on Rails and Software Development Tags: , , ,  •  8 Comments

I’m sure you’ve all heard the Rails 3 announcement. When I first found out my initial reaction was “fuck me“. But shortly after I was filled with a feeling of dread and general unease. And I didn’t know why ….
Firstly, a bit of history.
I first tried programming on a Commodore [...]

Acceptance Testing in Ruby, Rails, RSpec and Cucumber

Posted by Rahoul Baruah on November 21st, 2008 under Beautiful Code, Designing Great Software, Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: , , , , ,  •  Comments Off

I’ve written up a new post at the Brightbox blog detailing how we are using RSpec and Cucumber to build acceptance tests for the next generation Brightbox systems.

Loading the MySQL drivers into GNU Smalltalk

Posted by Rahoul Baruah on November 14th, 2008 under Beautiful Code, Smalltalk Tags: , ,  •  2 Comments

It’s an unfortunate fact that many Open Source projects have documentation that is sadly lacking. A case in point is GNU Smalltalk.
Smalltalk is one of my favourite languages but a decent Smalltalk implementation that fits with your native window manager is hard to find. The point of GNU Smalltalk is that [...]

Showing the Git branch in your bash prompt

Posted by Rahoul Baruah on October 29th, 2008 under Beautiful Code, Writing Reliable, Bug-Free Code  •  2 Comments

y first adventure in source control was many years ago. It was my first proper job and I was the sole developer in a tiny company. To keep the source code safe, it was all stored on a network share, and the file server was backed up at least once a day. [...]

The Specification is the Documentation Part Two

Posted by Rahoul Baruah on August 5th, 2008 under Beautiful Code, Designing Great Software, Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code  •  Comments Off

Two (related) thoughts on “The Specification is the Documentation“.
One of the things that I like to do, when developing, is to start with a sketch (you know, with 95g/m2 paper and a 6B pencil) of how the UI will look. There are two reasons for this. Firstly, it helps communications with the client [...]

The Specification is the Documentation

Posted by Rahoul Baruah on August 1st, 2008 under Beautiful Code, Designing Great Software, Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code  •  1 Comment

In a former life I used to write “functional specifications”. These were long, dense, hard-to-read documents that detailed what an application (not yet written) was supposed to do. I would spend (literally) weeks typing these things up, the customer would read it, think they understand and I would quote them based upon the document. [...]

Setting up a mock object to test a :dependent => :destroy association in RSpec and Rails

Posted by Rahoul Baruah on July 10th, 2008 under Beautiful Code, Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code  •  Comments Off

One of the great advantages of using mock objects to test and specify your objects is that you concentrate solely on the thing you are testing.  
If you weren’t using mocks to tests that a controller re-shows the “new” form if given an invalid object, you would do post :create, :model => { … } where [...]