md5verify: A script to automatically verify file integrity

I have a lot of files on my computer. Email archives, personal documents, stuff for work, photos I've taken...the list goes on - I'm sure most people reading this are in a similar boat. On occasion I've found some files to be missing or corrupt which is disturbing but is probably something to be expected. The bad part is, I keep backups, but I rotate them out when they reach a certain age which means if I don't notice a file is corrupt or missing I'll eventually lose it forever. I stayed up late a few nights ago and wrote a script to raise an alert when something has changed. On its first run the script will recursively walk a directory tree hashing each file and storing the hashes in the directory (in an md5sum compatible formatted file). On subsequent runs it will begin tracking new files automatically but it will also print messages for missing and changed files. By saving the checksums in each directory it becomes portable - you can copy a directory somewhere else and still be able to verify nothing changed (a quick md5sum -c checksums.txt will let you know). By default the script only prints messages when it sees something fishy so it's perfect to drop into cron and it uses exit statuses so it'll work for nagios too. I've been running it for a few months and have found a couple files that have changed - nothing critical yet but it's nice to know it's there.

CLI Split Windows in Vim

I use split windows, both horizontally and vertically, in Vim all the time. I’ve always wanted to be able to split the window and then start a command line shell within that window but up until now that has just been a dream.

addons.mozilla.org ♥s unit tests. Again.

AMO has had an on-again off-again relationship with unit tests. A little over a year ago we had a thousand unit tests that sort of, mostly, ran. The problem is, PHP unit testing just isn’t as good as it should be. CakePHP relies on SimpleTest, one of the main PHP test suites. It worked relatively well for a small number of tests, but as our suite grew, so did our troubles.

AMO brings new levels of pedantry to Mozilla Webdev

And we love it. :)

Continuous Integration comes to AMO

It's time to hail another milestone for AMO in our epic push for improvements in 2010. This time I'm happy to announce our Hudson continuous integration server which has been humming along for a few months. Hudson Integration Screenshot. Click to enlarge. AMO is the first Mozilla Webdev site to use continuous integration, and it's been a long time coming. With the way it's currently configured we've got code coverage trending, unit test trending, code quality trending, as well as detailed reports for all the above for every single check in. If anything fails or oversteps a threshold our IRC bot complains and we can get it fixed up quickly. It's a boon to productivity to know that all the code being checked in is being tested automatically, plus it gives everyone a stable state to compare to. Thanks to everyone that helped get Hudson going, from the people that write it, to the IT team that keeps it alive, to the webdev team that helped work out the kinks.