In a classic example of what goes wrong in bigger environments, I wanted to knock up a quick tool to solve a problem. I decided to use Clojure because the solution involves data transformation from XML to JSON, so a functional approach makes sense. I also want to improve my Clojure skills, which are on the amateur side.
Leiningen is the natural lifecycle tool. I created my project, updated my dependencies in
project.clj to the latest version of the midje testing tool, and in fine TDD style wrote a quick sanity test, ran
lein midje and got a green response. Good work.
After some reading up on XML zippers in Clojure, I then made the timeless error of overconfidence by taking a big leap forward and writing a simple functional test that required a number of implementation steps, including coding and updating components and tools. Pretty soon, I was in Leiningen hell, getting meaningless exception stack traces, thrashing around trying different versions of tools and libraries, and commenting out increasingly large pieces of code until I found my issue—in about the second line I’d written. Lots of time wasted, no value delivered.
Moral to the story: when you’re in unfamiliar territory, you move faster if you take small steps.
In my spare time, for fun, I’m learning some Clojure. It made me think (in the shower, as usual) to list all the languages in which I’ve written some amount of working code. Not as a brag, but to see just what I’ve been exposed to along the way. I’ve never actually been hired anywhere as a developer, so most of this experience is either from university, a work activity to get a bigger job done, or (mostly) as a curiosity. On one hand it demonstrates my generalist tendencies; on the other it suggests that I’m just a dilettante with an attention deficit problem. It also pretty well defines my age.
- BASIC (Microsoft Level II, and Visual Basic)
- FORTRAN (and Ratfor)
- Assembler (Z80, PDP-11, 6809, 6800, 8086)
- Tcl (with Tk)
- XSLT (yes, it’s Turing-complete)
I’ve excluded OS-specific scripting “languages” like Bash, Awk, and VAX/VMS DCL, and proprietary languages. Missing in action for me are languages like C++ (only got as far as reading a book and trying to install C++ on VMS), 6502 assembler (never got an Apple ][), Python (I like Ruby better), Turbo Pascal, and Objective C.
Looking back, I’ve written the most lines of code in C, been the most productive in Perl, struggled the most with Prolog, had the most fun with Ruby, written the ugliest Java, and most admired Smalltalk and the Lisp family. Through all this dabbling in code I’ve come to value the power from language simplicity and elegance, as a means of building complex systems. And yet, I’m still frustrated in many ways by still having to deal with the basics of bricks, mortar, and plumbing, when I just want to create my own modest castles in the sky. Clojure actually feels a bit closer to that ideal, which is why I’m interested in it. And for learning it, I can highly recommend the nearly released Clojure in Action.
Everyone loves a list. I was looking at the TIOBE programming languages list for 2008 with some level of discomfort, thinking I was more out of touch than even I had thought, and scratching my head at the kids of today. I mean, D? And ABAP, Pascal, and Logo? But a bit of Googling showed up the community disquiet at the methodology underlying the list, which made me feel better. It pointed to a competitive list, the Language Usage Indicators, that had a (IMHO) more sensible top 20 that better sat with my own observations.
Even that list surprises me a little; the assertion that “Assembly” still gets a good workout makes me smile, and then wistfully remember long hours hand-assembling Z80 programs in 16K of RAM, and entering and debugging it with a hex editor. Tell that to the young web jockeys of today with their context-sensitive IDEs and GB of RAM. But even I defer to the PDP-8 programmers entering boot code by rocker switches in octal.