home

Boost Blog

Archive for the ‘Development’ Category

October 27th, 2009

How the west was clustered

Posted by jeremy on October 27th, 2009
Screen shot 2009-10-27 at 9.20.25 AM

A cluster on IntuitionHQ

Our new product, IntuitionHQ, shows clusters of clicks on an image. To generate these clusters we made use of a gem called Hierclust. The great thing about this gem is it’s simplicity – just input the points and a minimum cluster separation, and out come the clusters.

The problem with Hierclust was the performance. With fewer than 100 points to cluster Hierclust was running too slow to do it dynamically. This was no problem, we moved the clustering program into a cronjob and stored the data in a marshalled file.

However, in testing we found that Hierclust was still too slow. Once we had over 200 points being clustered it started taking minutes to process – an unsustainable amount of time for the data we expected. The graph below shows the timings, which I believe is O(n3). We had to disable cluster processing while looking at the problem due to issues it was causing on the server.

Screen shot 2009-10-27 at 10.14.36 AM

Graph of points v time taken

more »

 
Tags: rails, ruby
Posted in: Development
1 Comment
 
September 15th, 2009

What should break the test?

Posted by jeremy on September 15th, 2009

I recently came across FakeFS, which sounds like a great idea for helping to test file functions. However, I did pick up on the following off the website:

[...] it means replacing our mkdir call with a call to mkdir_p won’t break our tests. Because, really, it shouldn’t.

Now I understand that in the context of the example given, mkdir and mkdir_p should do the same thing. But mkdir and mkdir_p do perform different operations, and the tests should break if mkdir_p is changed to mkdir. If you change mkdir_p to mkdir and your passing tests don’t fail then your tests aren’t correct.

 
Tags: ruby, tdd
Posted in: Development
No Comments
 
September 11th, 2009

Squirrel and the custom nut matcher

Posted by jeremy on September 11th, 2009

I recently found squirrel, and I wanted to use it for a project we’re working on to simplify some complex finder statements. Squirrel allows turning something like this:

Task.find(:all,
  :conditions => [
    'active = ? and (updated_at > cache_version or cache_version IS NULL)', true
  ]
)

into:

Task.find(:all) do
  active == true
  any do
    updated_at > cache_version
    cache_version.nil?
  end
end

The problem is testing

Then I ran into a serious problem – how to test this piece of code using rspec? Here was my first attempt: more »

 
Tags: rails, rspec, ruby, tdd
Posted in: Development, Ruby on Rails
2 Comments
 
August 20th, 2009

Choosing which database indexes to add

Posted by jeremy on August 20th, 2009

When writing a Rails application, how do you decide on the best indexes to add to your database? It might seem obvious, especially if you work on a project from scratch. The problem is a little harder when you come to optimize an existing codebase.

New Relic

Recently I’ve been using two methods to work out where to put indexes. Firstly I’d strongly recommend using New Relic RPM in development mode. When running your application you can visit /newrelic to get all kinds of useful information. Here you can see the most recent rails calls:

Picture 4

more »

 
Tags: mysql, rails
Posted in: Development, Ruby on Rails
2 Comments
 
August 11th, 2009

Using Litmus to integrate cross-browser testing into our workflow

Posted by Nathan on August 11th, 2009

Cross-browser compatibility issues are the bane of web developers world-wide and in this ever shifting landscape it is important to have processes that integrate cross-browser testing in a robust and systematic way. Over the last 9 years we have evolved a robust workflow for web development and cross-browser testing is an integral part of this.

An overview of the process

We start by constructing the HTML/CSS in a text editor (Textmate, RubyMine IDE or Aptana IDE) and viewing it in Firefox. We develop standards compliant HTML/CSS, so Firefox is a great starting point as it supports the CSS standards well and enables us to use a number of key tools including Pixel Perfect, YSlow and the Web Developer toolbar.

Once we are happy that the design is accurately implemented in Firefox we use Litmus to create screenshots across a selection of Browser/Operating System combinations. Litmus has a number of great features that really make this process easy. Firstly, you can retest the page with a simple button click and Litmus keeps track of the revisions, secondly Litmus uses the W3C validators to check that the HTML and CSS validate and links trough to the error pages and thirdly Litmus lets us indicate visually whether a particular combination is rendering correctly so we can keep track of what is complete and what remains.
more »

 
Tags: Quality assurance
Posted in: Cool tools, Design, Development
1 Comment
 
July 31st, 2009

Making your site Pixel Perfect

Posted by Nathan on July 31st, 2009

Here at Boost we lovingly handcraft our HTML and CSS when implementing our designs. We use text editors rather than programs like Dreamweaver or Frontpage. We find it’s faster, and it enables us to produce clean, correct code that’s easy to integrate.

Our process starts with the production of the designs in either Photoshop or Fireworks. Once these are approved by our client, we convert them to HTML/CSS templates before integrating them with the web application or content management system.

At the HTML/CSS stage we use two tools to ensure the design is being accurately implemented: Pixel Perfect and Litmus. Today I’ll focus on Pixel Perfect - I’ll talk about Litmus another time.

more »

 
Tags: Development tools, Firefox plugin, Quality assurance
Posted in: Cool tools, Design, Development
2 Comments
 
May 6th, 2009

Flex radar chart component

Posted by jeremy on May 6th, 2009

We’ve released a radar (spider, polar) chart component for Flex as an open source (MIT) project on github. This is abstracted from our Sonarhq product. For the most part we’ve been using the Flex Charting components from Adobe, but this doesn’t include radar charts. picture-5 We looked at several commercial packages, but these turned out to be either too expensive, or not flexible enough. There is a free component a vailable at Kap Lap, but it didn’t support the styles we needed to match the design we had.

In the end it was easier to produce our own (about a day and a half of work). The project depends on some common libraries we’ve developed at Boost over the last couple of years, which we haven’t decided on open sourcing yet, but we have included the binary under the same license so that the charting component can work. Here’s a demo and how to get going:

more »

 
Tags: flex flash as3 charting
Posted in: Development
22 Comments
 
March 20th, 2009

JRuby presentation for WellRailed

Posted by jeremy on March 20th, 2009

On the 25th of February ’09 I did a brief JRuby presentation on JRuby and how we’re using it at Boost. We’re really excited about some of the capabilities of JRuby.

We’re running a client deployment on Tomcat fronted by IIS, and it was really easy to get everything set up. We wanted to try another deployment on Glassfishv3 with no webserver in front. Unfortunately (and glassfishv3 is still in development) there were two barriers that prevented us doing so more »

 
Tags:
Posted in: Development, Ruby on Rails
No Comments
 
Newer Entries »
  • Categories

    • Agile (26)
    • Agile Coaching (1)
    • Business (4)
    • Cool tools (6)
    • Design (7)
    • Development (18)
    • Drupal (1)
    • e-Learning (70)
    • Magic & Delight (6)
    • Publishing (3)
    • Random thoughts (9)
    • Ruby on Rails (9)
    • Scrum (11)
    • Social media (9)
    • Usabilty (4)
    • Writing (1)
  • Archives

    • April 2012 (1)
    • March 2012 (1)
    • February 2012 (3)
    • January 2012 (3)
    • November 2011 (4)
    • August 2011 (5)
    • July 2011 (1)
    • June 2011 (2)
    • May 2011 (4)
    • April 2011 (1)
    • March 2011 (1)
    • February 2011 (1)
    • November 2010 (1)
    • October 2010 (1)
    • September 2010 (3)
    • August 2010 (4)
    • July 2010 (6)
    • June 2010 (2)
    • April 2010 (1)
    • March 2010 (1)
    • February 2010 (1)
    • January 2010 (3)
    • December 2009 (1)
    • November 2009 (1)
    • October 2009 (4)
    • September 2009 (2)
    • August 2009 (3)
    • July 2009 (6)
    • June 2009 (3)
    • May 2009 (1)
    • April 2009 (6)
    • March 2009 (6)
    • February 2009 (11)
    • December 2008 (4)
    • November 2008 (6)
    • October 2008 (12)
    • September 2008 (7)
    • August 2008 (7)
    • July 2008 (4)
  • Boost Loves Design

    • I love Typography
    • IntuitionHQ | easy website usability
    • OMG It even has a watermark
  • Follow me on Twitter
© Boost Limited.
All rights reserved.
CONTACT US
info@boost.co.nz
tel. (04) 939 0062
fax. (04) 939 0063

Level 6, 175 Victoria Street
PO Box 11504, Wellington
New Zealand