Mark Derricutt's Disturbing Thoughts

My Top Tags

                                       

My Jaiku

Chrome Division – Doomsday Rider

Thursday, 21 August 2008 5:43 A GMT+12

1 Session per VM: Another Scaling Alternative

Wednesday, 20 August 2008 9:47 P GMT+12

The BGGA myth - Functional Java | Google Groups

Wednesday, 20 August 2008 7:33 A GMT+12

Spock's Beard – On A Perfect Day (live)

Wednesday, 20 August 2008 5:57 A GMT+12

Ola Bini: JtestR 0.3.1 Released

Tuesday, 19 August 2008 10:00 P GMT+12

Enslaved – Violet Dawning

Tuesday, 19 August 2008 6:14 A GMT+12

Distributed Messaging with Jetlang and Terracotta

Monday, 18 August 2008 10:17 P GMT+12

The Music of 2008 - week 33

Monday, 18 August 2008 8:57 A GMT+12

There Can Be Only One

Monday, 18 August 2008 8:10 A GMT+12

Search Box

 

Continuous Tax

posted Thursday, 27 September 2007

Cedric Beust seems to have caused a bit of stir amongst the community with his recent post on the Continuous Tax which comes along courtesy of dynamic languages:

This "continuous tax" is defined by the fact that when you need to maintain or use an API that was written in a language such as Ruby or Python, you have very little information available to you, and even if you eventually figure it out by looking at the sources of the tests (does anyone ever do that?), this knowledge you gain is ephemereal, and you will have to go through that same exercise if you need to modify this same portion of code a year later.

I'm not jumping on this specific argument as I can see both pros and cons to both dynamic and static languages, however shortly after reading these posts I was visited by the tax man when deploying $APP to production.

At the time the problem was reported as "javascript errors are being thrown all over the place" - one was a known problem when running under an older version of Resin, the other however - ONLY occurred in Firefox on MY MacBook - Camino and Safari worked fine, Internet Explorer and Firefox on the Windows laptop worked fine - and finally - Firefox on my Linux machine didn't work.

After the unwanted rollback I spent the day chasing down the elusive bug...

fn.create is not a function
http://hostname:8080/scripts/mootools.v1.11.js
Line 610

The problem was a missing method inside the mootools library. As part of mootool's initialization the Function object is extended with several new methods - create() being one of them. The script is loaded before any of our own javascript files so it should be safe to assume that these additional methods are added to the Function object. Unfortunately for me, for some reason something was slowing down my browser and causing the mootools.js file to run after our own javascript, so various event handler instances didn't have the create() method (I eventually traced the problem to being the CoComment Firefox extension - I'm not entirely sure WHAT it was doing - but it wasn't doing anything good).

In this instance - the "continuous tax" against the dynamic nature of the language - being able to add methods to an object instance might offer excellent flexibility to the language and its frameworks, but it can also bite you where it hurts when things don't run quite as you expect.

Technorati Tags: ,

tags:      

links: digg this    del.icio.us    technorati    reddit