Thursday, May 30, 2013

Fighting Programming Skills Stagnation

These days I do almost all my programming in either PHP, JavaScript or ActionScript. You know, totally mainstream programming languages. And while I work on a variety of clients, much of the code I write boils down to standard patterns: store X in the database; pull Y out; render it for the user. While this similarity is helpful from a business perspective (it's easier to predict how long software will take to write), it's also dangerous: one can be lulled into stagnation. It's tempting to keep using the same tools and strategies from project to project, all the while missing out on new programming language advances.

My secret weapon for dealing with this is none other than Scheme. Scheme has always had a tradition of experimentation with programming language features outside the mainstream. And while I don't typically use these features in production code, I do find that they serve a more important purpose: they force me out of my programming comfort zone. For example continuations, mixins, first class syntax objects are all concepts I wouldn't normally come across during my day.

Consider this recent post on a threading macro as an example. The code introduces a new high level syntax, and leverages a few clever low level Racket (a Scheme implementation) features. To be honest, I don't fully understand the code in this post. But that's exactly my point, by forcing myself to wrap my head around new concepts, I'm exposing myself to programming constructs I wouldn't normally come across.

I can definitely tell that my PHP code has been influenced by this practice. For example, I was so impressed with how the World programming model handles state, that I've incorporated a similar concept into my PHP code.

Scheme works well for me because I know it fairly well and it has an active experimental community. Really, however, any programming language that emphasizes features outside the mainstream should work for the above purposes.

No comments:

Post a Comment


Related Posts with Thumbnails