> -----Original Message----- > From: Richard Crawford [mailto:[EMAIL PROTECTED] > Sent: Monday, May 23, 2005 10:37 PM > To: CF-Talk > Subject: Re: There's got to be a way around this > > On Monday 23 May 2005 18:22, Ben Forta wrote: > > FORM is a structure that contains all HTTP POST fields, and you can loop > > through it easily. > > Thanks! I'm trying to figure out some old code written by some previous > developers, and they used some incredibly complicated tricks to deal with > having to have all variables pre-defined, including a special stored > procedure that creates a temporary file which contains all the fields... > As > you can imagine, it has a slight impact on performance.
There are generally two reasons for something like that: 1) The code is very old - we've still got code from CF 2.0 around and it's pretty damn nasty. ;^) A lot of the stuff we take for granted (structs, scopes as structs, even arrays) didn't exist in earlier versions of the language. (As a hint: if you see "ParameterExists()" in your code you know it's geriatric.) 2) The developers were very bad. Or, more specifically, very bad at CF. I've often wanted to start a "worst code" contest for people to post the worst of the worst that they come across. In my experience most of this is just a failure to skim the reference manual. I've got one block of code I save that's 15+ lines long: it pulls two values from a string formatted as "agencynumber-agentnumber". The developer in question used it as an example of "how hard it was to do simple things in CF compared to Java" in meeting. I wrote "#listfirst(var, "-")# and #listlast(var, "-")# on the whiteboard. ;^) Jim Davis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207507 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

