You know, I see MUCH more of that than I'd like - from experienced
developers.  Not the variable assignment part which is what I'm sure
you were highlighting, but the assignment of a variable to another
scope for no particular reason.  I can't tell you how often I see
things like <cfset variables.myVar = request.someVar />.

>From the context, there's absolutely no reason for the assignment
except to copy the value into the "local" scope.  Ugh.

On 7/6/06, Everett, Al (NIH/NIGMS) [C] <[EMAIL PROTECTED]> wrote:
> More fun is working with code from people just learning CF. Here's one
> of my favorites:
>
> <cfif len(trim(url.myVar))>
>         <cfset myVar=url.myVar>
> <cfelse>
>         <cfset myVar="">
> </cfif>
>
>
>
>
> -----Original Message-----
> From: Peterson, Chris [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 06, 2006 9:11 AM
> To: CF-Talk
> Subject: Old code woes
>
> Do you ever have to re-visit and revamp projects you did when you first
> started working with Coldfusion?  I am making a few changes to a report
> almost 5 years old, and I come across this little gem.  Thought you all
> might enjoy a laugh this morning.
>
> #Replace("&nbsp;X&nbsp;", "?", """", "ALL")#
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:245523
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to