Every time I make a blog post I'm always amazed at how 5 different readers can immediately post a comment showing me a better way to do something or adding additional information to my original post. I sometimes say to myself, "Muse... it's too bad that programmer doesn't work on your team". Well, here's your big chance.
It just so happens that CF Webtools is looking for an advanced Coldfusion programmer. CF Webtools has an outstanding group of projects using the latest technologies like Flex, Ajax, Farcry and the latest frameworks. CF Webtools does projects for major corporations like ACS, Lincoln Financial, National Equite and Sergeants Pet Care products. This could be your big chance to join us and work on a terrific team. We are located in beautiful Omaha, NE - the Best Kept Secret in the country and consistently ranked among the top 10 places to live in the U.S. We offer an excellent salary, a great place to live, and exciting work. Our benefits include health insurance, life insurance, optional disability, 401k, FSA and flexible hours (so you can put your family first).
If you are interested send your inquiry and resume to jobs@cfwebtools.com. If you want the "official" requirements you will find them on our company web site at this link, but regular muse readers will probably already know exactly what we are looking for.
Note, this is an onsight full time position. CF Webtools will assist with relocation.
I'm a big fan of ColdFusion on Linux. Not that I know half as much about Linux as I do about Windows. Still, we have a good number of Linux servers here at CF Webtools and CF Linux Guru Ryan Stille keeps them all humming a happy tune. I think both platforms have advantages. If you have ever tried to write ColdFusion code that is able to run on both Linux and Windows you will know there a few differences. One difference is case sensitivity for file names.
On windows if you include a file called "myfile.cfm with a cfinclude that is something like <cfinclude template="myFile.cfm"> it will work just fine. Move the same code to Linux and it will generate a "File Not Found" error because of the capital "F" in your include statement. The good news is that once you fix this problem on Linux you can move it back to Windows and it will now work on both platforms. The other common problem is a bit more challenging. It has to do with file paths.
Read More
Mike Henke reminded me of this slick little tool called varscoper. Pass in a directory and it will ferret out all the places where variables are not correctly scoped. For example, it will sshow where you have not correctly var'ed variables in a function. The project was produced by Mike Schierberl who's blog has some excellent goodies and tips.
varscoper won't catch the cfhttp scope, but it would catch a variable declared as a result attribute. Either way, it could save you some headaches - especially when dealing with a large pool of code, or taking over someone else's code.
Over the past few days on CF Talk Ian Skinner has been struggling tuning an application that makes use of CFTHREAD. In his application a process spawns threads for creating report files. Ian Reports that the process would spawn the threads, but the threads themselves would neither complete gracefully nor respond to a "terminate" action (<cfthread action="terminate" ...>). No suggestions from the muse or anyone else seemed to help. Finally he upgraded to ColdFusion 8.0.1 and the problem appears to be resolved. Threads complete gracefully without hanging around.
Nothing in the 8.0.1 release notes raises any red flags with me that would indicate why updated to 8.0.1 resolved the issue. I suspect that something very specific about his JVM was causing it. Still, it's nice to know if you run into this ticklish issue there is a way around it.
It's pretty common to use the application scope to cache components. If your component is a collection of methods or data access functions it's often faster to put them into the application scope than it is to create an instance with each request. Now you probably know that you should quality all of the variables in a function with the "var" key word. This insures that the variable exists inside the "scope" of the function call. This allows multiple function calls to be made to the same instance without one set of variables over writing the other.
One of the areas where this can be difficult to manage is when using a ColdFusion tag that creates its own scope. Take CFHTTP as an example.
Read More
Here's a quick public service announcement for all the muse readers. Apparently Coldfusion Weekly (a popular podcast) is ending its run. To pick up the slack, community member and CF Guru Brian Meloche has started a new podcast called CF Conversations. His first release is a round table discussion with Rick Mason, Adam Haskell, Aaron West, and Jeff Coughlin. There is also an i Tunes link.
Recently on CF Talk Bobby Hartsfield presented an interesting problem. A vendor required a submission of data as an XML packet. Since the data all came from a form post Bobby wanted to simply loop through the form fields to build his XML file. Each of the form field names would become a node in his XML doc. Sounds simple right?
Actually there is a problem with this approach. XML is typically case sensitive. If the vendor uses all upper or all lower case that's not a problem because you could simply UCASE() or LCASE() the field names. But what if the XML node names need to be mixed-case? For example, what if a node name was AdminUserName? You could add a form element to the form called AdminUserName, but when it is posted Coldfusion turns it into all upper case - as in ADMINUSERNAME. It's too bad there is no way to access the original case of the form elements before ColdFusion intervened. As it turns out (and thanks to some nifty code from both Bobby and the very bright Barney Boisvert) there is a way....
Read More
In my last post I talked about using a clustered index on some column other than the primary key. There are cases where this makes sense and it can have positive impact on performance. Recently however, CF Webtools own Jason Troy pointed out a consequence of altering your clustered index. You may recall that a "clustered" index really means that the actual data in the table will stored in the sort order specified by the index. Consider this example of a table called "emailer":
Read More