Tuesday, 29 October 2013

Adobe ColdFusion 10 docs now-community maintainable

This is good news. I have just been able to "fix" an entry in the Adobe ColdFusion 10 docs!

James Moberg brought to my attention how crap the docs for arrayEach() were with a Twitter message:

Checking the page, I found the guidance was wrong, suggesting arrayEach() could only take an inline function as the second argument, and there was no code example. How this doc even made the cut into the documentation is beyond me. They obviously have no editorial process before a doc goes live.

Anyway, I had previously observed to Adobe that even though I could login to the docs site - the login was broken for a long time (I mean: months), but is now fixed - I could still not do anything with my login. Frank Jennings seems to be the curator of the docs, and having raised this with him, he's made me a moderator, and I have just put this to the test.

So now arrayEach() has a code example:

    // example 1 using an inline callback
    numbers = [1,2,3,4,5];
    doubledNumbers = [];
    arrayEach(numbers, function(number){
        arrayAppend(doubledNumbers, number * 2);
    writeOutput(arrayToList(doubledNumbers)); // outputs 2,4,6,8

    // example 2, using a separately-defined function
    numbers = [1,2,3,4,5];
    doubledNumbers = [];

    function double(number){
        arrayAppend(doubledNumbers, number * 2);
    arrayEach(numbers, double); // here we use the NAME of an existing UDF
    writeOutput(arrayToList(doubledNumbers)); // outputs 2,4,6,8

I resisted the urge to use Maori in my code example this time. Although maybe I should in future!

All the rest of the doc is still pretty substandard, but I don't have an infinite amount of time, so I fixed the important bit. I'll add a comment to the moderators (talking to myself, it seems), pointing out some other failings in that doc.

Anyway, if you're the sort to help out with the docs, hit Adobe up and see if you can get a login which will allow editing. I think they need to create a tier below "moderator" though: there should just be a level "contributor" (which is what I'd rather be), and have edits go through a moderation/editorial process before going live.

But anyway... this is all good news, and a step in the right direction.