Programming Standards

As a company specialized in selling engineering solutions, DMC spends a great deal of time developing software. We believe that there are great benefits to establishing programming standards, which, if used properly, improves the quality of code and decreases the time that it takes to bring new engineers onto a project. Benefits of standardization include making code:

  1. Modular & reusable
  2. Readable & understandable
  3. Easier to debug

All of these features decrease our customer's costs while improving the quality of the services we provide.

Over the last couple of months, employees at DMC collaborated with each other and agreed upon a list of best practices and paradigms that we will now follow. Here are the highlights of our agreed-upon standards for text-based programming (C# .NET, C++ and similar programming languages)

  1. Use Hungarian Notation, but use it wisely (Read Joel Spolsky's Making Wrong Code Look Wrong for a great summary as to what this means!)
  2. Document your code by writing your algorithms in pseudocode comments before creating the actual code
  3. Choose meaningful variable, function, class and file names
  4. White space is cheap - use it to improve the readability of your code
  5. Follow Defensive Programming practices
  6. Use comments to document why you are performing certain functions. Coding Horror has a great article on how to comment code.
  7. Manage Variable scope - keep variables alive for as short a time as possible, and minimize the distance in between variable creation and variable use.
  8. Modularize code by making short methods. Some rules of thumb include: 1000 line limit per file, 100 line limit per function

Stay tuned to the DMC blog for further code improvement techniques, and please post any questions in the comments!


There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

Enter the code shown above: