Sunday 31 March 2013

Which CFML-oriented blogs do you read?

G'day:
I was trying to track down one of my regular commenters - Bruce Kirkpatrick - on Twitter, as I didn't have him on my "following" list, and he's genererally got something interesting to say. Plus when he says it it takes 50000 words, so it's a good way to occupy myself for a day or two whilst I read through it.

Anyway, having successfully google-stalked him, I noticed he also has a blog (but, as it happens, not much of a Twitter presence), which I did not know about. So - anyway - I cranked up Thunderbird and added him to my subscription list.

restSetResponse() requires the method to be returntype void. What?

G'day:
I have to say I didn't even know the restSetResponse() function even existed until I read about it on Stackoverflow this afternoon. The Stackoverflow question drew my attention to this snippet in the docs:

You must set the returntype attribute of the function to void when a custom response is returned using the function restSetResponse.

Friday 29 March 2013

Unexpectedly performance differences between listFind() and arrayFind() in ColdFusion

G'day:
This just cropped up whilst I was doing some research for work (yeah... on Good Friday. Working remotely is being a right pain, so I'm well behind on my stretch for the week, so playing catch-up today and tomorrow).

The main website I work on is a multi-lingual one, represented in 11 different languages. On the whole all language sites are treated equally, but in some situations there are exceptions (I'm wary about discussing work stuff on my blog, so I'm going to stay vague here).

Thursday 28 March 2013

How did you come to be using Railo? (survey results)

G'day:
I've got 80-odd results for the survey I started the other day. This was one of the best and fastest responses I've had on the various surveys I've run on this blog. I wonder if this is because it was just a very short survey (one question), it was something people felt like responding to, or just that more people read this blog these days? Dunno. Anyway: no-one cares about that.

So: the results. Firstly I'll repeat something I touch on with each of these surveys I do, and that Mark Drew alluded to in a comment against the original article relating to the survey. With the mechanisms available to me, these surveys are not reflective of a very broad population base and this can have a hand in pre-determining the results.

Wednesday 27 March 2013

Email going AWOL between the ColdFusion spooler and the mail server

G'day:
I've nothing profound to say about this topic, but I just wanted to do my bit about:
  1. getting it onto people's radar;
  2. publicising it so Adobe might be more likely to do something about it.
Tim Cunningham just posted a status update on Twitter drawing my attention to this bug:  3312296, the summary of which is as follows:

Cfmail mailsent logs mail as successfully sent but the receiving server has no record of the connection attempt. Happens to about 1% of messages sent.

Sunday 24 March 2013

How did you come to be using Railo?

G'day
I've concocted a quick survey, which simply asks how you came to be a Railo developer, IE: whether they have come from a history of using ColdFusion or BlueDragon, or straight to Railo having not used any other CFML engine.

The survey is here now closed. The results have been posted.

Hungarian Notation (revisited)

G'day:
Ages ago (in the context of the lifetime of this blog, anyhow... Aug last year)  I wrote an article on my thoughts regarding Hungarian Notation. This fell back on my radar as someone has just posted a comment against that article.

Friday 22 March 2013

Whitespace in HQL causes exceptions, and how Adobe deals with it

G'day:
Here's the "paper trail" of an issue ColdFusion has had ormExecuteQuery() (and - I found out whilst writing this article - <cfquery> too) since the function first existed, in CF9. I'm raising it here because the CF11 pre-release cycle is about to start and I want to try to encourage this behaviour to cease, and someone's just been bitten on the bum by this again. I myself have been bitten by this too.

Thursday 21 March 2013

Thanks for taking the time to comment

G'day:
I've been really slack following up on responding to all the comments people have been making on this blog recently. It's not like I get hundreds of responses, or even dozens, but I do get some, and I appreciate all of them. And I'm having a catch-up afternoon today, as my work for the day has been stymied by lack of connectivity to the office :-(

Wednesday 20 March 2013

Splendor & Thunder, eh?

G'day
Don't let the truly awful "code name" put you off, I think the news that the ColdFusion 11 (let's not mince words... it's gonna be CF11, so let's just call it that. Only dicks need code names) pre-release programme has been announced, and should kick off soon. And the less-cringingly-named CFB 3.0 (OK, this might just be 2.5 or something) - Thunder - is also going to be part of this P/R. This is excellent news.

OK, I'm gonna give this Brackets thing a go

G'day:

I've been terribly judgemental about this Adobe Brackets thing. Not vocally (until I raised my scepticism about it on Twitter a day or so ago), but just in my mind. My mind was saying "WTF? Why is Adobe wasting time on this sort of project?" My chief concerns arose having listened to Adam Lehman talk about Brackets on the CFHour podcast a while back.

The whole notion of it being "focused on JavaScript, HTML and CSS development, [...] but also built with JavaScript, HTML and CSS" doesn't ring true to me (when we're talking about JS/HTML/CSS anyhow). The rationale for doing this was explained along the lines of "eating one's own dogfood" when it comes to how an IDE is built is somehow relevant / good / "a thing". I'm unconvinced.

I was also horrified to get the impression that it was built in a web browser. However I'm in the process of re-listening to the podcast, and it seems that was an idea in an early iteration of Brackets, and is not the case now. Phew. I really could not imagine the thinking behind writing a text editor in a web browser (well: beyond a souped-up <textarea> like TinyMCE and its ilk implement).

Still, all of this was based on gut feel rather than experience, which is an approach I don't like to take, so I've decided to use the thing to see what I think. I've decided all the code I'm going to write for this blog will be done on Brackets. This is an easy way to slide into it, as the code is usually between one and a coupla dozen lines long, and I don't have to integrate with anyone else. All my daytime work will still be on CFB, as that's my employer's IDE of choice (well: CFEclipse or CFB, anyhow).

Stop Press
I read too much into the Twitter comment Ray made that lead me to believe Brackets has a ColdFusion plug-in. It does not. So this exercise was a bit of a waste of time. A waste of time for me trying to do it, writing this article, and - sorry - you starting to read it. Oh well...

Installing the thing was easy... I just googled "Adobe Brackets" and followed my nose. I'd heard a lot of talk mentioning sprints and github and that sort of thing, and I really couldn't be arsed with the idea of downloading the source code of a desktop app and trying to get it to work, so I was pleased to see that there was an MSI install for it. I'm very much in the camp of "double-click on setup.exe" approach to making software work. "Making software work" is tedious, and the less time and effort I spend doing it the better. So... first win: the install was easy.

I've got Brackets open, and open a CFML file to see how it handles it. Out of the box it just seems to treat it as HTML with illegal tags in it. This is fair enough, as it's not a CFML editor, it's a generic HTML / JS / CSS editor. What I had heard, though, is that there was an extension for CFML. So far, finding this extension is proving very difficult. Initially I had a superficial look around the brackets.io website, but nothing leapt out at me. Then I googled "Brackets extension coldfusion", and flicking through the first coupla pages (about as far as I'm prepared to look in a Google result set), I found nothing. I tried "Brackets extension cfml": even the initial result weren't relevant. I then changed it to ""Adobe Brackets" extension +ColdFusion", and got nothing; as I did with "CFML" instead of "ColdFusion". I found a Github wiki page for Brackets Extensions, but no mention of CFML :-(

I also, incidentally, followed the "project's blog" link from that main Brackets URL I linked to above... this just yields a blank page, which is very clean-looking, but not much help.

And now my patience for googling something like this has expired, so I shall hit Ray up on Twitter and get him to point me in the right direction. But that will need to be covered in a follow-up article, as I need to crack on with some other stuff, using a text editor that does already understand CFML for now.

Stay tuned...

--
Adam

Wednesday 13 March 2013

Here's a Question

G'day:
I just saw a status update on Twitter of someone mentioning a client of theirs was moving to Railo after being impressed with Railo 4, and underwhelmed by ColdFusion 10. I have to say I think their judgement is off a bit there (ie: I think CF10 is more impressive than Railo 4... that said they're both good products, and I don't mean to take anything away from Railo when I say that), but fair enough: I'm not privy to their requirements and what's important to them so I can't really comment intelligently on the basis for their decision.

Tuesday 12 March 2013

Quick Quiz

G'day:
Whilst writing some code, I disengaged my brain for a moment (I'm getting old: this happens), and ended up with some code I didn't mean to have, but before moving on and fixing it, I stopped to think... but there must be an easy way of doing what I had accidentally started to do.

More ColdFusion hotfix shenanigans

G'day:
You're probably aware that Adobe released a new tranche of cumulative hotfixes (CHFs) for ColdFusion 9 last Friday (8 March 2013). The details are blogged-about on the Adobe ColdFusion Blog, and the tech notes are here: ColdFusion 9 CHF 3, and ColdFusion 9.0.1 CHF 4 (these are the only two versions affected by this CHF as far as I can tell).

Monday 11 March 2013

More on threads: AtomicIntegers

G'day:
After commenting on the non-thread-safety of the ++ operator (and its ilk) last week, I decided to look at a solution to this. In the comments of the second article, Justin Carter pointed me to the java.util.concurrent.atomic Java package, within which is an AtomicInteger (Justin actually links to the Java 5 version, but let's stay current with the Java 7 version).

Sunday 10 March 2013

Give me your tired, your poor your UDFs

G'day:
I've just had a "cflib afternoon", in which I remind myself I'm supposedly the moderator / approver on CFLib, which means I actually need to moderate / approve stuff every now and then.

Friday 8 March 2013

Clarification about the ++ / thread-safety thing

G'day:
First things first, it's 11pm on Friday, I've just got back from being at the pub since 6pm and I have had half a dozen pints, so I don't vouch for the quality of this article.

I don't shrink away from over-stated "headlines" on this blog, but I don't like to misrepresent anything. I have a couple of things to clarify based on feedback I've had from the articles earlier today:

No, the ++ operators are not thread safe

G'day:
My lunch break is running out (by about -10min so far ;-), so this will be quick.

In my last article I got bitten on the bum by weird behaviour of the prefix increment operator (ie: ++myVar), in that two simultaneous calls to it would cause the increment to skip.

Doing some research (basically asking my colleague Simon) , I discovered that - no - these operators are not thread safe. This is good to know.

Sean prompts me to look at ColdFusion threading some more

G'day:
I got a bit of a slap-down from Sean y/day regarding that code I posted using <cfthread> (well: thread, but samesame). I've yet to clarify whether he was referring the code I was triaging from CFLib, or my scratch code demonstrating a decoupled approach to same, but it's encouraged me to look into things a bit more thoroughly anyhow. I appreciate the slap-down, because it identified a gap in my knowledge, giving me the opportunity to fill that gap.

So, anyway, Sean made a coupla interesting observations which I'll look at here.

Thursday 7 March 2013

Should a function handle its own threading?

G'day:
One of the UDFs I was triaging for CFLib was a function arrayDiff() which takes two arrays, and removes the elements from the second array from the first array.  For example if we called this code:

result = arrayDiff(["whero", "karaka", "kakariki"], ["karaka"]);

then result would be ["whero", "kakariki"].

This is a fairly useful sort of notion.

Wednesday 6 March 2013

ColdFusion 10 support for Windows 2012 and Windows 8 already out the door?

G'day:
Did I miss something?

Update:
No I didn't, but I just got in about an hour before Rakshith made the announcement. So that clears that one up then. You can ignore the rest of this article now!


On the Adobe ColdFusion forums, there's a comment from vamsee_k:
Installers for Windows 8 and Windows 2012 are already on ColdFusion 10 product downloads page and Adobe store.

Tuesday 5 March 2013

Wait for the dust to settle before installing the recent ColdFusion patches

G'day:
Hopefully you're aware that Adobe recently released a patch for ColdFusion versions 9.x and 10.x so that they will now run on Java 7. I had a small whine about the poor timing of this release the other day.

After some discussion I was a peripheral participant in today, my advice is perhaps to not bother installing it yet.

Regular expressions in CFML (part 9: Java support for regular expressions (1/3))

G'day:
Jetlag and stupidity are a fine combination of things. I'm off to Ireland today to see my son, so am currently on the Tube heading to LHR. It's just after 6am, and not being a Saturday morning person, I general pass the time on this 1.5h journey (which I do every 2-3wks) by dozing and listening to a podcast. Two flaws with this plan are that I am still not readjusted to being back on GMT as my brain thinks I am still in NZ, so I am wide awake, and have been since 4am; secondly I (this is the stupidity part) have left my headphones at home. So... what to do? Well: continue this series of articles on regular expressions (which has been on hiatus, as you might have noticed). I guess it's good cos I'll get about 1h of productive typing during the journey.

Friday 1 March 2013

Adobe: I told you so

G'day
Last year, it was announced that Java 6 was being EOLed in November (it may have been announced before last year, but that's when I heard about it). At this time Adobe had promised a patch to CF9 & 10 to be supported on Java 7 before the end of November.

In September last year, Oracle pushed the EOL date out to yesterday. Rather annoyingly, Adobe decided to push the Java 7 patch out to "before the EOL date".

Weirdness with interface caching: can someone sanity check this please?

G'day
I was going to troubleshoot something I read somewhere about someone having some issues with interface caching. That sounds vague, but I don't have the URL on me at the mo', and haven't got far enough to really comment on it yet.

As part of the investigation I knocked together some code, and I am seeing "unexpected results" from my baseline testing.