Good Intentions and Real Development
We're in the final hours for a big demo with the Top Brass, and I'm trying to get things done, but I go to check on a run being done on the UAT box, and I find out that someone has started another copy! Now I know he didn't mean to mess me over, but he did. And I know he didn't mean to trash 30 mins of my work, but he did.
It's all that:
The road to Hell is paved with good intentions - Proverb
I know what it's like to be doing the best you can. I really do. I remember being on a Class A softball team, and I was lucky to get hits and play catcher. I was clearly outclassed. But this is a job, not a recreation. This is where you're supposed to be good - not just want to be good.
When I asked him if he'd started running things, he was honest and upfront, but said "Doesn't it check against that?" Of course not! Why would it? Well… now I have the answer to that question - I needed to write it for guys like him.
There was another exchange I had with someone… I had someone show me the following javascript:
function(doc) { var filter = function(doc) { return doc.meta.label == "QuantumLead.results" && doc.otcs.length > 0 && doc.merchant.category != null && doc.merchant.sales_value > 0; }; var key = function(doc) { return [ doc.meta.execution_tag, doc.meta.division, doc.merchant.category, doc.merchant.sales_value ]; }; var value = function(doc) { return { name: doc.merchant.name, sf_id: doc.merchant.sf_id, sales_value: doc.merchant.sales_value }; }; if (filter(doc)) { emit(key(doc), value(doc)); } }
I asked him why he chose to write it that way. Just what the motivation was for the specific structure. His response was that this was about clarity and maintenance. To me, it seems awfully complex for something that I'd have written as:
function(doc) { if (doc.meta.label == "QuantumLead.results" && doc.otcs.length > 0 && doc.merchant.category != null && doc.merchant.sales_value > 0) { var key = [ doc.meta.execution_tag, doc.meta.division, doc.merchant.category, doc.merchant.sales_value ]; var value = { name: doc.merchant.name, sf_id: doc.merchant.sf_id, sales_value: doc.merchant.sales_value }; emit(key, value); }; }
When I asked him if he really thought that his was clearer than mine, he said "Yup", and so I let it drop. After all, there's no reason to make a big deal over this. But again, this is not what I'd call a good format, but hey… I'm trying to be more flexible and I'm no code enforcer here.
I know they mean well… they really do. But it's stuff like this that is exactly why, in the past, I've stepped up and simply pushed folks like this aside.
I'm trying to be better.