Practices
  Home arrow Practices arrow Page 2 - The Art Of Software Development (part ...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PRACTICES

The Art Of Software Development (part 3): Coding To A Plan
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2002-09-12

    Table of Contents:
  • The Art Of Software Development (part 3): Coding To A Plan
  • The Name Game
  • Breaking It Down
  • Batteries Not Included
  • An Elephant's Memory
  • A Quick Inspection
  • Homework

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    The Art Of Software Development (part 3): Coding To A Plan - The Name Game
    (Page 2 of 7 )

    Shakespeare famously said, "What's in a name? A rose by any other name would smell as sweet". And this is true - so long as you're talking about roses. In the world of software development, though, naming conventions and coding standards acquire significance in making your code easier to read, understand and maintain.

    There are some basic rules to be kept in mind when naming objects within your application. Here's a brief list:
    • Choose meaningful names for your objects. "itemCode" is far more descriptive that "icd".
    • Capitalize the first character of each word in your chosen name, or use underscores to separate words - this makes the name easier to read.
    • Use names that are short and easy to pronounce.
    • Ensure that the name chosen is not ambiguous.
    • Use capitalization and/or underscores to differentiate between private and public variables, or local and global variables.
    • Begin function or method names with a so-called "action word" - for example, "getItem()" or "doQuery".
    It's also important to decide on and follow a specific coding standard when naming your variables and functions, and to carry this convention through consistently in all your scripts. This coding standard should specify the naming conventions for variables, functions and objects, file name prefixes and suffixes, file organization rules, indentation and comment style, and comment and white space usage. Ensure that the document specifying the coding standards includes examples that illustrate each rule clearly.

    Of course, having a standard by itself is fairly useless - it needs to be enforced for it to provide any real benefits. Make it a point to review the manner in which code is written during your code inspection sessions, and ensure that your development team follows the standards previously decided. This will make code review simpler and faster, and also make it easier to transition a released application to a new team for maintenance or bug fixes.

    Make sure that your application filesystem is structured properly, and that the different components are all in the right place. Spend some time developing a suitable directory structure within which your application code will reside, and clearly demarcate the locations in which different bits of data are to be stored. If your application files will be named according to a specific notation, consider all cases when defining this naming convention and ensure that it covers all possible situations.

    Finally, comment, comment, comment! It might seem like a drag to add comments to your code while you're developing an application, but observations have shown that comments play an important role in improving the quality of your code. Not only does a comment serve as a handy reminder of the thought process that went into a particular bit of logic, it also helps other developers read and review your code.

    More Practices Articles
    More By Vikram Vaswani, (c) Melonfire


     

       

    PRACTICES ARTICLES

    - The System in So Many Words
    - Basic Data Types and Calculations
    - What`s the Address? Pointers
    - Design with ArgoUML
    - Pragmatic Guidelines: Diagrams That Work
    - Five-Step UML: OOAD for Short Attention Span...
    - Five-Step UML: OOAD for Short Attention Span...
    - Introducing UML: Object-Oriented Analysis an...
    - Class and Object Diagrams
    - Class Relationships
    - Classes
    - Basic Ideas
    - Choosing the Right Team
    - Trees
    - Basic Array Searching in C++

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway