Program Design Methodology

"A company must understand that the product is everything that is required to put the software into the box. " -- Steve McGuire

Program Design Methodology Review

Why Plan?

How do I Design an Algorithm?

Some Help

More Help

Implementation

Testing

Robustness

System Testing

Debugging


Application Programming Interface (API)


Review of The Software Development Cycle

Up until now, how have you approached software development? Most projects deal with these aspects:
  1. User Requirement Analysis
  2. Functional Specifications
  3. Design
  4. Implementation
  5. Testing
  6. Deployment
  7. Maintenance

An excellent source of information for professional programmers is Steve McConnell's book Code Complete 2nd Edition, A Practical Handbook of Software Construction. This book deals primarily with the implementation (construction) phase of software development. Steve has a website that lists some of his books. It's highly rated on a thread on stackoverflow.

Methodologies and the Software Life Cycle (Two Examples)

Waterfall Life-CycleIterative Life-Cycle

The shaded area indicates the phases related to programming.
Source: Code Complete (McConnell 1993).


Project Size vs. Devlopment Time

Source: Evaluating Software Engineering Technologies (Card)

Smaller Projects:

Larger Projects

Systems

  • Systems are larger than individual projects.
  • These super-projects are composed of many programs and/or products requiring a high degree of integration.
  • These systems are designed by several teams of developers, some who are physically located in different geographic regions.
  • There is tremendous effort expended in the areas of specification and architecture to ensure that all parties have a very clear picture of what their responsibilities include. It should be realized, that large, complex software is developed in groups and that these groups (or teams) are subject to the same problems that afflict all group interactions, regardless of the issues at hand. In his classic book The Mythical Man-Month, Frederick Brooks performs an audit on the construction of the Tower of Babel and why it failed. He notes that the most significant cause was the lack of communication amongst the builders (Brooks 1995).

    Complexity of Communications within Groups

    Source: Dynamics of Software Development (McCarthy 1995).


    Project Type is a Factor

    Life Cycle Cost Distribution (Numbers in Percent)

    System TypeRequirements/DesignImplementationTesting
    Command and control systems462034
    Space program systems342046
    Operating systems331750
    Scientific systems442630
    Business systems442828
    Your Game Project??????
    Software Engineering, 4/e (Sommerville)


    Characteristics of a Good Program

    1. Correct
      • Does what the user asks it to do
      • It really doesn't matter how fast or efficient a program is if it doesn't do what the user needs.
      • Programs must not solve the wrong problem.
    2. Robust
      • Programs need to handle all input, both the expected and the unexpected.
      • This is usually due to bad programming logic or bad data.
      • If the user provides bad data, it's still the programmer's fault if the program crashes.
      • Except for physical problems with the hardware, program crashes are almost always the fault of the programmer.
    3. Portable
      • Many times this is referred to as cross-platform, meaning that the program can run on different computers.
      • This generally needs to be factored into the implementation at the outset.
      • Trying to "port" programs that were never intended to run on another system is very difficult.
      • Many times the developers will simply "start over" rather than to port code.
    4. Maintainable
      • Some programs can last for many years.
      • Because "any software worth using is worth enhancing",programs are in constant development.
      • Most code is in maintenance mode.
      • This means that 5 minutes after you write a brand new function, it is now just code that needs to be maintained for the rest of its life.
      • Code is only "new" until the ink dries.
    5. Readable
      • Many people feel this is the most important aspect of a good program.
      • If a program is very readable, it's likely that the other characteristics will be much easier to attain.
      • C (and thus, C++) has been termed a "write-only" language because it allows programmers to write completely unintelligible code. (At least to the poor maintenance programmer who comes after.)
    6. Efficient
      • This relates to resources (such as memory or CPU time.)
      • The goal is for programs to use the least amount of memory, disk storage, CPU cycles, etc. to get the job done.
      • Unfortunately, all too often the other characteristics of a good program are traded for the promise of a very fast and efficient program.
      • In this class, we are going to learn to choose our battles.


    Summary