So you want a rollback script?

So you’ve got a new release coming up, including upgrading your production SQL database. You’re writing great upgrade scripts, but now your DBAs are demanding rollback scripts as well. How do you approach this? Do we really need them? Rollback scripts are an expensive overhead to development because of the time and effort involved in …

App.net: 12,000 evangelists and counting

App.net is a new alternative to Twitter that’s been getting a lot of coverage lately. They have taken a unique approach to funding, where instead of depending on advertising revenue, they simply charge each user an up-front $50 annual subscription fee. The idea behind this is to eliminate any risk (in future) of privacy and …

Dogfooding: how to build a great API

“I’m sorry, the feature you wanted is not currently available in the public API”. It’s common these days for web applications to provide some sort of RESTful API for third party integration, but too many of them are built after the fact, as a lacklustre afterthought — with holes and limitations that makes them useless …

Extracting files from an SVN repository backup

Say you’ve got a backup of an old SVN repository. You want to grab a couple of files, but the backup looks like this: You figure you probably need to run some fiddly import commands to restore it into a live SVN server so you can connect and browse it right? Wrong! SVN has a …

Another argument in favour of TDD

An interesting observation came up at work the other day, while we were discussing developer working habits. Say you’re adding a new feature to an application, that takes 2-3 days to develop. If you don’t write any unit tests, you have no way of knowing if any of your code works until you’ve finished everything, …

Running Mocha browser tests in TeamCity

Mocha is a great javascript testing framework that supports TeamCity out-of-the-box for testing node.js-based apps on your build server. Here’s a quick guide on how to get it running in TeamCity for browser-based apps as well. Configuring Mocha’s TeamCity reporter First we need to configure Mocha to emit specially formatted messages to console.log() that TeamCity …