Another article to update. :)
My answers are Yes, you must indent unless you want to be cruel to yourself and
others. I use tabs as tabs because its both easier and as a tab I can search for it
specifically while a space, even 3-4 of them can be a problem. A tab for me is 3
spaces, but I'll use multiple tabs to get code as clean and understandable as
possible. As for segmenting my code, I do it both when it would be cleaner and when
the code will be reused. If a single chunk of code of more than 10 or so lines does a
single operation I will segment it. There are applications I run that are hundreds of
lines, but are segmented into about 5 includes and is very clean and understandable.
Actually, the very template that will process this message is like that.
This is an example of my spacing with a query. Some may find it overspaced, but i find
it gets me to the data I need when debugging or altering.
<cfquery name="test" datasource="#dsn#">
Select *
from table
where name='michael' or
name='Judith'
order by name
</CFQUERY>
At 10:34 AM 4/16/02, you wrote:
>hatton,
>
>you may want to have a look at Michael Dinowitz' article on coding standards
>called ColdFusion with Style:
>
>http://www.fusionauthority.com/alert/index.cfm?alertid=9#Tech1
>
>Excellent article.
>
>larry
>
>--
>Larry C. Lyons
>ColdFusion/Web Developer
>Certified Advanced ColdFusion 5 Developer
>EBStor.com
>8870 Rixlew Lane, Suite 204
>Manassas, Virginia 20109-3795
>tel: (703) 393-7930
>fax: (703) 393-2659
>Web: http://www.ebstor.com
> http://www.pacel.com
>email: [EMAIL PROTECTED]
>Chaos, panic, and disorder - my work here is done.
>--
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, April 16, 2002 9:50 AM
>> To: CF-Community
>> Subject: Coding Standards
>>
>>
>> Well, I'm glad to still have my job. The business I work for
>> just laid
>> off 3 people because of the current sales slump. I wasn't
>> one of them,
>> but I thought I would be.
>>
>> However, this has me working on a few group projects as
>> opposed to being
>> the only person working on some of the others. It's funny, I've been
>> here almost a year and a half and someone just pointed out
>> that I should
>> be using a differed formatting standard than I am.
>>
>> So I'll throw a quick poll out:
>> 1. Is indenting code mandatory?
>> 2. When indenting, do you use tabs as tabs or tabs as spaces?
>> 3. How many spaces do you indent or does a tab represent?
>> 4. Is it better to make code in includes and functions even
>> if the code
>> isn't going to be reused?
>>
>> I'll start it off by answering my answers and then what my co-workers
>> told me in parenthesis:
>> 1. Yes (Yes)
>> 2. Tabs as Spaces (Tabs as Tabs)
>> 3. 3 (2 or 4)
>> 4. Depends on Complexity (Yes)
>>
>> Hatton
>>
>>
>
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists