Entries Tagged 'Development' ↓

New site launched – Spares Next Day

We are pleased to announce the launch of www.sparesnextday.co.uk – a site offering consumables like hoover bags and moving on to a vast array of other domestic spares.

The challenge here has been in presenting products like vacuum bags for sale in a way that allows the customer to find their exact item easily, whilst offering a broad range of both genuine and compatible choices.  With an off-the-shelf ecom application, this becomes more and more of a challenge as the product range expands.

Simple product filtering

The new filter on kiki jamesWe’ve just made the first release of product filtering for our client Kiki James. When filtering is done well, it can give customers, particularly those unfamiliar with your catalogue, a much better idea of what’s available and help them work out they want to buy. To get the best out of your sales conversion rate optimization investment, choosing the right A/B testing tool is very important, visit https://indexsy.com/shopify-ab-testing/ to learn more.
Continue reading →

What’s the point of HTML5?


The various reports and discussions around HTML5 in the past year have been a source of much confusion. In order to do my bit to help clear that up, I thought I’d offer a broad overview of what it is, and what it represents for the web.

Should I care and why?

Yes. But why? Well, there are a few ways to answer that, which I’ve tried to elaborate for you below.


One of the biggest differences between HTML5 and previous markup specifications, indeed between HTML5 and any other web standard, is the process that is being used to put it together. Generally web specifications are created by the W3C using working groups who draft specifications in a closed process that has left some people dissatisfied.

In a break with this convention, HTML5 has been developed externally to the W3C by a group called the WHATWG. This group developed as a response to dissatisfaction with the W3C’s direction with XHTML and “…apparent disregard for the needs of real world authors.”

Although still driven in the main by browser vendors, WHATWG does use a much more open process, developing the spec for HTML5 through a mailing list that anyone can participate in. This has lead to a process that is faster and better supported by the web development community as a whole. So much so that HTML5 has now been formally adopted by the W3C to the detriment of XHTML2, their chosen successor for existing markup standards.

The other key aspect of the process is that HTML5 is being implemented incrementally by browser vendors. So although the projected completion date for the specification is 2022, there are aspects of HTML5 available right now and more will become available as time goes on.


The explicit focus of HTML5 is on applications. HTML’s origins as a document markup language are in stark contrast to the rapid developments in functionality and complexity present in many modern day web applications. HTML5 represents an attempt to go beyond documents and create a markup specification for structuring applications as opposed to documents.

We can see this in many of the new elements being created within HTML5, such as section, nav, aside. These are based on common conventions that are currently implemented by using class and id attributes on HTML elements like div, ol, code which all pertain to elements of a written document. So where we might currently have

<div class="article">
  <div class="section">
    <h2>This is a section of a larger document</h2>
    <p>Here is some text in this particular section</p>

in html5, we would structure it something like the following;

    <h2>This is a section of a larger document</h2>
    <p>Here is some text in this particular section</p>

Perhaps more significant are the number of new APIs being specified, which will allow greater access to browser functions for web developers, as well as extending browser functionality to allow web applications to take on more of the advantages of desktop apps.

Best known is canvas, a 2d drawing api, which is already implemented in recent versions of Firefox, Safari, Chrome and Opera. However, just as significant are APIs that will allow offline web apps, drag and drop, video and audio controls, cross document messaging and text editing. Again, like the new elements, these are things that currently exist in web apps, but mainly through cumbersome and insecure javascript implementations that often are highly non-standard.*


HTML5 is open in two ways; firstly its open in terms of how it’s details are discussed and written. However it’s open in much broader sense; no one person owns HTML5, or indeed CSS3, or Javascript. This is important as we consider how the web is progressing today. Basically, if you wish to make a complex web application, you have a few choices; web standards technologies, Silverlight, Flash, Java Applets. Ok, that last one was a joke, but you get the picture. But really these choices are just two; open web standards that are not the property of a single company, or proprietary technology which is owned by one company. I realise there are good arguments on either side of that particular debate, which I don’t have time to elaborate here, but my personal choice is for standards, mainly as I feel more confident that more of my target audience will be able to access them.

So, there are a few reasons why you should pay attention to HTML5. To be honest, before I took the time to investigate it for myself, I wasn’t convinced, but I’m glad I did. HTML5 is not perfect, but that’s the point. It’s the first web standard that admits of its own imperfection, makes room for change and addresses the realities of modern web development, which overall seems like a good thing to me.

Running Cucumber Tasks Through Selenium on Internet Explorer

We all need to test our code on Internet Explorer and when set up correctly, this can be the best way.

I’m not going to go over installing Ruby, MySQL (you need version 5.0), Apache etc as there are a million and one tutorials out there. I will mention however that you can save yourself some time by simply connecting to your development server (remember, you will need to open up your SQL server for remote access). I’m also not going to go over setting up selenium profiles as I’m assuming you’ve already got your tests running under a *nix environment.

Now once you’ve got your applications installed and checked out a copy of your code you need to make sure you have the right gems – exactly the same set as you needed on your development server, although I would also recommend win32console as it will give you the text colouring on your test output (and also randomly remove all of the letter As. No, really!).

Now comes the fun part. There are a series of hacks you need to do to Ruby and its gems to get them working under Windows:

  • Install MySQL 5.0 if you haven’t already and copy libmySQL.dll from the MySQL bin folder to the Ruby bin folder, overwriting the default version.
  • Change any reference to IP ‘’ to ‘’ in the webrat gem. This is needed because Windows will not view ‘’ as localhost.
  • Add ‘start’ before the ‘mongrel_rails’ command in the ‘start_command’ function in ‘\selenium\application_servers\rails.rb’. This will cause the mongrel server to be run in a new console window which is needed because the mongrel *nix detach flag does not work in a Windows console.
  • Add ‘-interactive -forcedBrowserMode iexplore’ to the start command in ‘\lib\selenium\remote_control\remote_control.rb’.
  • Increase your timeouts
    • Add ‘config.selenium_browser_startup_timeout = 50’ to your selenium profile.
    • Timeouts also defined in ‘\selenium\selenium_rc_server.rb
  • Make sure you have your browser set correctly in your selenium profile with the correct path. Something along the lines of:
    • config.selenium_browser_key = ‘*iexplore C:\Program files\Internet Explorer\ie.exe’

Then run your tests and you should find your tests running quite happily.

The (Many) Benefits of RESTful Development

REST or Representational State Transfer development is web development with controller functions geared around the four HTTP request types (or verbs) – POST, GET, PUT and DELETE, equating these (classically but by no means exclusively) to the CRUD operations Create, Read, Update and Delete respctively. Once you start developing in REST the advantages of this quickly become clear:

  • Restricting your controller functionality in this way naturally prevents you from building bloated controllers
  • It ensures that the layout of your code doesn’t become too obfuscated
  • It allows you to make calls without having to specify your controller action explicitly in the request (as you do in a normal HTTP GET request).

Continue reading →

Capistrano Continues With Help From Setfire Developer


We’re proud to announce that as of today one of our developers, Lee Hambley has taken over maintenance of capify.org. For many people involved in Ruby on Rails development, Capistrano is a vital tool, making the whole process of maintaining production environments that much simpler, by automating and combining many of the more laborious and repetitive tasks involved.

Continue reading →

A Simple Guide To Web Standards

I must be a masochist or something. How do I know this? Because not only have I chosen to follow web standards, but I took it upon myself to become the advocate for web standards here at Setfire Media.

Having spent some time looking at standards, it occurred to me that one of the hardest aspects of the subject was just getting some basic overview of the whole thing. With that in mind, I present here the Setfire Media Simple Guide to Standards:

Continue reading →

Rails: ‘Has_many through’ Association Across Databases

So recently I had the challenge of creating a ‘has_many through’ relationship across two databases.

“Why would you do this?” you may ask. Well quite simply I am in a team building a new data management system to sit on top of a legacy system with its legacy database, we want to create something similar to https://docs.couchbase.com/server/current/learn/buckets-memory-and-storage/buckets-memory-and-storage.html. All the new code is new, shiny and streamlined and the old code is… well… crap but we have to keep both systems running concurrently so we have various tables in the legacy database we need to access from the new system. As it happens we need to access the legacy users table in a ‘has_many through’ from the new ‘orders’ table.
Continue reading →

7 Top Tips for Coding With Currency

As anyone who’s ever made an e-commerce system knows, money is everything. No, really if you don’t get your financial sums right then you can’t hope to build a successful online business (and may find yourself creating potential legal issues with the tax man).

So here’s a rundown of the top tips I can give for making your financial calculations that bit easier.

1. Always Work in Minor Units

I can’t stress enough how much this helps in terms of accuracy, rounding and speed. Working in major units may look better to you as you don’t have to reformat the numbers to display them but I hope I can make the case here for minor units.

a. Integer arithmetic is much much faster than floating point arithmetic.

Remember that even a single decimal place makes a number a float as far as your computer is concerned and all the processor overheads that go along with them suddenly arrive. I know it’s not a lot slower but in a complex financial system it all adds up believe me.

Continue reading →

Avoid Growing Pains: 15 Tips to Properly Setup Your Own Hosting Racks

Server With CablesWhen you get successful, you may find that you move from someone else looking after your hosting, to running a complete rack (or racks) yourself. Standing with that shiny new rack towering over you, there seems so much space and flexibility, and anything not quite right now can be fixed later, right?

Correcting a bad installation will be extremely difficult, disruptive, or just impossible to do once you are up and running. Follow these tips in planning your rack before the first piece of equipment goes in and you will save not only time later, but you will be thanking me when the sh*t hits the fan.

Continue reading →