Friday, November 10, 2017

Waaa

A former boss of mine, a great guy, made a comment about some code I wrote a long time ago and how the follow on developer said it was crap.  Oh I betcha it probably was...some of the stuff I still right today is crap.  I just wrote some crap a minute ago.

Crap code sometimes is a value add.  Craftsmen like to do everything perfectly.  But sometimes when someone needs a hammer you don't need to always build Thor's Hammer for them.  Sometimes if someone brings in something broken fixing it with duct tape works fine.  Not always, but sometimes. I know even thinking this way is heresy in the current world of code blogging.  But writing code is only a single domain.  Problems often are multi domain problems, where time, effort, and other priorities play a roll.  Sometimes you just have to do what you can and move on though I agree that this shouldn't be done just for laziness sake (though I'm guilty of this a time or two).  People following after you may not know the variables at play.  All they see is a crappy hammer and some duct tape.

A prime example of this.  I'm working on a big project, but I get pulled off to do a minor upgrade on an older project.  I look at it.  To do this upgrade the proper way would have required re-writing code that affected a whole lot more than just the minor update I needed to accomplish.  Plus, I'm having a feeling that this project within a few years will be rewritten from the bottom up.  So, I decide to just "hack" it for now so I can get back to other priorities, so I don't have to rework something that goes deep into the code base that could have unintended consequences, and I won't have to spend time to do more testing than either the project manager who pulled me off another bigger priority or myself originally thought.  The "hack" took about a half an hour and 15 minutes of testing.  Done.  Moving on.  In a few years I might come back and look at what I did and say "what the frack?"  But EVEN if I did do the deep fix, I guarantee  when I rewrite the application (or whoever else does) this code section will be completely rewritten from the bottom up as requirements over time have changed and will change.  So it would have been pure vanity as a craftsman to "do it right" this time around.  I left a few notes and called it good.

And I've inherited lot's of code over the years that I would have written differently if I wrote it.  I would have written it "better" or at least more understandable.  But I don't remember ever calling code that worked crap.  But then that is how I judge things...does it work?  Do the users like it?  Is it responsive?  Are there at least a few things I'm wowed a little by?  If yes then I call what I wrote or anyone else wrote a success.

In the instance I was critiqued on,  I know my code worked, just some anal type didn't like how I wrote it.  I also know that an auditor for the fortune 500 company I wrote it for called it one of the most intuitive tools he ever used.  And he didn't say this to flatter me as I was already gone from the company, he said this after.  So suck it anal type!

Now the kicker.  As a developer I'd say I'm mediocre. I've met many developers who can program rings around me.  I've also met many who cannot (some may know this, many may not, but proof is in the pudding).   I'm not the best craftsman nor, to be totally honest, do I want to be.  The problems I'm solving are often more interesting to me then the tools being used to solve them I guess.  But I get the job done.  The average burn out rate for a developer is five years...I know many great developers who have lasted longer than that, but that is the average.

So I wonder, I'm still here.  I've been writing code, some good, some bad, most mediocre, a small percentage brilliant, for almost 20 years now.  Many craftsmen would hate me.  I betcha I'm sill here after they have burned themselves out and are gone...

I guess that comment just stung more than it should have.  And I also have to keep in mind that much of my success has been due to grace...unmerited favor by the creator Jesus.  I've gotten opportunities that I didn't merit and advanced in my career beyond what others more talented then myself have been able to.  I don't want to get a big head.

But to distractors,  although it might aggravate you, I'm still here...while most of you are gone gone gone!

No comments: