Belt and braces

Phil Factor, 2011-06-30

A moment ago, I was deep in some coding. What it was is not entirely relevant, With a page-full of carefully crafted code, I hit ‘preview’.  Bang. The IDE died. Normally, the programmer will say at that point something like “Aiee! I wish I’d hit ‘save’ first!”, Probably, the temporary file would have saved the latest version of the code, but I didn’t even bother to look.  Being a graduate of the school of hard knocks, I keep a couple of tools in use that are great for this sort of emergency. The first of these is AceText, which is a sort of extended clipboard utility. Basically, everything you’ve ever stored on the clipboard is preserved on disk, and you can likewise keep all sorts of materials, such as favourite regexes, urls, clips, templates, procedures, HTML fragments or stock letters. A quick glance to see if I had the code pasted in there. This time, it didn’t have a complete version of my lost code as it so often does. (Code I use gets copied and pasted a lot. Sometimes I copy onto the clipboard just to be doubly sure of preserving code.before running things), but this particular IDE had caught me out. I looked wistfully at the complex code. Looked? If you can see it, you can get it. Out came Abbyy screenshot reader.  If you can red it on-screen, then it is likely that Abbyy Screenshot reader will scrape it off as text. Google Books? No problems, Locked-up application with an hours work sitting there taunting you? Work of a moment. Now back on song, cursing myself for not saving, but nothing lost. Programs like these are great for those little emergencies like ‘Phil, I hope you kept a copy of the old version before you altered it?’, and these occasional occurences of ‘Mr Gates’s revenge’.

If only SSMS had even the simplest of precautions against accidental loss of work, I’d be happier with it. My trusty Editpad saves every time I run some code, and keeps a copy of everything I’ve run. Of course, you can get add-ons to SSMS but it is hard to imagine how IDEs can still get away with losing code.





Related content

Database Mirroring FAQ: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup?

Question: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? This question was sent to me via email. My reply follows. Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? Databases to be mirrored are currently running on 2005 SQL instances but will be upgraded to 2008 SQL in the near future.

Robert Davis


1,567 reads

Networking – Part 4

You may want to read Part 1 , Part 2 , and Part 3 before continuing. This time around I’d like to talk about social networking. We’ll start with social networking. Facebook, MySpace, and Twitter are all good examples of using technology to let…

Andy Warren


1,530 reads

Speaking at Community Events – More Thoughts

Last week I posted Speaking at Community Events – Time to Raise the Bar?, a first cut at talking about to what degree we should require experience for speakers at events like SQLSaturday as well as when it might be appropriate to add additional focus/limitations on the presentations that are accepted. I’ve got a few more thoughts on the topic this week, and I look forward to your comments.

Andy Warren


360 reads