Monday, June 07, 2004

Sticking to Standards

I know this is the thing to talk about, but it really comes down to understanding your standards, and sticking to them.

My personal standards are:

1. File/Folder Naming conventions
-includes that are included in the middle of a page are called mod_whatever_function.cfm
-navigational includes are called incl_leftnav or incl_rightnav.cfm
-folder names have no spaces, all lower case and use _ when necessary. Think about seo when folder names.

2. Coding Style Standards
-Good indenting, drastically improves readability of code.
-commenting every section in english with time and date stamps
-no # in cfif and cfset unless it's for an evaluate function

3. Always think efficiency and power in my coding.
-Use cfswitch rather than cfif for simple logic
-when and where to loop

4. Know how to speed up application preparation.
-I like to have default local variables that are setup in the same name as query fields
-Loop thru query fields to populate cfparams, previously set up
-have forms refer to local variables, which will either be populated or not populated, and neither will cause any errors.

5. Correct and Specific SQL Statements
-NEVER EVER do a Select *
-Always think about what the most efficient way, to the server and to the database, not necessarily what is efficient to you.

6. Figure Death Handling
-If you died, how easy would it be to walk in and take over from you? In other words how thoroughly documented are all the work you do? Make it easy, document your code, plan your projects, that documentation is both a great learning and teaching tool

7. Learn from mistakes
-We all make mistakes, the key is learning from them.

Remember it took 10000 light bulb failures before Thomas Edison succeeded.

At this time I would like to honor my hero, former President Ronald Reagan, who passed away June 5th, 2004.

"No arsenal or no weapon in the arsenals of the world is so formidable as the will and moral courage of free men and women."
-President Ronald W. Reagan
-First Inaugural Address, January 20, 1981.

No comments:

Post a Comment