Back around the turn of the millennium and during the final heights of the dot com boom, I found myself in London building the UX for the brand new online-only cahoot bank. (I then realised the miserable weather I was enduring was, in fact, summer and hastily returned to a balmy Aussie winter. But I digress.) As with most things dot com, days regularly stretched into nights and frequently consisted of copious amounts of both caffeine and beer. Mistakes were made.
The team I was working in consisted of developers (clearly the intelligent ones), designers (the ones who made life hard for developers) and copywriters (the less said about these, the better). On one occasion, the latter decided that, in all their wisdom, it didn’t read well that all the references we had to the number 10 said, well, “10”. Instead, a more grammatically (literary?) correct term was “ten”. My job was to “fix” this across a very large site.
As all good developers know, there are few problems that can’t be fixed with a find and replace so clearly the right thing to do was this:
10 –> ten
A clearer head (probably one less inebriated by caffeine and beer), would have foreseen the carnage. Every number on the website which contained a 1 followed by a 0 became a bit dyslexic – 110 became 1ten, 5.10 became 5.ten and 101010 became, well, you get the idea. One of the things I learnt that day is that banking websites have a lot of numbers!
But of course a failed find and replace can easily be rectified by a find and replace in the opposite direction:
ten –> 10
This was clearly pure genius as it immediately fixed everything I’d just broken. It also brought another problem to my at10tion. This was a problem that can only be solved one by one and you want to know something about banking websites? They’re big. Very, very big.
But the real problem – and I’m finally coming around to the topic here – is that we didn’t have source control, we all just worked on the same set of files in a shared folder. Yes, source control existed back then and we could have been running on CVS or Visual Source Safe (don’t laugh – it was good once), but we weren’t. Well we kind of were but it was that most infamous source control of all – you might know it as CTRL-C followed by CTRL-V. Copy the project folder and give it a new name. At the end of the day. If you remember. Which you don’t because you’ve had too much caffeine and beer.
Today we’ve got a fantastic set of source control tools available – many of them totally free – and the idea of building code without source control is, well, almost inconceivable. In fact despite my prior indiscretions (or perhaps because of them), I’ve become near evangelical about the necessity of source control in everything we do, even laying down The 10 (not “ten”!) commandments of good source control management.
But what about the database? Tables, views, permissions, sprocs and even static data – how many people think they’re “using source control” whereas in reality it’s “source control but”? Can you really blow away all your development environments and retrieve everything you need to recreate it? I mean completely recreate it so that the app actually, you know, works?! Can you totally wreck your development database with a single mistimed DROP or UPDATE statement then immediately revert to a known good copy?
I’ve written about Red Gate’s SQL Source Control a few times now going back a couple of years and it continues to be an absolutely invaluable component of my developer tools arsenal. I wrote about the tool of my own free volition simply because I loved both the effectiveness and simplicity – a rare but valuable combination.
But now Red Gate have offered to give me something rather nice. Actually, they’ve offered to give me something nice to give to you – 5 licenses of SQL Source Control which would normally sell for nearly US$400 a pop. But they’re not completely free; I need something from you in return…
Using the comments section below, tell me your most painful experience which could have been easily avoided by using source control.
It doesn’t have to be a lack of database source control, it just has to be a story where, like me, you made a whole world of pain for yourself simply because you didn’t have the right source control tools.
In one week from now, I’ll choose the 5 best stories and each author will get a full version of Red Gate SQL Source Control.
Come 5pm Sydney time on Monday next week (1st October), I’ll choose the winners then update this post with the names. Do make sure you comment under an account which I can use to get in touch with you if you make the top 5. Particularly painful stories will earn extra points as will stories where the pain was generously shared with a larger team! Creatively written stories are a bonus, judge’s decision is final and so on and so forth.
And the winners are:
- MyChickenNinja: Source control via CTRL-Z
- Brandon Thompson: Multiple databases and integration woes
- Barry Anderson: Depending on untested backups
- Graham Sutherland: The human merge tool
- Robin Vessey: Cut and paste versioning
Congrats! You'll all be contacted shortly