A few weeks ago I was talking to a particularly good friend of mine. We somehow got on the topic of “good enough” and how it just isn’t. Let me preface this with “I’m guilty”, and I truly am. There’s no way for me to say this without sounding condescending, so please believe me that I don’t mean it to be arrogant. My “good enough” tends to be better than average. This has allowed me to more or less skate through life and let me tell you something, I have not done nearly enough.
Oh sure. I’ve done pretty well. I have a good career, a great family, and the best friends a guy could ask for, but what have I done? The truth is I’ve done a lot, but not nearly as much as I could. Why is this? Because I, like you, am lazy. Of course I’m lazy. I didn’t intentionally become a programmer. I became one because I was lazy. I understood that if I put the effort in up front to build a piece of software to do it for me, I would never have to waste another second doing it by hand again. That’s also the only reason my good enough is better than average. I’m lazy, but I recognize that it’s a better investment to do some extra work up front in order to reduce the overall amount of effort over time.
I would like to think that this is true of all programmers, but it’s not. There are too many of us writing code that’s “good enough” instead of going the last mile to what is actually good code. Why? Why don’t we go that last mile? Why do we stop halfway? I’d like to blame it on shops that pay their developers per line of code, but I don’t work in one of those shops. What is it then? I don’t know. I just don’t.
What I do know is that it’s down right silly. We see a problem in the business and we write a piece of code to make their lives easier, but never take into account how it’s going to be maintained. We write half-baked code that will be copied, pasted and then modified rather than abstracted into a subroutine. Ok, so we all know better than that, right? We go ahead and refactor our code into a subroutine, but again, that doesn’t quite fit this need over here. So again, we copy, paste and modify rather than go the last mile and make a completely abstracted class out of it. It’s asinine and we need to stop. Right now. Stop. Take the time it takes to do it right the first time, and you’ll never have to touch that same piece of code again. At least until you need to extend it’s capabilities.
This applies to our daily lives too. How many people would rather spend $20 ten times over than spend $100, right now, once? It’s the same theory. It’s the last mile. It’s the hardest mile. It’s the mile that will save you work and time in the long run, and that’s exactly what we should be concerned with; the long run.