Query of Queries really helped me out this morning. The Model-Glue team is working on a ColdFusion Builder extension and we need to get a list of files to inspect. There could be many types of files in a project that aren't relevant to our purposes and I wanted to filter only the ones I need.

My Directory query contained lots of SVN specific files, which make for a good example of what we want to filter, before doing our inspection work.

Original Directory Query

What we need in this case is to filter anything that isn't a CFM, CFC or XML file. The CFDirectory tag will allow only a single filter, so what do we do?

In ColdFusion, I would use listlast( filename, ".") to look at the file extension but that would mean I'd have to unpack the query and either make a new one, or pack it in another datastructure. Waste of code, I tell ya. I ended up using Query of Queries and a LIKE statement to filter.

New Directory Query

The Code I Used for the Query of Queries

ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.org<cfquery name="CleanedDirectoryQuery" dbtype="query"> SELECT * FROM arguments.sourceDirectoryQuery WHERE lower(NAME) LIKE '%.cfm' OR lower(NAME) LIKE '%.cfc' OR lower(NAME) LIKE '%.xml'</cfquery>1<cfquery name="CleanedDirectoryQuery" dbtype="query">2SELECT * 3FROM arguments.sourceDirectoryQuery4WHERElower(NAME) LIKE '%.cfm'5ORlower(NAME) LIKE '%.cfc'6ORlower(NAME) LIKE '%.xml'7</cfquery>

The secret sauce is the lower() function on NAME, and the LIKE conditional with a wildcard % operator. I found this through the Query of Queries documentation and I also learned about a few other wildcard operators as well.

List of Wildcard Operators Supported In Query of Query LIKE conditional

The underscore (_) represents any single character.

The percent sign (%) represents zero or more characters.

Square brackets ([ ]) represents any character in the range.

Square brackets with a caret [^] represent any character not in the range.

I spent a number of hours researching a bug in a Model-Glue application. Each time a form was submitted successfully, a duplicate record showed up in the database.
This application uses a number of frameworks and it wasn't very clear which layer was causing the problem.

I started to dig into the issue, looking for any rhyme or reason and pinged my good buddy Ezra Parker for some sanity checks.
After some intense debugging, we found out that the second record in the database showed up after the ColdFusion request ended. I tried all sorts of programmer sorcery to find out why this second request happened and did not get much useful information. This duplicate request problem defied all logic!

Through the course of working through the information and issues, we explored many potential causes and questions like:

Was Model-Glue possibly adding a second redirect somewhere?

Was there a CFThread buried in Model-Glue, ColdSpring, Transfer or CFUniform that caused this?

Was there some javascript call being fired off, and replicating the request?

While working on some Model-Glue documentation we needed to convert an open office document to TracWiki format. I'm not fluent in TracWiki and I certainly didn't want to manually format 30-40 pages.
Thankfully, there is an Open Office --> TracWiki conversion macro that will automate pretty much all of it. It helps if you used the Styles features of Open Office because the TracWiki will be cleaner, but no worries, it'll convert it anyways if you didn't.
Here is how it works.

Open the Open Office document you want to copy text from. We'll call it the Source document.

Set the macro permissions to Medium or Low by going to the menu -> Tools -> Options -> Open Office.org -> Security -> Macro Security

Highlight the text in your Source document, copy it, then paste it into the ODT file.

Press the button with the correct format, the text will be converted to the correct wiki format and copied to the clipboard. (English is on page 2)

Paste the text from the clipboard into the edit box in your wiki.

You now have converted Open Office document text to wiki format.

The conversion picked nearly everything. I manually cleaned up white space issues and also added in code blocks around all the source code sections, but I was very pleased with the amount of work handled by the OpenOfficeToTracWikiScript.

BFusion is a super-mega-low cost event ($10) that has excellent content by excellent speakers. Held on the campus of Indiana University, the vibe at the conference is very open and inviting. If you come, you can get lots of hands on training in ColdFusion and Flex basically for free.

Did you know, BFusion was the inspiration for the CFinNC event this past weekend? Yep, good things happen at BFusion/BFlex. Folks get inspired, improve their skills and careers, and forge lasting friendships with really great people.

So cancel your weekend plans, get in the car, bus, plane, or train and head down. If you aren't totally impressed with BFusion/BFlex, I'll personally refund your $10.

I'm glad I'm able to go to this conference because the schedule is packed with quality material by highly decorated speakers. Having interacted with a number of Australian developers through mailing lists and chat, I'm very pleased to meet some of the legends in person and to meet the very vibrant, entertaining ColdFusion community from Australia, New Zealand and Asia.

Seats are limited and there are less than 4 weeks until the conference. Register today!
I hope to see you there!

ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.orgRemoved potential recursion in this functionalityAlso removed useless cfdump when a helper is attempted to be included but doesn't have a cfc or cfm extension1Removed potential recursion in this functionality2Also removed useless cfdump when a helper is attempted to be included but doesn't have a cfc or cfm extension

Was changing the multi-line comment to a single line comment. Once the comment was a single line, there was no issue checking it in. I'm not sure what I learned here, but I hope SVN doesn't REALLY have a problem with multi-line comments, after all, we need those to keep details on what changed!

Bucky Schwarz, TACFUG Member, CFinNC Conference planner, Model-Glue contributor, posted a link on twitter today called The Unspoken Truth To Managing Geeks. I read this with my morning coffee and felt compelled to share it with the rest of you, since the article was so well done and happened to hit many fastening devices on their apexes. (Bonus points if you can translate that sentence).

Go read the article for yourself, I'm not going to delve into any insightful commentary, heck, it is 8:00 in the morning! I will, however, share two of the passages that prompted me to put this post in tubes for you all to enjoy.

...IT pros are sensitive to logic -- that's what you pay them for. When things don't add up, they are prone to express their opinions on the matter, and the level of response will be proportional to the absurdity of the event. The more things that occur that make no sense, the more cynical IT pros will become. Standard organizational politics often run afoul of this, so IT pros can come to be seen as whiny or as having a victim mentality. Presuming this is a trait that must be disciplined out of them is a huge management mistake. IT pros complain primarily about logic, and primarily to people they respect. If you are dismissive of complaints, fail to recognize an illogical event or behave in deceptive ways, IT pros will likely stop complaining to you. You might mistake this as a behavioral improvement, when it's actually a show of disrespect. It means you are no longer worth talking to, which leads to insubordination.

...later on in the article...

Most IT pros support an organization that is not involved with IT. The primary task of any IT group is to teach people how to work. That's may sound authoritarian, but it's not. IT's job at the most fundamental level is to build, maintain and improve frameworks within which to accomplish tasks. You may not view a Web server as a framework to accomplish tasks, but it does automate the processes of advertising, sales, informing and entertaining, all of which would otherwise be done in other ways. IT groups literally teach and reteach the world how to work. That's the job.

So if you haven't yet read the article, The Unspoken Truth To Managing Geeks yet, go for it. It is illuminating and will help us all to be personally productive as well as more useful to those we impact and manage.

I'm honored to give 4 different presentations at CFUnited. I'm especially excited to give "Model-Glue:Gesture for Fun and Profit" as it shows some really bada$$ features of the just released (today) Model-Glue 3 so try to make a special effort to come to that one, if you can. No powerpoint, just code!

CFUnited is right around the corner. I can close my eyes and clearly remember last year's CFUnited like it was a month ago. "Where does the time go?", they say?

I remember in High School watching the second hand slow dance across the dial. Each minute broken up into 60 equally agonizing seconds each in turn taking it's own eternity.

One way I mark time is by looking at my blogging habits. My blogging habits have been abysmal. I partially blame twitter, the ultra-time-suck-in-140-characters or less, since twitter serves as an outlet to the world for me. I also blame Facebook to a lesser degree, though I've long since removed any vestige of twitter or facebook from my work computers in an attempt to control my distractions.

I can also say that Model-Glue has taken it's share of time as well. Thankfully there is a large community of active contributors willing to put in time to keep the framework moving so it is certainly a manageable workload. ( though depending on who you ask, manageable might be debatable). Shepherding Model-Glue to the final 3.0 release is one of my recent professional accomplishments I'm most proud of.

I've also recently gotten married. June 6th to be exact. As proof, I stuck a picture in this post. Don't worry, I won't bore you with more.

We've also combined houses, and bought a new house, and are in the process of closing on the new house and selling the old house. This is a tremendous amount of work and I never thought I'd ever spend 14 hours spreading mulch, but I can chalk it off to one of my professional accomplishments I'd like not to repeat too often :).

I'm also involved, along with most members of the best CFUG on the face of the planet in planning the CF in NC conference. If you are new to this idea, we are holding a really great Adobe Platform in the Research Triangle Area of North Carolina. Thanks to the dedication and cleverness of the members of the planning committee, and the generosity of our sponsors, we've managed to remove the cost of the registration fee. Our unofficial slogan is "The Economy Sucks, We Don't. Come to CFinNC!"

I've missed a few things along the way. I missed the chance to really get down and dirty with CF9 once it hit public beta. I missed the rescheduling of Flex 4 for 2010. Heck, I even missed the chance to spew my own brand of bullpoop in the last Great OO Is Dead blog war.

I think things will settle down a little after CFUnited. I'll be able to really get into CF9 and learn how to make the best use of the newest, hottest features. I'll have time to work on my SuperSecretAIRApplication. I'll even have time to blog more, which I dearly miss.

If you've stuck around this long, thanks. Sometimes we all need to reflect a little and remember where we've come from, so we know where we're headed. Best wishes to you in the last half of 2009.