OK, perhaps not the Art of Code, but rather the Confusion of Code.
You've heard the saying, "there's more than one way to skin a cat," well, it's true.
There's more than one way to wash the dishes, there's more than one way to cut the grass, there's more than one way to go to the shops, there's more than one way to sing a song (and more than one song to sing), and more than one way to build a house.
But you may not have heard that there’s no perfect way to do anything. And chasing perfection is a hopeless cause. Beauty, that thing that is in the eye of the beholder doesn’t exist, because there is no real beauty. It’s in the eye of the beholder.
Analysis Paralysis
The state in which you are stuck, studying various options of attack, never taking a step, in case it’s the wrong step. You end up knowing a hell of a lot. But get nothing done.
Meanwhile Orville and Wilbur have tested at least twenty prototypes and are inching ever closer to something workable. Even though it took taking four steps forward and three back.
Just Skin the Cat
I have written a lot, a lot, of really bad code. Whole systems in one block. Code running for pages that I cannot even remember where anything is. And once it’s working, I cannot even move a line. I’m scared the whole thing will come falling down. Like a Jenga game.
Then I learned about functional programming and everything was a function. The worst thing that happened to me was learning Object-Oriented programming. Everything, absolutely everything became an object. And I’ve never practically used it. I’ve used objects, written by other programmers, but my coding is not that organized.
It’s been a career of five steps forward and four steps back. Imagine how far I would have gotten if it were not for the constant distractions of a “better” way. A “better” programming language. A “better” design pattern. A “better” toolbox for more efficient programming. A “better” user-interface design module. A “better” coding, integrated development environment. A “better” operating system for deployment, go mobile, forget desktop, go web, forget mobile. And oh, don’t forget to learn Ajax and Angular while you’re at it.
Ouch.
After a career that spans a minimum of 22 years of coding, I’ve narrowed my focus. I’ve zoomed into a corner of my expertise that may not be marketable, but I can actually feel myself growing. I feel my bones stretching and my hair tingling. And my chosen poison for now is Python and Flask and Bootstrap. Supported by SQLite (for small projects) and MySQL for the slightly larger ones.
A few years ago, I stopped paying attention to what was the latest and the greatest. The programming tools of my early career are probably not in use any more, and the ones I’ve chosen are popular, but there are far too many developers more skilled than I am. But what’s happened is that I can now focus on the work, and not learning.
I no longer stop and say, “well, I don’t know if I know enough and whether my approach is the best one, I don’t want to continue and find out fifty miles out that I was on the wrong path and have to go back fifty miles to try and figure my way out.”
I just go.
And guess what.
Fifty miles later, I do say, “oops!”
And I jump onto the Internet, where all knowledge is available.
And someone tells me what an idiot I am, and that they cannot believe it took so long to realize that I took the wrong road. And that I should go back to school and get some formal instruction before venturing near a keyboard.
But I don’t.
Because I’ve built something.
And it works.
And I’m no longer afraid of tearing it down, because I’ve learned one more thing. That new knowledge would not have come to me if I sat and did nothing. It only came to me from the pain of the miles down that path.
And I refactor.
And the world is all good again. Until I learn something else. But that new thing needs to be worth my time. Not simply because it’s the better way to do things. But because I want to do it.
My Python apps were not the most beautiful. Oh, I’ll admit that. There was a lot of pain and gnashing of teeth and my code ran on for miles, like a party where nobody knows anyone else. My idea of modular was dividing stuff into individual files.
Like that helped. My IDE then had every single file opened in too many tabs, too small to even see the name of the file they contained.
And then I ran into Application Factories. And the rain stopped, clouds cleared, and the sun shone bright and golden in the clear blue sky. And the word modular now made sense in a functional way.
Believe me, the hard work needed to be done.
The Skinned Cat – Now What?
There are still some things that I won’t do. Resisting the urge to follow the crowd. Everyone’s left the party and they’ve gone to visit SQLAlchemy and Flask-WTF and Flask-Login and so many other fancy-shmancy libraries that are supposed to make your life easier.
The old me would have abandoned what I was doing and followed the crowd.
It’s tempting, nearly everyone’s gone that way. But I don’t ever want to be that superficial guy who knows 5% of a hundred things. I want to know 500% of just a few.
It may take me a lot longer to skin the cat. But my heart now feels the beat of intimate knowledge. And while I may not be employable, because I cannot answer all the interview questions, my little confused apps look at me like proud children.
No comments:
Post a Comment