The MacGyver meme is making the rounds and I was kindly tagged by my buddy, Thomas LaRock ( blog | twitter) – that most famous SQLRockstar, who wisely chose to tag me early in the process, lest he receive another round of disciplining like the last time. I’ve also seen several other good MacGyver Moments from Aaron Bertrand (blog), David Stein also known as Made2Mentor ( blog | twitter ), and Denny Cherry also known as MrDenny (blog). I’m looking forward to reading the bloggers that they tagged to see what others in our community have cooked up. In case you haven’t heard, your MacGyver Moments are those times when you improvised an excellent solution to a problem using non-traditional materials, techniques, or tools – like the time I repaired my flux capacitor using bailing wire, chewing gum, the tears of Glenn Beck, and the sweat of a master ninja.
Believe it or not, I’ve got a long history of doing things MacGyver style. To begin with, I grew up without two nickels to rub together. That means you have to improvise – a lot. Once I hit teenage years, I was constantly tinkering with all things mechanical and electrical trying to stretch their useful lifespan beyond any conception of “reasonable use”, much like my teenage dating experiences. For example, I once cobbled together garage workshop fan from the leftover parts of an electric pencil sharpener, a frame made of bailing wire (yes, bailing wire), solder, and handmade cardboard fan blades. Shamefully, it did not include any duct tape. But it worked great! I had to do that stuff all the time out of necessity, such as with my series of malfunctioning cars and dodgy electronics. Hey, my MacGyver experiences also taught me that admitting to owning a “Plymouth Horizon” is, when trying to impress the ladies, about the same as sporting a 4″ gravy stain on your “Howling Wolf” t-shirt.
Aaaah, the Plymouth – a vehicle truly designed somewhere between the third and fifth ring of Hades. I can’t even count the number of jury-rigged fixes I put into that thing. One that stands out clearly, because my friends used this to prank me on several occasions, was the repair to the broken door handle on the driver’s side. Since I couldn’t afford replacement parts, I used bailing wire (I could always count on you, my old friend) fixed to the inner locking mechanism and a key ring as a handle dangling invisibly from the bottom door sill. About a year after that (around 1986 or so), I discovered junk yards and was able to rip a barely used mechanism from a Dodge of the same body style for $3. I became pretty well known at those junk yards – I blame Chrysler. Quality was not job 1 in those days.
Like my friend Brent Ozar, I played a lot of Dungeons & Dragons (D&D) growing up. I was always the “DM”, that is, the guy who administrated the game, while all my friends played characters on the adventure. But D&D, like many good products, was designed to suck the dollars right out of your product by producing an endless stream of new adventures to play and supplements to purchase. I, on the other hand, wasn’t gonna spend a dime of my money on that. So I created my own adventures (called modules). As I got better, I constructed campaigns (i.e a related sets of modules) and from that, a related set of campaigns into an entire Tolkien-like world (this is called a mileau) which I called Aquilonia. My buddies loved it and, realizing that bragging about geekness creates an inverse coolness effect, can brag that I won some contests at regional conventions for game design.
Back in the day, I remember wondering if I should stop doing things differently than my buddies and peers. For example, we were assigned to write a program that would find the day of the week based on passing in any pre-Y2K date in one of my COBOL college courses. (No mocking please – COBOL was big back then). Everyone in the class, and I mean everyone, wrote very large programs that delivered the day of the week through very large (and, imo, cumbersome) IF-THEN-ELSE structures. My program had two elegant WHILE loops and thirty-eight lines of code based on the premise that our calendar repeats every 14 years and that all months contain at least 28 days and at most 31 days. I got an A+.
Back when my IT shop had bragging privileges as one of the largest enterprise installations of Microsoft SQL Server (in the v6.0 and v6.5 days), we were faced with implementing some sort of way to do bi-directional replication. The product did a good job of standard transactional replication, but bi-directional replication was only possible through a major rewrite of the application. Instead, we cooked up a way to make it work – SQL Server would allow us do outward transactional replication as the transactions occurred. We were able to bring the data back by also enabling sync replication (which is non-transactional) every evening. Thus, we got bi-directional data flows without spending hundreds of thousands of dollars on third-party tools. (I must also give kudos to the team I worked with and who made this solution work, particularly Dwayne Seiber, who is still lead DBA there.)
Creativity, innovation, and improvisation are what you make of them. You must make the choice to pursue them. Yes, necessity often forces to seek out MacGyver moments. So does laziness in some cases. How many master developers do you know who’ll work very hard to fully conceptualize their program before starting to write it, saving time in the long run. Now that’s creative laziness! But MacGyver moments also stretch our abilities and call us to higher achievements.