Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 1.88 KB

Contribution Principles.md

File metadata and controls

40 lines (33 loc) · 1.88 KB

Preparation Principles

Before you write one line of code, be sure you:

  • Understand of the problem you’re trying to solve.
  • Understand basic design principles and concepts.
  • Pick a programming language that meets the needs of the software to be built and the environment in which it will operate.
  • Select a programming environment that provides tools that will make your work easier.
  • Create a set of unit tests that will be applied once the component you code is completed.

Coding Principles

As you begin writing code, be sure you

  • Constrain your algorithms by following structured programming practice.
  • Consider the use of pair programming
  • Select data structures that will meet the needs of the design.
  • Understand the software architecture and create interfaces that are consistent with it.
  • Keep conditional logic as simple as possible.
  • Create nested loops in a way that makes them easily testable.
  • Select meaningful variable names and follow other local coding standards.
  • Write code that is self-documenting.
  • Create a visual layout (e.g., indentation and blank lines) that aids understanding.

Testing Principles

  1. All tests should be traceable to customer requirements.
  2. Tests should be planned long before testing begins.
  3. The Pareto principle applies to software testing.
  4. Testing should begin “in the small” and progress toward testing “in the large.”
  5. Exhaustive testing is not possible.
  6. Testing effort for each system module commensurate to expected fault density.
  7. Static testing can yield high results.
  8. Track defects and look for patterns in defects uncovered by testing.
  9. Include test cases that demonstrate software is behaving correctly.

Validation Principles

After you’ve completed your first coding pass, be sure you:

  • Conduct a code walk-through when appropriate.
  • Perform unit tests and correct errors you’ve uncovered.
  • Refactor the code.