The Dopefly Tech Blog

<< The Dopefly Tech Blog Main page

Creative code (where creative = bad) - Part 1

posted under category: ColdFusion on September 16, 2008 at 1:00 am by MrNate

I've got a few of these types of entries lined up. If you have a blog, post your own!.

<cflock name="#createUUID()#" type="exclusive" timeout="30">

This code creates a uniquely named exclusive lock - that's an oxymoron. If the name of the lock is unique every time this code runs, the cflock will never lock anything until somehow, magically, createUUID() returns the same value twice, within 30 seconds (right, not very likely).

Too old to comment!
On Sep 16, 2008 at 1:00 AM Bob Silverberg (bob.silverberg has underestimated said:
So did you actually see that lovely snippet in some production code?

On Sep 16, 2008 at 1:00 AM Nathan Strutz ( said:
Well of course I did. No fun in posting bad code if it never left the ground. I don't remember the exact site it was from, but yeah, very production, very not useful.

On Sep 17, 2008 at 1:00 AM Allen ( who would have preferred an address at said:
Oh, that's horrible. Worse than some of the if/elses I've came across that will never run any but of the conditions.
Too old to comment!