A thousand ways to skin a cat

What a lovely saying, right? It’s visceral, down-to-Earth and has just that right amount of abject idiocy that is the salt of sayings and their staying power.

And, I just realized, it is just about the perfect analogy to software development.

Both have a fairly low barrier of entry. For cat-skinning, one needs a cat, a skinning implement and someone with opposable thumbs. For software development, one needs someone who can use big words and can read on-line help (opposable thumbs optional). Fairly even.

Both allow for silly methodologies that nonetheless get the job done. For instance, it is entirely possible to skin a cat with a household cheese grater. Time-consuming, ill-advised, frustrating and extremely nauseating, but even so — in the end, it should get you to the desired result, even though it will leave you with an enormous, foul pile of refuse and (most likely) deeply depressed, disturbed and sickened employees. For software development, well, Java.

Just kidding — sort of. I’ve never made much of a secret of my disdain for Java, Swing, J2EE, Beans, WebSphere and the entire inefficient, illogically limited heap. If I have to write a wrapper to pass something by reference, good night and good luck — I’ll go find a serious language.

Right. Now that I got that dig in, let me find a somewhat less political analogy. Or maybe a few? Building Notepad in Microsoft Access. Storing repeated groups up to 6 deep in flat tables. Using a Dictionary/map/hash to store 10 values that are never searched. Iterating linearly through a RDBMS table from a client. Caching every table client-side in customized array-type objects. 150 tables. Up to 200,000 records. In a Visual Basic client. Under Windows 3.1. All these things can be done, just like the cheese grater will work for the cat. And while somewhat less physically messy, they are similarly addle-brained and equally nauseating. Trust me, I did not make those up.

Where I am going with this, of course, is in both cases there are wildly inappropriate, dumb, workable and suitable tools for the job. Knowing which one to use comes from experience and knowledge of available tools. Eventually, one will approach the cat with a knife-like object, and software development with anything but Java.

But tools are not enough, they are but the beginning. Both crafts require a vast store of background knowledge (yes, the analogy is somewhat stretched here, but it will do — because I say so). For skinning a cat, where, what direction and how deep to cut. Cat anatomy, musculature, what does one do around the paws, et cetera. I’m sure there’s an entire book on the topic somewhere. For software development, well, I have many more examples (probably since I am more of a software developer than a cat-skinner): how to properly normalize a data model. When to use a hash, and when to use an array. Knowing consequences of algorithms for memory use, speed and maintainability. How to design a clear user interface. Whether the caller is responsible for releasing that CComPtr. What LPTSTR, merge join, schema-bound, message pump, MVC, ^, *, &, HKLM, Gen 2 GC pressure, parameter sniffing, PE and BHO mean. And yes, you need every single nugget to be effective. Anyone can fire up Visual Studio and hammer out something that functions in C# or VB.NET; it takes all that background knowledge to know, for example, that the damned thing takes 5 minutes of swapping to start up because of those 250,000 string concatenations it does when initializing, and could you please Google for StringBuilder, thank you very much?

This encyclopedia is needed for every line of code. Every single one. Where you know to iterate through a string with a size_t and not an int, where you know how to Case When a query to fake a pivot, where you know how to properly code and use a Dispose pattern, where you know the costs of a DataSet, or the risks of sp_OACreate, or why Set X = Nothing is redundant, or why that clause causes a table scan, or why you can’t find a handle for controls on that form, or why you minimize context switches, or why you want to flag that mutex as a possible bottleneck, or why you do xor eax, eax instead of mov eax, 0, or why you do not owner-draw on a terminal server application, or why that data cannot be stored in Program Files, or why you let exceptions bubble, or why you want to avoid STL in your ATL Server, or why cache localization made you use this O(n) instead of that O(log n) search, or why you change your base address, or why you need a space between > and >,  and on and on and on. Some of it is essential (as is knowing, oh, what a cat looks like); some of it makes enormous differences in speed, or quality, or maintainability (as is knowing to sharpen your knife and trying not to get it stuck in a bone); some of it is subtle.

Some of these subtle ones can, in the long run, make a world of difference. For skinning a cat, I would assume that bleeding the poor thing and boiling the fur off can pay off handsomely. Every software developer (hopefully) builds his or her own bag of tricks and nuggets of wisdom over time. Things such as using Information_Schema rather than SysObjects. Such as ignoring errors in a With block to ensure the End With releases the reference. Such as staying away from Java at any cost. Some are habit, some so ingrained that when asked to explain “why this way, and not that way”, the best forthcoming response can amount to no more than “my way works, yours does not — because I say so”. A lot of such a bag’s contents consists of “don’t do that”s accumulated through blood, sweat, tears and the company of bad consultants. Example? Walk into a software development cubby farm and say “I built my own String class”, or “we can just make a copy of the database to hold those cases”, or “I wrote a utility to automatically generate the DAL”. Seasoned programmers will come running from the other side of the building (if not from their holiday in Hawaii or their retirement) to administer a double barrel of “hell no, because I said so” — or, depending on your work environment, a double barrel of buckshot. Your mileage may vary.

In short, what I am trying to say is that programming is easy. Being good at it is very, very difficult and takes years. Many who try never get better than mediocre; many others remain so spectacularly inept they should be kept away from toasters, let alone a computer. Most of the latter wear expensive ties and/or heels, memorize the Business Thesaurus to mask their utter cluelessness — and cost at least $150 an hour.

Back to cats. The final consideration, of course, is why go through the hassle of figuring out how to skin a cat, or hire someone and have that person figure it out, when your Core Business is to sell skinned cats, not the skinning process itself? Why not flip open the yellow pages, call Acme Cat Skinners LLC, pay a reasonable amount of money and have them deal with sharpening the knife and getting rid of the bucket of blood? I would, and I’m sure Acme will leave me a satisfied customer, ready to conquer the world with my newly and expertly skinned ex-meowing machine.

Of course, that’s where the analogy ends. In software development, people pay millions of dollars to a Cat Skinning Consulting Agency, which after half a year of focus-group meetings and business process analysis couriers them a box of fish sticks with a thousand-page document outlining why fish sticks is what they really wanted. And rather than pointing out that A) if they wanted a box of fish sticks, they would have called the Fish Stick Consulting Agency, thank you very much, and B) that if the Agency assumes that there will be payment when there is cat nor skin to be seen, let alone C) that after enough time and money to put a cat on the moon, skinned or not, it is somewhat disappointing to see that the Agency has even failed to nail things down to even the correct neighborhood of the animal kingdom… businesses, even governments, gladly put up with this. And sign service contracts for their shiny new fish sticks. And organize training workshops for their people to get to the finer points of fish sticks, and how they really are better at meowing than a cat, and how you can build a model of a skinned cat with these multi-functional fish sticks and some food coloring. And then?

They order food coloring.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: