Wednesday, December 1, 2010

You don't know Jack, part I.

Jack of all trades, master of none.

That's been my credo since, well I won't say how long ago.

To be succinct (and trust me, that's a stretch for yours truly) I've gone through about twenty iterations of trying to formulate and implement an "after hours" schedule of digestion and practice of various technologies. The latest rendition involves a revisitation of Ruby and C#--both of which I've been familiar with for some time, with the latter more intimately as the lingua franca of the framework that I'm employed to develop with. As I start perusing (for the fifth time) Jon Skeet's C# in Depth (Second Edition for 4.0) I realize that no matter how much I remediate with other reference there's still a virtual ceiling that I hit. Case in point: a recent presentation at our local .NET user group meeting was on the topic of implementing DSL's using C# lambda's, extension methods and expression trees. Although the basic precepts of metaprogramming are fascinating and the use of extension methods in .NET are pretty straightforward, I still couldn't wrap my head around the expression trees formed by this "cursory" validation library. These trees weren't shrubbery (as the speaker tried to make them out to be), but Redwoods straight out of NorCal. Or should I say Alderwoods from Redmond? I dunno. After the code walkthrough I felt like I might as well have watched someone implement a parser in BrainF*ck. Seriously. There were properties several levels deep. Interfaces without the "I" prefix implemented, of course, covariantly and contravariantly. Tip O' the Hat to Mr. Skeet. Or Eric Lippert. Or Anders Hejlsberg for crying out loud.

Truth be told, if there were any takeaways I had a bit of an epiphany after all was said and done. I realized that some things that are best implemented in the same manner as they are grokked, and that is with utter simplicity and elegance. Ergo my revisitation with Ruby. I've only witnessed Metaprogramming in a few languages admittedly, but the linguistic constructs and object model that allow for this in Ruby seem to be the most simple and definitely the most elegant. 

I recall a flippancy on Stackoverflow once where an ambitious poster wanted a magic metaprogrammatic bullet that had features of several languages and the most upvoted answer was "grow a pair and learn lisp". It's almost reminiscent of the snub that a VB.NET developer would get from the C# camp--those former C++ or Java hacks who believe that syntactic sugar equates to bad practices. It's essentially the same reason that JavaScript, like Ruby is still perceived by this camp as not ready for prime time. Funny that my current regime consists of developing expertise in Java, er, I mean ECMAScript as well as Ruby. Maybe I should just be resigned to the fact that the former, although experiencing a renaissance of sorts, is the ugliness under the hood of the nice new ride that is jQuery that is best left to the front end "architects" of the world and that the latter is nothing more than the dialectical DNA of the Rails framework that will never be adopted by big enterprise and remain within the purview of the avant garde (read: startup) development community.

Alas, I keep C# on the docket--mainly because it's the currency of the .NET development marketplace and it's begun to embrace the dynamism and multiparadigm prowess that the other two languages touted for so many years. Maybe I should just be like G. Gordon Liddy and stick my hand in the proverbial fire. Maybe I already have and just haven't felt the burn quite yet.

What doesn't totally destroy my gray matter, certainly makes me stronger.

What does, will have vindicated Joel Spolsky.

Until then, it's C#, JavaScript and Ruby, and .....

Jack of all trades signing off...