Weapon of Choice

work safe

This weeks Blog Battle was a song title. Just to make a point, here’s a video!

When I has a young software engineer, I was a Perl hacker. I could do amazing things because I spent so much time learning the ins and outs of the language. I blame, in part, Dave Mott for showing me what was possible. But also people like Damian Conway for things like Lingua::Romana::Perligata, a library that allowed you to write code with Latin grammar rules, because they showed me how to make the world a slightly crazy place with their code. And to enjoy code for its own sake.

I used Perl, not only in direct project work, but to slice and manipulate any data I had to deal with. I didn’t have a machine without it installed. At least is was not long until it was installed. When I did use it, odds were I would write code that others would call messy and dangerous. Calling methods that don’t exist. Rewriting the symbol table for just a little while. Writing code that changes file without opening them. It was there I learned that it can be easy to solve problems with a dash of black magic.

I started learning Ruby because all the cool kids were doing it. I’d heard about Rails, and I had seen it mentioned in both the Pragmatic Programmer and Extreme Programming Adventures in C#. I stayed for a while because of things like Rake, rSpec, and people like Why the Lucky Stiff, who, like Damian Conway, made the world a little stranger and a little nicer.

I explored “block” and finally understood what all that crap I was doing in Perl was now that “metaprogramming” had a name. Wrote my first internal DSL because I hated the language I was targeting. I learned that code needs to be ‘ergonomic’ and easy to understand. I still used magic, but I kept it in a corner of the code.

The weapons I’ve been looking at recently are mot because they are inherently useful to me, but because they make me think differently. Haskell, Erlang, Clojure, and F# are not things I can as immediately push in to a project, but they teach me about the form and movement of their usage. You see, C# is no longer as pure an OO language as version one was. You can make an argument that it never was pure, but it is taking so much more from other language paradigms because of people like Erik Meijer. And they have helped me write very different C# that is more expressive and succinct than anything I would have been able four years ago.

But what serves me best? In each case, I try to understand the language for what it is, not for what is is expected to be. Each feature should be approached with the beginners mind and explored from several angles. Each is different and can be used in a variety of ways. A master swordsman can strike with any part of the sword.

As I get older I realize my weapon of choice is not any specific language. I have favorites and some I understand better than others. Those are matters of fashion and taste. A master swordsman understand the sword so well, he can turn any object in his hand in to a weapon.

That’s my weapon of choice; what ever is close at hand.

No Comments

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>