Tuesday, January 4, 2011

Code Complete by Steve McConnell : Chapter 3

The author focuses on WIMP-Why isn't Marry Programming? or WISCA-Why Isn't Sam Coding Anything? syndrome where programmers do not understand the importance of preparation and prerequisites. There are two main reasons for this:

  • The programmers themselves can't resist the urge to begin coding
  • The managers are unsympathetic towards programmers who spend time on construction prerequisites.
The author enlists following prerequisites to be met before construction can be started:
  • Problem Definition Prerequisite: There should be a clear statement of the problem the system is supposed to solve. The problem definition should be in user language and is without any reference to possible solutions.
  • Requirements Prerequisite: Explicit requirements help achieve two things
    • End user can review and agree to requirements and the programmer has a clear view of what user wants.
    • They help avoid arguments.
    Requirements are never stable and a typical project does experience 25% change in requirements during development. The author also provides a check-list to ensure that the requirements are content-rich, high-quality and complete.
  • Architecture Prerequisite: The quality of the architecture determines the conceptual integrity of the system which in turn determines the ultimate quality of the system. An architecture should
    • describe the system in broad terms.
    • consider alternatives and provide reasons why one particular organization was chosen.
    • define major modules with well-defined interface.
    • show possible enhancements and that the effect of them is limited to small number of modules.
    • provide reasons for not using off-the-shelf components.
    • describe the major files, tables and data-structures to be used.
    • describe or reference algorithms used and provide reasons why alternatives were not used.
    • specify user interface.
    • specify memory management.
    • specify a strategy to consistently handle errors.
    • clearly specify the degree of robustness and fault-tolerance of the software and what will be the response of the software in case of critical errors.
    • provide a strategy how the software will handle internationalization.
    • provide estimates of speed and memory use of the software.
    The author also provides a list of issues a good architecture would address.
  • Programming Language Prerequisite: Before construction begins, programming conventions should be spelled out.

No comments:

Post a Comment