By barneyb on May 19, 2009
This evening while adding some reporting to PotD (NSFW, OMM) to help nail down some performance issues that I think are Apache's fault, I noticed a strange issue with FB3lite. If you've used it, you know the core of the "framework" are the do() and include() UDFs. Both contain a CFINCLUDE tag, and a weird [...]
Posted in cfml, coldfusion, fusebox, tools
By barneyb on April 13, 2009
It's pretty common knowledge that ColdFusion passes arrays to UDF by value, and not by reference like pretty much every other language. It's a weird behaviour, but as long as you remember to write array-processing functions to be used like this:
<cfset myArray = modifyArray(myArray) />
instead of like this:
<cfset modifyArray(myArray) />
you'll be fine. However, someone pointed [...]
Posted in cfml, coldfusion, railo
By barneyb on April 7, 2009
Ben Nadel posted another interesting code snippet this moring. I think Ben and I stand in agreement on the technique: NEVER EVER USE IT. It leverages a horrible bug in ColdFusion's implementation of struct literals that I've blogged about previously.
Here's the snippet:
<cfset objConfig = {
root = getDirectoryFromPath(getCurrentTemplatePath()),
tags = objConfig.root & "tags/",
[...]
Posted in cfml, coldfusion, railo
By barneyb on March 2, 2009
I'm a huge fan of Groovy, but it's major downside drove over me like a bus this evening. What's that, you say? Performance, of course. Runtime "stuff" necessarily happens at runtime, and therefore affects performance. Does this matter in most cases? No, absolutely not. In general it's far cheaper to buy hardware than to employ [...]
Posted in cfml, coldfusion, groovy, project euler
By barneyb on January 16, 2009
I was bored tonight, so I found some art. And being the good programmer, generalized it to create a tool for others to find their own art. Here are a couple samples (dynamically generated):
You can also grab the source from Subversion. It's quite simple, it's not very scalable, and dear god please let CF9 make [...]
Posted in coldfusion, personal
By barneyb on November 26, 2008
Just completed my first port of a major app from ColdFusion to Railo. Time elapsed from downloading the Railo WAR to my dev box to see if the app would run to reenabling the prod instance: 1.5 hours.
Downloaded the WAR, unpacked it into my webroot, unzipped a new Tomcat, set up a Context pointer to [...]
Posted in cfml, coldfusion, railo
By barneyb on October 16, 2008
Just did the 1.6.0_10 upgrade on my server. Oh how I love Linux. Just unarchved the new JDK, repointed a single symlink and restarted my Java servers. There didn't seem to be a significant difference in spinup time for my ColdSpring AOP-heavy apps – perhaps a touch faster. No problems with Magnolia either as near [...]
Posted in coldfusion, java
By barneyb on October 13, 2008
I've been having troubles with thumbnail generation on one of my apps recently. Just sporadically, with no obvious pattern as to why. The error is about a missing Huffman code (used for JPEG compression). Turns out that certain images when being written at certain sizes, throw this error when you use the built-in imageWrite().
The solution [...]
Posted in coldfusion
By barneyb on September 30, 2008
If you use Application.cfc mappings on Adobe CF, watch out. If your mapping names contain only alphanumerics, the leading slash is optional. However, if the name contains other characters (like an underscore), then you HAVE to use the leading slash or it won't resolve. Ran into this on an app where my "coldspring" mapping worked [...]
Posted in coldfusion
By barneyb on July 18, 2008
I just pulled down the 1.0 release of MX Unit, and was most disappointed to see that it only works on ColdFusion:
…blah…
no definition for the class … [coldfusion.cfc.CFCProxy] could be found
…blah…
Since I do most of my CFML development on Railo now, it kind of leaves me stuck. Fortunately, CFCUnit works flawlessly, but with it's definitely [...]
Posted in coldfusion, railo, tools