I personally feel that whatever makes you happy you should go with. With that said, you need to play well with others.
If you are working on a large coding project, you need to make your coding style harmonize with the other team members. And remember, someone else will probably someday have to come in and maintain your code. So just like a tidy bathroom and clean underwear, presentable code will keep you from needing to feel embarrassed before visitors. Whatever you choose as a style, stick with it. Don't change. I worked once with a really good C programmer who ALWAYS ran his own pretty routine on any code before he would work on it. Of course his standard style was completely different than the rest of the team. We spent more time re-styling the code after he worked on it (so we could READ it) than we did coding. As to your questions: > 1. Is indenting code mandatory? Yes > 2. When indenting, do you use tabs as tabs or tabs as spaces? Tabs as tabs > 3. How many spaces do you indent or does a tab represent? 4 > 4. Is it better to make code in includes and functions > even if the code isn't going to be reused? Yes. Code should be broken down into logical, understandable, maintainable chunks. Even if you don't implement the Fusebox methodology, you should implement SOME methodology. And document it. And FOLLOW IT. Jerry Johnson >>> [EMAIL PROTECTED] 04/16/02 09:54AM >>> Answers inline. > 1. Is indenting code mandatory? Yes > 2. When indenting, do you use tabs as tabs or tabs as spaces? spaces as Tabs > 3. How many spaces do you indent or does a tab represent? 5 spaces > 4. Is it better to make code in includes and functions > even if the code isn't going to be reused? We FuseBox most of our CF sites. So we use a lot of includes. I'd rather use includes and functions, that way you can isolate the code fairly quickly. Moreover it allows for a greater flexibility and ease in upgrading an app. For instance one of our major clients want a fairly large interface change. This would be far more difficult to do if the interface elements had to be duplicated on every page. By making them an include, its much easier to make large changes. 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. -- ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
