Information Management and Data Integrity

CA Magazine’s Sept. 2011 issue lists the top 10 tech issues facing the accounting profession, according to the Canadian Institute of Chartered Accountants. The number 1 issue is information management and data integrity.

This corroborates my own professional experience. For too many businesses, there is no way to tell which copy of a document is the one “true” version, all the more difficult if there are multiple copies of the document scattered across personal directories and shared network directories. Almost as bad, there is no way to tell what changes have been made to a document over time, by who, for what reason, and if they were authorized by someone in authority.

Big business solves this in typically big business ways, and with a big price tag. Achievo is a solution for SMEs (and medium organizations that know better).

Converting text files between Windows and Unix

I develop on both Windows and Unix laptops for deployment on Unix servers, and invariably forget to save text files from Windows in Unix-format (in Windows, lines end with both the line feed and carriage return ASCII characters, but Unix uses only a line feed). It doesn’t cause any problems, but it’s sure ugly to look at on the server. Googling around, I found the following solution using the tr command.

> mv file file.tmp
> tr -d '\r' < file.tmp > file
> rm file.tmp

After putting up with what was really more of an ugly hack for about a year, I decided it was time to write a quick and dirty shell script to hide the mess – but before reinventing the wheel thought I’d try a quick ‘net search. After all, I can’t be the first one to do this, could I?

Asking Google again for how to convert text from DOS to Unix, but this time including “shell script”, I mostly got the same links to tr, sed, and perl tutorials that I got the first time. There were also a couple links to shell scripts, but almost hidden in the hits was a reference to “flip”, a ~250 line C program that has apparently been the de facto standard command since it was released into the wild in 1998.

flip does a lot more than I was going to implement in my quick and dirty shell script. It detects binary files and leaves them alone unless intentionally overridden. It doesn’t modify files that are already in the specified format, and it preserves file timestamps. It handles user interrupts gracefully and doesn’t leave behind garbage or corrupted files.

Compiling and installing flip from the FreeBSD ports collection took all of 20 seconds. I don’t know why I didn’t find flip a year ago, but think I’ll dig out my venerable Unix in a Nutshell and see what other utilities are out there I could use, but don’t know about.

Father’s Day 2011 Ride

I recently cycled “the big circle” on Father’s Day with a couple of friends. It was an opportunity to explore the city, and get some fresh air after the seemingly endless rain we had been having.

Even before the ride started, I had two flat tires. I had swapped my balding 2.25’s on my sturdy Rocky Mountain that morning for narrower 1.9’s, and had somehow managed to pinch-flat both tubes in the process. However, after some hasty patching (and as an omen of things to come, watching the first rain deluge of the day from the comfort of my garage), Ian and I we were off.

The route was a counter-clockwise loop starting and ending in Calgary’s deep-south community of Sundance. Entering FCPP (Fish Creek Provincial Park), we headed west to the end of the park, then north out of the park to the west Glenmore Weaslehead area (where Jamie met up with us). Some scenic residential riding took us through the Tri-Glen communities to Edworthy Park, where we had a snack and then followed the Bow River pathway east to downtown Calgary. Continuing south past the killer weir, we had a forced detour onto the Eastern Headlands irrigation canal due to construction blocking the pathway north of the Inglewood Bird Sanctuary. We got back onto the Bow River Pathway north of Glenmore Trail, then back into FCPP at the Bow Valley Ranch and home.

I captured our track with my Garmin Legend (you’ll see it in the slideshow), downloaded it to my PC using GPSBabel, and then mapped it using LePetitPoucet.

FreeBSD mention on Linux Outlaws

I was lucky enough to get a shout-out for FreeBSD from Fab and Dan recently on Linux Outlaws podcast #213. Fab conceded he had “… heard from other people that FreeBSD was a good server” and Dan grudgingly commented “I know it’s a very well used server.” On a Linux podcast, I couldn’t have hoped for more!

The origin of this shout-out was when I was cycling home from work one day listening to Linux Outlaws # 210 (AFAIR). Fab had launched into a tirade (in beautiful Fab fashion) on what a loss it would be to the Linux server community if the CentOS project collapsed (CentOS is a free GNU/Linux distribution based on and functionally identical to Redhat Enterprise Linux). I immediately got off my bike and e-mailed Fab the solution – FreeBSD. Not only is FreeBSD the absolutely best Unix-like server OS, but the FreeBSD project has easily stood the test of time with its genesis in 1993.

I like Linux Outlaws to get a overview of the open source community and updates on foss software projects, new and old (I also like listening to Fab and Dan banter back and forth, although the language is closer to sailor’s than nerd-speak. I admit I’m envious of the attention GNU/Linux attracts, but most of the attention is for desktop features – shiny widgets, graphical applications, etc. When I was selecting a server OS, I wanted a GUI-less interface, minimal cruft between me and the silicon, a stable consistent architecture, good documentation, a reliable release strategy, and a community that felt right. For me, that’s clearly FreeBSD!

FreeBSD Beastie Image
FreeBSD Beastie

(BSD Daemon Copyright 1988 by Marshall Kirk McKusick. All Rights Reserved.)