When writing code, pay close attention to the following:
- Function names: Be sure function names are spelled correctly and that they don't have any extraneous characters or spaces. Function names can be used only once per declaration in a script. You cannot reuse the same function with different signatures. Review all functions to make sure that you haven't duplicated their names.
- Commas for arguments: With the exception of the
}(curly braces) characters to define a block of statements. Be sure to include all the necessary brace characters for the statement block or errors will result. One way to do this is to line up braces vertically. I am a proponent of this style:
- Quotes around strings: All strings should have quotes around them. Make sure that you are using the same kind (single or double) at both ends!
- Cutting and Pasting: It's easy to enter a statement into a script at the wrong place while editing it, especially if you're using time-saving, cut-and-paste techniques. Don't forget to update all the variable and function names in the block!
- Correct object names: Be sure names for objects are spelled
exactly, and with the proper capitalization. Remember that the built-in objects
(Date, Math, Array, Object, etc.) start with caps; the others start with lowercase
letters. Develop a consistent naming convention for your variables, objects,
Rob Gravelle combined his love of programming and music to become a software guru and accomplished guitar player. He created systems that are used by Canada Border Services, CSIS and other Intelligence-related organizations. As a software consultant, Rob has developed Web applications for many businesses and recently created a MooTools version of PHPFreechat for ViziMetrics. Musically, Rob recently embarked on a solo music career, after playing with Ivory Knight since 2000. That band was rated as one Canada's top bands by Brave Words magazine (issue #92) and released two CDs. Rob's latest, entitled KNIGHTFALL, was a collaboration between himself, the former Ivory Knight vocalist, and legendary guitarist/producer, Jeff Waters of Annihilator fame. Rob is available for short-term software projects and recording session work. to inquire, but note that, due to the volume of emails received, he cannot respond to every email. Potential jobs and praise receive highest priority!