Monday, September 26, 2011

On Being a Better Programmer


After a few years of evangelizing different languages which are “better” than whatever language it is that I am currently paid to develop in, I came to a realization which was triggered by a conversation with a co-worker. He said I wasn't doing myself any favors by looking to other languages and comparing them to whatever language I am working in. In his opinion, doing so would lead to dissatisfaction with the language I am supposed to be working in, and eventually with the job I am paid to do in general.
It was an interesting point.
So I began looking at the reasons that I look to these other languages. By and large, it is that the languages I have espoused over the current language du jour were more succinct, or less verbose in nature. For instance, when I was a C# developer, I was hung up on Python. When I moved to Java, I began looking at others such as Groovy, Ruby, and lately, Scala. But try as I might, I never found a magic bullet in any of those languages. What was I looking for? Some mystical programming language that would instantly cure my faults as a programmer.
The truth is this: the fault is not with the language; it's with the programmer.
I am a Java developer. Professionally. Do I like Java? Meh. Why not? Because I have been lazy. I can't think in Java yet. (I'm getting there.) Instead of taking the time to read and learn Java, to grok it, to “take it to the head”, I saw things in the way the language is used at my current job that are confusing, convoluted, and seemed to be a step back from my days as a C# dev. Instantly I tried to find something “better”, instead of making me better, rising to the challenge set by the architect of our code.
Not any more. I have put away the Scala book. Not that I won't code in Scala, just not now. Before I can use Scala, I must first master Java. I closed my PHP applications. I know PHP. It's comfortable. It's easy. It's a (no offense) way less powerful language than either C# or Java. I close the books on JavaScript. JavaScript is my bread and butter. Simple, dynamic, powerful, fast. Someday I will return. But right now, I realize, I have one job to do.
I have to code Java. I have to become a Java programmer. There is no “better” language. And this is what they pay me to do.

No comments: