TACFUG Meets Tuesday November 6th - Jim Priest On Selenium and ANT

Tuesday November 6th, Jim Priest will present on Selenium IDE and ANT. I am a big fan of both of these tools for Rapid Development. I was out of town when Jim gave his initial ANT presentation so I am pleased he is giving an encore.

Selenium is a framework for testing web based UI. ANT is a framework for scripting and automation. Both are very easy to learn and extremely powerful. Proper use of Selenium and ANT will increase the quality of your production software, reduce repetitive work and save you time. You need to have these tools in your tool chest.

The meeting starts at 6:30 PM, details are at the TACFUG Website. You may RSVP here.

BTW, If you do not know Selenium, watch this 3 minute clip.

Four software development guidelines

The only thing I hate worse than making mistakes, is repeating a mistake. Yesterday I was working through a very frustrating set of circumstances and had gotten myself micro-focused. This is a mental equivalence of painting oneself in the corner. Bassil Karam, one of the coolest guys you will ever meet and a very talented programmer, helped me out of my mental hole. I made several problem solving mistakes and I want to share them with others.


Three software development guidelines

This post has been changed to Four Software Development Guidelines

Here is a funny picture for your trouble:

What tools do use to design websites?

Being part of the Kalendar UI Design team was a very enlightening process. One of the things I learned is that some people are truly gifted. Another thing I learned is that Designers are very particular about their choice of tool. Another thing is Designers do not often agree on which tool is the best. Upon reflection, none of this is surprising.

It has awoken a desire to be more proficient in Design tools. I have previously used Fireworks and Photoshop to modify images. I have played with filters drop shadows, layers and the like with mixed results. I have also lost my temper trying to make simple graphics. Thus, I am a confessed n00b.

Mainly, my work is for the web. Thus, I want to learn a tool that creates web based layouts quickly. If you have experience with creating and working with web ready assets, I would like your opinion. Which tool do you recommend for making web layouts? Why do you prefer that tool?

Dana Kowalski sez: Crack Open your Toolbox and Share

Dana Kowalski has started a very interesting and timely discussion on those little programs you just can't live without. Coincidentally, I learned about an interesting hot key app called AutoHotKey while talking to Gerry Gurevich and Jim Priest at TACFUG just last night. Gerry told me how a developer at Lockheed Martin used AutoHotKey to automate a very annoying internal process. On my way home, I had the feeling there are a lot of tools that would make my life easier if I only knew about them. So thanks to Dana Kowalski for starting this meme.

Here is my short list of Must Have Tools


Is your code Thread Safe? How do you know?

Code that is not Thread Safe is sneaky, dangerous and leads to bewildering production errors and strange side effects.

As part of my deployment procedure, I run code through an automated code analyzer for improperly scoped variables. Today, while running the analyzer, it flagged this set of code:

view plain print about
1<cfset var ExistingRiskValuesList = "" />    
2<cfset ExistingRiskValueList = valuelist( RiskAssessmentQuery.TotalLeaseRisk ) >

"Wait just a minute", I said, "There is nothing wrong with that bit of code". Upon closer inspection I noted the 's' and quickly made the correction. Had I not used the automated code analyzer, this Thread-Unsafe code would have went into production.

There are many good posts about var scoping your variables, should you need more convincing. Mike Schierberl actually made and posted a video showing a memory leak in action caused by code that is not thread safe and Mike also gives away the automated code analyzer. If you haven't yet, I challenge you to download it and run it against some code. You might be surprised!

Update: Mike Schieberl and Zac Spitzer have made some improvements to the Var Scoper tool. The tool parses cfscript and is now hosted on http://varscoper.riaforge.org/ . Thanks Mike and Zac for the fine work on one of the most important code checking tools out there!

So you want to use Transfer ORM in your ModelGlue:Unity application (Part 1)

Previously, we connected Transfer ORM into our ContactOMatic application. Now, we will use it to get some things done! The completed files for this exercise are included at the bottom of the post, just click on the 'Download' link.

Using Transfer with MG:U is quite different than hand coding all the data access instructions so I separated out the new Transfer enabled code from the old hand coded bits to help compare similar operations between the two styles. This means the ContactOMatic is not an example of Architectural Purity! Shock! Horror! Gasp!

To make the separation, I added another ModelGlue configuration file, named ContactAction.xml, to the main ModelGlue.xml file through the use of the include tag as follows:


Download Download

Solving Problems with FireBug

Dave Ferguson posted recently about HTML CFGRID style column content and focuses on how to style columns in an HTML CFGRID. The true gem of this post is how he used Firebug to walk down the markup and find the class names and properties of the CFGRID output.

Firebug is truly a wondrous tool. I use it every single day and I save a TREMENDOUS amount of time when working with HTML and Javascript. Also, I've really reduced the number of times typing:

view plain print about
1alert('what is this variable ' + varName );
view plain print about
1alert('Just work this time, #$*@*&$&!! ' + varName );

I wrote about Firebug previously and provided a link to a Video by Joe Hewitt explaining the feature set of Firebug 1.0. Joe Hewitt created Firebug and does a great job showcasing the features on this video, courtesy of YUI Theater. I recommend viewing this video, if you have not already.

Thanks go to Dave his original post. I look forward to more great content at Dave Ferguson's blog.

The Evil Side of Maintain Database Connections and Stored Procedure Errors

A word of caution. When working with Stored Procedures in a development environment, do yourself a favor and untick the 'Maintain Database Connections' option.

If a stored procedure call results in an error, Maintaining Database Connections will sometimes cache the error and hand it back to you regardless of how the call is altered. These are very annoying symptoms to debug! In fact, when I first figured this out, I had already spent 4 hours the previous day combing through an Oracle stored procedure for any possible error when I logged in fresh at 8AM to find the process magically working. I felt like I was on Candid Camera. When I dug deeper, I found unticking 'Maintain Database Connections' would allow my SQL Stored Procedure calls to process fresh each time.

So you can pull out your hair if you want to, or you can untick Maintain Database Connections in your development environment.

A note, the Maintain Database Connections setting is under the Advanced Settings for a specific Datasource configuration. As far as I know, you will have to alter every datasource individually.

Installing Transfer in ModelGlue:Unity

Today we will install the Transfer ORM inside our Contact-O-Matic application. To complete this tutorial, you should have the Contact-O-Matic installed and running. If you have not completed this step, please create the database described at the bottom of Series 6 and install the files at Series 10 download link. Test the application by manually adding several ContactTypes to the ContactType table in your database (I chose Co-Worker, Enemy, Friend). Then use the Contact Form in the ContactOMatic application to enter a few contacts.