Saturday, 27 July 2013

ColdFusion: Really, Adobe: "NotWorthEffort"

G'day:
So I started to write an article on the performance of evaluate() (and whether it's still a problem), but I got sidetracked by other CFML stuff I was catching up on, and now I'm on to article two of three articles to today that I'm writing instead. Mostly cos they're easier than the evaluate() one.

This is another one on toScript().

Whilst researching the earlier article, I looked to see what other bugs there already were with toScript(), to see if I was treading already-trod ground (no, as it happens). Ad I came across this bug, raised by Ray Camden a while back: 3041310. The gist of it is demonstrated by this code:

cfRainbow = ["Whero","Karaka","Kowhai","Kakariki","Kikorangi","Tawatawa","Mawhero"];
jsRainbow = toScript(cfRainbow, "jsRainbow");
writeDump([cfRainbow,jsRainbow]);

The result of this is:

array
1
array
1Whero
2Karaka
3Kowhai
4Kakariki
5Kikorangi
6Tawatawa
7Mawhero
2jsRainbow = new Array();
jsRainbow[0] = "Whero";
jsRainbow[1] = "Karaka";
jsRainbow[2] = "Kowhai";
jsRainbow[3] = "Kakariki";
jsRainbow[4] = "Kikorangi";
jsRainbow[5] = "Tawatawa";
jsRainbow[6] = "Mawhero";

Note the JS that's generated: it's way more verbose than it needs to be, it could just be:

jsRainbow = ["Whero","Karaka","Kowhai","Kakariki","Kikorangi","Tawatawa","Mawhero"];

ie: same as CFML.

Adobe's reaction to the ticket Ray raised is this:

Status

State Closed
Status NeverFix
Reason NotWorthEffort

Really, Adobe? Someone's taken the effort to write a repro case for you, raise a ticket to bring it to your attention, two people have voted for it, and your reaction is "we can't be arsed".

How about when someone points out you have done a ham-fisted, slack job of doing something that they've taken the time to tell you about, you have a bit more bloody respect for your clients than "oh, we can't be arsed doing that"?

Blimey: even if you think that, don't say it, for goodness sake. How can you even taken the time to have a public-facing status of "not worth effort"?

TBH, if someone pulls you up on having done a poor job of something you should just go "yeah, that was a pretty poor show there... we'll suck it up and get that done better. Cheers for letting us know, and sorry we did that".

[mutters to self]: honestly... amateur hour.

--
Adam