Archive for the ‘Writing Reliable, Bug-Free Code’ Category
Posted by Rahoul Baruah on October 5th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: Bug-Free Code, bugs, cucumber, logging, rails, ruby, Writing Reliable •
Comments Off
We just had some customers report a bug. Not good. We didn’t get an exception email. All the tests passed. We couldn’t see anything untoward in the log files. But it was there. We could reproduce it, both in staging and in production. Not good at all.
But the weirdest thing was we couldn’t [...]
Posted by Rahoul Baruah on May 15th, 2009 under Designing Great Software, Managing Successful Projects, Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: cucumber, design, estimates, project planning, requirements gathering •
Comments Off
Writing estimates up-front is a really tricky part of client work.
From the customer’s point of view it’s pretty essential. You need to know how much you are spending before the work begins so you don’t get stung.
From the developer’s point of view it’s pretty difficult to do because [...]
Posted by Rahoul Baruah on May 8th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: Bug-Free Code, database, rspec, transactions, Writing Reliable •
Comments Off
I have just written a load of test code that needed to verify that a particular set of classes behaved correctly when a transaction was rolled back.
However, the rest of my suite relied on transactional fixtures (which is Rails’ badly named way of saying that a transaction is started before each test and [...]
Posted by Rahoul Baruah on May 6th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: bug-fixing, Bug-Free Code, legacy code, rspec, Writing Reliable •
Comments Off
When you’ve got an application that has little or no test coverage it can be quite daunting making changes. What if you alter X and it breaks Y? Without running through the entire app by hand how will you know what you’ve broken?
Well you won’t.
Even worse, what if your [...]
Posted by Rahoul Baruah on April 27th, 2009 under General, Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: bug, cookies, domain name, host name •
Comments Off
Lesson learnt today.
Apparently, underscores are not part of the standard for a host name. However, your browser (and DNS server and all the links in between) will accept underscores in the host name.
But, when you have Safari set to “only accept cookies for sites that I visit” the underscore in [...]
Posted by Rahoul Baruah on March 24th, 2009 under Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: acceptance tests, Bug-Free Code, cucumber, selenium, specifying, watir, webrat, Writing Reliable •
1 Comment
One of the issues when using Selenium or Watir to power your full-stack acceptance testing (apart from the time it takes for the test suite to run), is that stuff happens within your browser, fails and then Cucumber happily moves on to the next test before you get a chance to look at what went [...]
Posted by Rahoul Baruah on January 16th, 2009 under Designing Great Software, Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: cucumber, watir, Writing Reliable, Bug-Free Code •
Comments Off
I think Cucumber is fast becoming indispensable for my testing. The point of it is that you can write documentation that your client understands and then prove that the application does what it says. When coupled with WATIR you can show that it really works in an actual browser – you can even [...]
Posted by Rahoul Baruah on December 20th, 2008 under Designing Great Software, Ruby on Rails and Software Development, Writing Reliable, Bug-Free Code Tags: rails, ruby, software design •
Comments Off
I’ve recently been updating some old code – partly written by someone else, partly written by myself. At the time, I thought I had written this code really well; looking back on it now, it looks awful. Fair enough, I’ve learnt a lot – I want to look back on old code and [...]
Posted by Rahoul Baruah on November 25th, 2008 under Designing Great Software, General, Writing Reliable, Bug-Free Code Tags: software design, vat •
1 Comment
There seems to be a lot of wailing and gnashing of teeth about the upcoming VAT change. Especially as it is only a 13 month change and the rate will revert to 17.5% in 2010.
However, it ought to be really simple (although I realise that this may be a bit late for [...]
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: cucumber, rails, rspec, ruby, software design, Writing Reliable, Bug-Free Code •
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.