RE: better way to code?

2005-02-03 Thread S . Isaac Dealey
o:[EMAIL PROTECTED] >> Sent: 31 January 2005 13:50 >> To: CF-Talk >> Subject: RE: better way to code? >> >> In light of this discussion, how about lots of cfif >> statements buried in >> html...? s. isaac dealey 954.927.5117 new epoch : isn't it time f

Re: better way to code?

2005-02-01 Thread Keith Gaughan
Johnny Le wrote: > There is a discussion right now in CF-Jobs-Talk called "Indian Code". It says > "I mentioned to the client that the code looked like it was done by a first > month CF programmer. You know the type, pound signs everywhere, lots of CFIFs, > etc. Didn't say the code sucked or an

RE: better way to code?

2005-01-31 Thread kola.oyedeji
TECTED] > Sent: 31 January 2005 13:50 > To: CF-Talk > Subject: RE: better way to code? > > In light of this discussion, how about lots of cfif statements buried in > html...? > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monda

RE: better way to code?

2005-01-31 Thread Calvin Ward
In light of this discussion, how about lots of cfif statements buried in html...? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 31, 2005 8:46 AM To: CF-Talk Subject: RE: better way to code? Johnny Just to clarify, are you referring to lots

RE: better way to code?

2005-01-31 Thread kola.oyedeji
what you meant? Kola -Original Message- From: Michael T. Tangorre [mailto:[EMAIL PROTECTED] Sent: 29 January 2005 03:42 To: CF-Talk Subject: RE: better way to code? > From: Johnny Le [mailto:[EMAIL PROTECTED] > I shouldn't have given that specific example. My reason for

Re: better way to code?

2005-01-30 Thread Chris Jensen
Claude Schneegans wrote: > >>It seems to use the power of CF more. > > It may be, but is it really what makes "good code"? > > The first code is more intuitive , logical and it corresponds to the > real situation. > It explains more clearly the two situations that can be encountered. > The sec

Re: better way to code?

2005-01-29 Thread Adam Haskell
I think I do and nicely put joei think like puting this.a=namea snd this.b = nameb you have direct access to this.a to get the name instead of loopoing through a result and going if current value eq b output name. Am I following ya Joe? Adam H On Sat, 29 Jan 2005 13:43:52 -0500, Michael T. T

RE: better way to code?

2005-01-29 Thread Michael T. Tangorre
> From: Joe Eugene [mailto:[EMAIL PROTECTED] > This is true to a certain extent, most logical conditions can > be related > to a data structure without conditions (If conditions) and in most > situation the data structure make the code/application extensible. Joe... I don't follow you here??

RE: better way to code?

2005-01-29 Thread Joe Eugene
application extensible. Joe Eugene >-Original Message- >From: Johnny Le [mailto:[EMAIL PROTECTED] >Sent: Friday, January 28, 2005 9:19 PM >To: CF-Talk >Subject: Re: better way to code? > > >I shouldn't have given that specific example. My reason for >brin

Re: better way to code?

2005-01-29 Thread Adam Haskell
I think the place I see too many if statements is for some matchmatical figures. I can't honestly come up with one on a saturday morning/afternoon after a long night of wedding planning but I have seen code like if today is monday add 6 if today is tuesday add 5 ect... When they could have used ad

Re: better way to code?

2005-01-29 Thread Claude Schneegans
>>lots of CFIFs If one mean CFIF used when something simpler could be used, then this is true, but it is not particular to CFIF, one could say that any piece of code that could be simpler and/or more efficient makes the code look amateurish. Too many CFSET could mean exactly the same thing i

Re: better way to code?

2005-01-29 Thread Claude Schneegans
>>but I still feel that I have too many CFIF in my code. The quantity of IF statements has nothing to do with the quality of code. Replacing them with CASE just for the sake of reducing the number of IF is completely idle. As someone pointed out, IF... ELSEIF reevaluates a conditional expressio

Re: better way to code?

2005-01-29 Thread Claude Schneegans
>>Who says beginners code has a lot of cfif statements? Probabily beginners ;-) -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~~

RE: better way to code?

2005-01-28 Thread Dave Watts
> I shouldn't have given that specific example. My reason for > bringing this whole issue up is that people say beginners' > code has a lot of CFIF statements. I am using Fusebox now. > So it elimates a lot of CFIF statement already, but I still > feel that I have too many CFIF in my code.

RE: better way to code?

2005-01-28 Thread Michael T. Tangorre
> From: Johnny Le [mailto:[EMAIL PROTECTED] > There is a discussion right now in CF-Jobs-Talk called > "Indian Code". It says "I mentioned to the client that the > code looked like it was done by a first month CF programmer. > You know the type, pound signs everywhere, lots of CFIFs, > etc. D

Re: better way to code?

2005-01-28 Thread Barney Boisvert
Here's a link to the thread from last February about the relative speed of the two constructs, including results of the test that I did. http://www.houseoffusion.com/cf_lists/messages.cfm/Threadid=30474&forumid=4 The results were pretty conclusive, even moreso than I remembered. The tests weren'

Re: better way to code?

2005-01-28 Thread Johnny Le
There is a discussion right now in CF-Jobs-Talk called "Indian Code". It says "I mentioned to the client that the code looked like it was done by a first month CF programmer. You know the type, pound signs everywhere, lots of CFIFs, etc. Didn't say the code sucked or anything, just that it look

RE: better way to code?

2005-01-28 Thread Michael T. Tangorre
> From: Johnny Le [mailto:[EMAIL PROTECTED] > I shouldn't have given that specific example. My reason for > bringing this whole issue up is that people say beginners' > code has a lot of CFIF statements. I am using Fusebox now. > So it elimates a lot of CFIF statement already, but I still >

Re: better way to code?

2005-01-28 Thread Johnny Le
I shouldn't have given that specific example. My reason for bringing this whole issue up is that people say beginners' code has a lot of CFIF statements. I am using Fusebox now. So it elimates a lot of CFIF statement already, but I still feel that I have too many CFIF in my code. I am just l

Re: better way to code?

2005-01-28 Thread dave
F-Talk Subject: Re: better way to code? Actually, I did some reasonably comprehensive tests on CFMX 6.1 sometime last year, and found that this was NOT the case with CFMX's implementation of CFML. Using CFSWITCH was noticably slower. I don't remember the specifics for sure, but around

Re: better way to code?

2005-01-28 Thread Barney Boisvert
Actually, I did some reasonably comprehensive tests on CFMX 6.1 sometime last year, and found that this was NOT the case with CFMX's implementation of CFML. Using CFSWITCH was noticably slower. I don't remember the specifics for sure, but around 30% slower seems familiar for some reason. Note th

Re: better way to code?

2005-01-28 Thread Claude Schneegans
>>It's good to keep in mind that CFSWITCH/CFCASE tests for multiple values of the same expression, CFIF/CFELSEIF tests for multiple conditions. Abolutely, this is why CFCASE may be more efficient than CFIF/CFELSEIF if the expression is the same. But a CFIF/CFELSE also evaluates only one express

Re: better way to code?

2005-01-28 Thread Will Tomlinson
>More correct, not really. CFCASE, as any case construct in any language, >is not any better than a simple IF ... ELSE >IMHO, CASE constructs can be better for three cases or more. It's good to keep in mind that CFSWITCH/CFCASE tests for multiple values of the same expression, CFIF/CFELSEIF te

Re: better way to code?

2005-01-28 Thread Adam Haskell
On of java's pitfalls is file access, when compared to things like PERL, so anything you can do to cut down on file acessing the better so I would tend to say the first code with the IF would be better. Adam H On Fri, 28 Jan 2005 10:43:07 -0500, Claude Schneegans <[EMAIL PROTECTED]> wrote: > >>I

Re: better way to code?

2005-01-28 Thread Claude Schneegans
>>wouldnt using cfcase & cfswitch be more "correct"? More correct, not really. CFCASE, as any case construct in any language, is not any better than a simple IF ... ELSE IMHO, CASE constructs can be better for three cases or more. -- ___ REUSE CODE! Use cus

Re: better way to code?

2005-01-28 Thread Claude Schneegans
>>It seems to use the power of CF more. It may be, but is it really what makes "good code"? The first code is more intuitive , logical and it corresponds to the real situation. It explains more clearly the two situations that can be encountered. The second code leads to think that the second c

Re: better way to code?

2005-01-27 Thread Barney Boisvert
I'd say that any application that allows file paths to come from the URL is wrong, no matter the code. Second, any application that allows mixed relative and absolute paths for the same file is asking for trouble. And third, make sure you check for a leading "/" as well, or you code will puke on

re: better way to code?

2005-01-27 Thread dave
wouldnt using cfcase & cfswitch be more "correct"? From: Johnny Le <[EMAIL PROTECTED]> Sent: Thursday, January 27, 2005 11:42 PM To: CF-Talk Subject: better way to code? Which method of programming do you consider is better? This o

RE: better way to code?

2005-01-27 Thread Taco Fleur
Message- From: Johnny Le [mailto:[EMAIL PROTECTED] Sent: Friday, 28 January 2005 1:43 PM To: CF-Talk Subject: better way to code? Which method of programming do you consider is better? This one: or this one: I know that the first one is most people use, but the

better way to code?

2005-01-27 Thread Johnny Le
Which method of programming do you consider is better? This one: or this one: I know that the first one is most people use, but the second one is more interesting. It seems to use the power of CF more. So let me know what you think. Johnny

RE: Dynamically Getting Current Directory (Is There A Better Way To Code This?)

2003-03-25 Thread Ryan Emerle
yeah. how bout i read your message first. nevermind. -Original Message- From: Ryan Emerle Sent: Tuesday, March 25, 2003 5:00 PM To: CF-Talk Subject: RE: Dynamically Getting Current Directory (Is There A Better Way To Code This?) expandPath('.')? -R -Original Message

RE: Dynamically Getting Current Directory (Is There A Better Way To Code This?)

2003-03-25 Thread Ryan Emerle
expandPath('.')? -R -Original Message- From: Mike Alberts [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 4:57 PM To: CF-Talk Subject: Dynamically Getting Current Directory (Is There A Better Way To Code This?) Hello all, ColdFusion 5. I have this code in my index

Dynamically Getting Current Directory (Is There A Better Way To Code This?)

2003-03-25 Thread Mike Alberts
Hello all, ColdFusion 5. I have this code in my index.cfm files in directories throughout my sites that sets the value of a variable to the name of the directory that the file is in (just the name with no slashes and backslashes, etc) cfset Request.ThisDirectory = ListLast(Replace(GetDirector