Tuesday, September 16, 2014

How to Get Reasonably DRY

It's a presentation

Sunday, September 7, 2014

Chasing the Latest Trends

I'm an engineer.  I love playing with the newest toys.  But acquiring those toys has a cost - and not just in terms of money.  More important is the time invested to learn the new system and transition from the old.

But hey, for me, the benefit (fun) usually outweighs the cost (money/time).

A problem can arise, though, in domains where the technology is changing rapidly.  In such a domain, the technology could potentially change so rapidly that if you keep up with everything, you are constantly in a learning mode and never get to a productive mode.

I'm going to go out on a limb and say that is what is currently happening with HTML and JavaScript libraries.

One large-scale web application I worked on started with the Prototype library (heh, yea).  In mid-project we switched to OpenRico (remember that guy?).  Then we said, "Oh hey, the newest thing is MooTools."  Then there was the big one, jQuery.  Backbone?  Oh, Angular is so hot right now.  But what about Google's new Polymer?

Granted, it's exciting to see the evolution of the web platform.  But if you spend all of your time moving your project to the latest, hottest library so that you can trash talk all of the old fogies who still use the passé crap, you'll never be able to get any real work done.

But, come on, we can't still be coding in Cobol, right?  Nobody wants to spend their whole career working on old technologies.  Definitely!  So how do we decide if we should stick with something old or jump to the new kid on the block?

Nassim Taleb (author of The Black Swan) gives the answer:

The longer a certain idea or technology has been around, the longer we can expect it to survive.

He uses the example of a chair.  We may imagine the future with chairs made of exotic materials that fly.  But the simple wooden chair has been around for thousands of years.  Chances are, in 50 years, we will still be sitting on simple wooden chairs.  Why?  They have proven their effectiveness.

In terms of software, "future-proofing" is very very hard to do.  But applying Taleb's principle can help us.  For example, raw HTML has been around for a long time and so will likely stick around a long time into the future.  So maybe we pick a library/framework that is as close to raw HTML as possible.

Another example: Relative to other JavaScript frameworks, jQuery has proven its effectiveness over a good span of time.  Sure, there will be a new king someday.  But it's prudent to wait and see who can prove more effective over time.

How long is that time?  I don't know the answer to that; but I'm sure it varies by domain.

Again, as an engineer, this 'waiting' is against my natural inclination.  I want to get the new toy asap.  But if I'm responsible for a piece of software that my company will be maintaining years from now, I must force myself to make prudent decisions.