"Murphy was an optimist!"
Simplifying Code August 11, 2010 9:55 pm
Posted by Doug McCaughan in : ColdFusion, Programming, TechnologyOften I run across code like this:
<cfif ArrayIsEmpty(Cart.Products)>
<cfset HasCart = False>
<cfelse>
<cfset HasCart = True>
</cfif>
Frankly, that makes me twitch a little. This has the same result:
<cfset HasCart = NOT ArrayIsEmpty(Cart.Products)>
2comments
Deep Thought August 11, 2010 12:08 pm
Posted by Doug McCaughan in : Deep Thoughts, PhilosophyIf my head explodes, who will clean up the mess?
add a comment




























