The last post on this site before this one is from almost three years ago. At the time, I was working as a temp for a web development and marketing company. About half my time was spent implementing WordPress sites. I worked on the Ohio Lottery page redesign, mostly implementing from the graphic designer’s photoshop file. I was pretty proud of my skill then, and it is pretty good — it’s pixel perfect to what the designer did on all the browsers of the time. Today, just saying “pixel perfect design” sends a bit of a shiver down my back, because we can’t predict much about the user’s world except that we aren’t really sure what it is. As developers often say, “If I did it today, I’d do it differently.”
That part of my job hasn’t changed greatly — the signs we made were HTML5/css/JS things, often interactive, with maps and events and lots going on in some cases (less in others). It was all, for me, ultimately just providing the best user interface possible. I wrote a video game (a two player video game, in a single browser –that was a challenge!), we put signs in every major rest area in Ohio, connected by unreliable 3G mobile phones, but still had weather and news that was kept current. If I did it today, I’d do it differently.
That code, for the large part, was cut and pasted from another sequence of code. I don’t know why we do it this way, I know it’s been like that for years, and to change this pattern is more than I can do. The thing is, I don’t really understand it deeply. I know what each piece does. I even understand why we’re using a service later on this project. I don’t understand why it was implemented this way. I do understand that every programmer at my work understands it enough to implement it. The code, in large part because it doesn’t do much, is clean. It’s easy to reason about what it does — just not why. (And I’m very happy with “easy to reason about” as a definition of code which is good enough. Good enough code is what we’re shooting for here.)
It’s huge, complex and it feels like gears that don’t do anything. I get the feeling that I could probably simplify this by having all the models implement an interface, and having all the service stuff implement an interface, and then the number of files I need drops in half or more. Everyone implements the same basic interface, and even the controller code is simpler. But it’s far far too late in this project for that. But all this type safety and structure makes someone happy, I think. It just isn’t me.
I’m not saying you can’t do this with JS. ES6 has added the keyword class. But just talk to someone who’s done more than a few months of JS about lexical this and scoping. JS’s this does not work like any OO language ever. Even PHP is clearer on $this.
And I feel like I’m starting to get it. I write JS code, I listen to people who know JS online, and I find my code is like theirs. My code is nothing like the code I wrote a year ago, or even a few months ago. It’s better, and simpler in a way that I can’t explain. I think I’m starting to get this.
Want to know how much I think I get it? So much I know how little I get it, that’s how much. And it’s that learning and the experience I’m getting (and the fact that I’m working harder and better than every before) which is why this loosely typed, open source guy is working at a windows/C# shop. So long as I keep learning what I want, and keep getting better, I’m going to stay. Because Mastery is of the primary things that motivates me. (It’s more important than Authority and Purpose in the MAP style, at least for work). I don’t think I’m the only programmer like this.
This week I talk to my boss about all of this, and where I’m going. Because I am a bit of an odd man out at work — my skills are needed because not everyone has them, but they also mean I don’t ‘fit’ in the way I could. I like my job, so let’s deal with it while it isn’t a problem. This is also something I’ve never done. Maybe I’m mastering this too.