Showing posts with label James Moberg. Show all posts
Showing posts with label James Moberg. Show all posts

Tuesday 18 February 2014

Slow news day & Adobe charging twice for CFML features

G'day:
You'll be pleased to know that Brendon McCullum got his 300 runs, becoming New Zealand's highest scorer for an innings, finally falling on 302. New Zealand declared on 680, which is their highest innings score in test cricket. We now have 56 overs to bowl India out to win the match. Which is seeming possibly on the cards as they are already 28/2: "McCullum, Neesham bat India out".

Increasingly the news media is relying on Twitter banality for its news content, and - whilst not a news organ - I don't see why I should be any different. So today's article is brought to you via a comment on Twitter.


James raises a very good point, and one I've been meaning to comment on for a coupla months now. Adobe are currently working through their bug backlog, and a lot of bugs are being fixed, with the comment of "this will be available in the next major release of ColdFusion" (ie: ColdFusion 11). That has a veneer of good news about it, but let's stop to think about this.

ColdFusion 9 and ColdFusion 10 are the current versions of ColdFusion. They are both still within their standard support phase (ColdFusion 9 until 31/12/2014, and 10 until 16/5/2017. Ref: "Adobe products and Enterprise Technical Support periods covered under the new Lifecycle Policy").

Sunday 8 December 2013

CFML: For the sake of completeness: createLocalisedDayOfWeekAsInteger(): a closure approach

G'day:
A coupla days ago I continued my TDD / unit testing series with an article "Unit Testing / TDD - refactoring existing code". This engendered a few comments, none of which paid any attention to the intent article, instead focused on something pretty much irrelevant to what I was discussing. This engendered this reaction from me:


Oh how I love my readership sometimes. But, actually, the comments got me thinking...

That article covered the approval process for CFLib of a function dayOfWeekAsInteger(), which is the reverse of dayOfWeekAsString(): it takes a string (in English only), and returns which day of the week that corresponds to, starting with Sunday as the first day. Why does it start on Sunday instead of Monday (as per ISO 8601)? Because it's the inverse of dayOfWeekAsString(), and that's how that does it. Is that right? Well: no. Is that relevant to either this UDF or the blog article? Also: no.


However James's suggestion for how Simon could rewrite his function to suit James's requirements (James: write your own functions if you want them different from how others have implemented them!) did get me thinking about how to do it. A thought popped into my head that one could leverage closure to create a function which was specific to a given locale. This might not be exactly what James wants, but it was what I decided to look into, because it's slightly interesting, and covers a feature of closure I've not covered anywhere on this blog yet. So it interests me.

Tuesday 29 October 2013