Pet peves:

Not scoping variables
Not scoping variables
Not scoping variables

use of the same query name for every cfc/cfquery

oh.. and Not scoping variables



On Mon, Jan 4, 2010 at 3:23 PM, Cameron Childress <camer...@gmail.com>wrote:

> Since the topic of the next ACFUG meeting is how NOT to code CF, I'd be
> interested in seeing some examples from people on the list of code that you
> frequently see.  Also - why is it wrong?  Does it present a security or
> performance problem?  Is it a big time no-no or is it just a minor thing or
> maybe annoying (or hard to read) syntax?
>
> This may provide John with some good fodder for his presentation as well...
>
> Of course, there are exceptions where almost anything is appropriate,
> however...
>
> I'll mention one I see ALL THE TIME - enabling both client and session
> variables in the Application.cfc|cfm when only one is being used.  Can
> become a serious performance issue under load.  I guess along with this is
> actually using BOTH session and client variables in the same application.
>
> Also, using lists where you should be using an array, struct, or other
> faster mechanism.  The longer lists get in CF, the slower they get.  I have
> seen lists with 1,000 or so items totally choke under load.  This can show
> up in unexpected places too like listFind(valueList(query.column), myValue).
>
> What are some of your pet peeves and examples of downright bad code?
>
> -Cameron
>
> --
> Cameron Childress
> Sumo Consulting Inc
> http://www.sumoc.com
> ---
> cell:  678.637.5072
> aim:   cameroncf
> email: camer...@gmail.com
>

Reply via email to