"Murphy was an optimist!"
No, I won’t use your CMS June 25, 2013 8:36 amPosted by Doug McCaughan in : ColdFusion, Communications, Programming, Software, Technology
So I’m doing some ColdFusion research (the Adobe kind not the physics kind) and thought it might be time to bring CFNinja.com back to life (not that it ever had much of a life). I hesitate to turn CFNinja.com into a WordPress site since CFNinja originally started with the intent to be a central location for ColdFusion developers to collaborate and it seems silly to use a PHP driven application for a CF site. The recommendations for a CF CMS seems to be Content Box. I figured I would install it real quickly and compile some of my research using Contentbox on CFNinja. First, the online documentation goes to a 404 page:
Not good for a content management system to not be able to find its own documentation. Even the older docs 404. Ah! Just went to reproduce the problem and found another path to the docs. Hmm. Maybe I’ll do this afterall.
Any other alternatives for ColdFusion CMS systems?2comments
Query of queries reports runtime error February 22, 2013 12:21 pmPosted by Doug McCaughan in : ColdFusion, Programming, Technology
So are you pulling your hair out because your query of queries is returning an error "Query Of Queries runtime error."? The solution is rather simple. In your query that is feeding your QoQ, you probably have a column that is of datatype nchar. Cast that to a varchar and life will be good. Do the cast in the source query not the QoQ. eg. "CAST(foo AS varchar) AS bar" You’re welcome.
p.s. Yes, you can cast it to the same column name eg. "CAST(foo as varchar) AS bar" Case doesn’t matter.add a comment
Simplifying Code August 11, 2010 9:55 pmPosted by Doug McCaughan in : ColdFusion, Programming, Technology
Often I run across code like this:
<cfset HasCart = False>
<cfset HasCart = True>
Frankly, that makes me twitch a little. This has the same result:
<cfset HasCart = NOT ArrayIsEmpty(Cart.Products)>
No matter how long you do something, there is always more to learn. You’d think that since I’ve been doing HTML coding since around 1993, I’d pretty much know every in and out and every little tag and peculiarity regarding HTML. Not so. See, we form habits. We get into patterns. Specs change but we retain earlier hacks and assumptions. Today I learned an absurdly simple thing. Maybe I knew this and forgot. I rarely use tab orders on my forms. Most of the forms I create are very top down so the natural tab order is sufficient. In computing, counting starts at zero. But in HTML tab order, zero means exclude that form element from the tab order.
To exclude an element from the tab order, set the value of tabindex to 0. [Source, Webcheatsheet.com, How to Control Tab Order in HTML]
HTML is about to become HTML 5. Funny enough I just traded my HTML 3.2 book at McCay’s a few weeks ago. Maybe I should have kept it and re-read it.
Those elements that do not support the tabindex attribute or support it and assign it a value of “0? are navigated next. These elements are navigated in the order they appear in the character stream. [Source, W3C, 17.11.1 Tabbing navigation]
Your AJAX book recommendations please July 23, 2008 11:38 amPosted by Doug McCaughan in : AJAX, ColdFusion, Programming, Technology
If I was going to buy ONE AJAX reference book to add to my library of dust collecting, quickly antiquated computer references, which AJAX book would you suggest? And by the way, does anyone need a copy of Ben Forta’s ColdFusion Application Construction Kit for version 3 of CF?add a comment
Mondays begin with error messages May 12, 2008 9:32 amPosted by Doug McCaughan in : ColdFusion, Daily Life, Programming, Technology
Just once I’d like a Monday to start off with something that doesn’t look like this:
An error occured while Parsing an XML document.
Content is not allowed in prolog.
Update: The XML file had been corrupted on uploading it to the production server. Uploading a zip file and extracting it on the server solved the problem. Also added trim() to make sure there was no extraneous whitespace.add a comment
Take THAT you evil code! May 6, 2008 6:30 amPosted by Doug McCaughan in : ColdFusion, Daily Life, HTML, Programming, Technology, XML
Yes! I have been fighting a horrid coding problem and the code just lost! I beat it! I mean this is the type of problem that makes you have bald spots and want to give up programming for something less painful like digging latrines in third countries. This is like I’ve been trying to build a car engine but everything is in metric and all my tools are SAE and the client doesn’t care about the engine but really wants to know why the paint isn’t on the car yet. Oh how I want to be beyond the paint and putting the last bit of polish on the application. Today I should be able to make much progress. Oh wait, no I have to be at the body shop by 8am! Guess my workday will begin at 10am. How frustrating!add a comment
Stupid CF Configuration Errors and MS SQL April 17, 2008 11:19 amPosted by Doug McCaughan in : ColdFusion, Programming, Technology
You know when you are on a tight schedule, the stupidity that comes with MS SQL, ColdFusion and a Windows Server can make you go bald. There is no reason for something as simple as creating a datasource to be throwing dumb error messages!
Connection verification failed for data source: foo
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user ‘foouser’. Reason: The password of the account must be changed.
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user ‘foouser’. Reason: The password of the account must be changed.
The password has been changed half a dozen times!
Update: Ah! Either 1) Know what your password policy is and make sure your password is compliant or 2) turn off “Enforce password policy” and “User must change password at next login” (which was my problem). For a datasource, you can probably remove the check from “Enforce password expiration” as well. Note that if you try to do all three of these at once that you will get errors. Remove “User must change password at next login” first then “Enforce password expiration” then “Enforce password policy”.1 comment so far
Why didn’t you just do that in the first place? April 17, 2008 6:38 amPosted by Doug McCaughan in : ColdFusion, Daily Life, Programming, Technology, XML
Years ago I ripped all the paneling out of the downstairs, tore out cabinetry, plumbing, a sink, and a wall. I waterproofed the concrete block wall first by filling any cracks with a mortar then painting the block with a thick waterproofing sealing primer. The wife asked, "why is this taking so long?" I then created studs for the new wall which included a walk-in closet and a nook that the previous setup did not include. The wife asked, "why is this taking so long?" I pre-drilled the studs for wiring and ran electric, cable (to multiple drops), and ethernet (to multiple drops). The wife asked, "why is this taking so long?" Next I insulated the walls and hung the drywall. The wife asked, "why is this taking so long?" Finally I was able to do the tedious step of applying joint compound (spackling) to fill the gaps and cover the drywall screws. If you mess up the joint compound, the mistake will be clearly seen when paint is applyed. I sanded and sanded and reapplied compound and sanded and sanded. The wife asked, "why is this taking so long?" Finally I was able to put a coat of paint on. The wife asked, "why didn’t you do that in the first place?"
Often my programming is very similar. A lot of detail goes into the framework of the site, that is the behind the scenes stuff that nobody ever sees. As a matter of fact, if I have done my job well, anything complex should be hidden from the user and the website should leave them with a "wow that’s easy! I could do this!" feeling.
My current project involves using ColdFusion to fetch a large amount of data from a data provider (some other company that has a really big database which frequently updates) in an xml format then parse it to save the results in my client’s database. I have made it over a huge challenge! But all my work is invisible to the frustrated client. I’ll put up the visible side shortly and I fear the client will ask, "why didn’t you do that in the first place?"1 comment so far
Blogging saves me time! October 23, 2007 10:43 amPosted by Doug McCaughan in : Blog, ColdFusion, Daily Life, MySQL, Publishing, Technology
Why do I blog? Because when I spend a large amount of time troubleshooting, the next time the problem comes around (like getting ColdFusion 7 to connect to a MySQL datasource), I just have to read the post.add a comment
Today’s focus: ColdFusion! (with a side of Access) September 24, 2007 7:49 amPosted by Doug McCaughan in : ColdFusion, Daily Life, Programming, Technology
Today I will use ColdFusion for PDF manipulation of data received by fax and saved as gifs or jpegs. I will also generate lots of reprots with ColdFusion, I will make data dance on the screen, and I will get MS Access to produce a printed book from its 14 tables of data.
This evening I’ll take the boys to their scout meeting.add a comment
My Senators Do Not Represent Me September 19, 2007 10:06 pmPosted by Doug McCaughan in : ColdFusion, Politics, Regional Politics (SE), Touchy Subjects, United States
Statement of Purpose: To restore habeas corpus for those detained by the United States.
Tennessee: Alexander (R-TN), Nay Corker (R-TN), Nay
Dear Adobe…what’s wrong with you? September 16, 2007 10:29 amPosted by Doug McCaughan in : ColdFusion, Programming, Technology
Hello Adobe! Livedocs sucked much less (can’t say it was much better) when you could filter functions and tags by ColdFusion version. Believe it or not, everyone has not upgrade to ColdFusion 8 yet. Guess what! Not everyone will! I still have clients using ColdFusion 5. It
isused to be very nice to be able to look in the documentation and see only the stuff that applied to a specific version of the product. Now you have to read the history notes to decipher what applies to your specific situation. Very cumbersome!
I am certain some marketing person told you that including the ColdFusion 8 function descriptions in the help would excite people using older version to upgrade and yes the CF8 new functions sound very intriguing but that isn’t going to inspire me to run out and upgrade. I’m the developer! Not the purchasing agent. All you’ve done is frustrate an advocate of your products.add a comment
I like my work September 13, 2007 10:12 pmPosted by Doug McCaughan in : ColdFusion, Programming, Quality Assurance, Technology
I build very complex web application systems. I mean so complex that sometimes I forget that certain functions were built into the program; sometimes they surprise and even impress me. One of my habits is to code for the impossible. I often will slip in error messages for conditions that should never occur.
"Ever since the first computers [t]here have always been ghosts in the machine. Random segments of code… that have grouped together to form unexpected protocols. Unanticipated? There free radicals engender questions of free will… creativity… and even the nature of what we might call the soul." [Source] excerpted from I, Robot
Tonight I was testing an application I am trying to launch when I received "Something strange has occurred. Please log out and log back into the system then try your request again." Strange indeed! I usually make my impossible error messages a little more meaningful.add a comment