There’s an old saying in the software industry that “If houses were built like software was, the first woodpecker that came along would destroy civilization.”
I was reminded of that last week in both ways. First I was sitting at my desk when I heard what sounded like someone banging on a tin drum of some sort. I went up to the porch outside my office window and saw a bird fly off. Seeing that only solved part of the question in my mind and created a new one. The new one was what the heck was a woodpecker doing on the corner post. It’s pressure-treated and there’s no signs of any sort of infestation. But even more so, why was it so friggen’ loud and metal sounding? About 20 minutes later it was back. I chased it off again.
This cycle has become a daily event with it coming back 3-4 times a day. But I finally got a partial answer. I had forgotten that on the far side of the post was the copper downspout for the gutters. As far as I can tell, it’s hitting it directly (though I can’t imagine why) or close enough that the entire downspout is acting like a drum. Annoys the heck out of me, but the woodpecker doesn’t seem to care. And the good news is, despite all this, my house is still standing.
The other reminder was an error message I had received from an ETL process I have written for a customer. It takes data from a vendor and loads it into my client’s Salesforce instance. The error was one I hadn’t seen before (but had thankfully planned for). So I went into the package and started to investigate. It seemed all the new records had simply failed to load. I looked closely and could not see an issue, so I attempted a manual load and it instantly failed. This was unusual and troubling. My first thought was that the vendor had somehow changed the data format and that was causing a problem, but nothing really indicated that (and had that happened it most likely would have actually generated an error earlier in the process).
After some digging I realized that it wasn’t the vendors fault. As part of the ETL process, one of the steps that happens is a lookup into Salesforce for a Vendor ID to make sure the data coming in is tagged with the right ID. This step is somewhat important because the ID, being an internally generated one in Salesforce, is different between the UAT instance and the Prod instance, so rather than hardcoding it, it’s a lookup. And while the ID itself in an instance can never change, the keyword associated with it in theory can. In practice it shouldn’t. Normal users don’t have permission and admin users should know that changing the keyword should never be done, or if it is, needs an entire change process.
Sure enough, my lookup, which was basically doing “Where Vendor_ID=’Adventureworks'” was now returning nothing. So the insert, which needs that Vendor_ID was failing. A little digging showed that an admin had changed it and not to something like ‘Adventure Works’ or something that might have been close and thought to be a trivial example, but had changed it to something like ‘Bob and Mary’. It wasn’t even close.
Needless to say, better controls have been put into place, but apparently a woodpecker came along and broke my ETL.
Fortunately, that one isn’t coming back.
Code strong, code robustly, and have good error checking.