As I noted in a previous rant, Software Design Documents, Reviews, and Agile Methods, software design documents become obsolete once coding is started. So, what kind of documentation should be available for the newbie that has to enhance or maintain a product? The answer is a document that is generated during system testing or even after the product release. This document is an opportunity for the developers to do a “brain dump” once coding is complete. I call this document the Software Maintenance Manual.
The Software Maintenance Manual is not a Design Document
Design documents are a product of the design process. They written are before the code is written and are requirements-centric. That is the design documents explain how requirements are to be implemented in code. By contrast, the maintenance manual is code-centric. It explains how the code is structured. The maintenance manual must be written after the code is complete or nearly complete so that it is an accurate reference to the implementation. It is also a living document which must be updated as code is modified.
The problem with using design documents as a reference during maintenance is that they are an abstraction of the implementation. As lessons are learned during the implementation, the actual code diverges from the documented design. No one wants to interrupt the momentum of coding to update design documents so that by the end of the implementation, the design documents are no longer relevant. The code itself becomes the most relevant documentation of the design.
The problem with using the source code as a reference is that it is too detailed. An engineer can spend hours or even days just finding the modules relevant to a problem. The usual solution is to ask someone, who is already familiar with the code, for pointers for getting started. What is needed is a guideline or road map for the source code. The Software Maintenance Manual should provide this road map.
Finally, creating a Software Maintenance Manual should not be burdened with a lot of process. Requirements and functionality are already solidified by the time the maintenance manual is being written. The manual is internal to the software development group. So, input from marketing, manufacturing, and system testing is not required. The document’s style should be lean and informal.
What is in the Software Maintenance Manual?
A Software Maintenance Manual consists mainly of “How To’s”, Frequently Asked Questions (FAQs) and system specific data.
There are a few “How To’s that are common to most projects. Just documenting these common items can save hours of a developer’s time. Some common “How To’s” include:
- How to set up the development environment.
- How to build the system.
- How to do a software release
There are also system specific “How To’s”. They usually explain how to enhance the system. These “How To’s” should include pointers to specific source files and even specific data structures or functions. System-specific “How To’s” are obviously tied to the system’s applications. Here are some examples from previous projects:
- How to add a new menu.
- How to add a new item to a menu.
- How to add a new command to the Command Line Interface.
- How to add a new SNMP tables to the system.
There are other important items that are not obvious from reading the code that are not really “How To’s”. These items can be addressed by Frequently Asked Questions lists. Some examples of FAQs from previous systems are:
- How many Virtual Circuits can the system process
- Why is the system limited to 1024 routes?
- Why are the objects of class OpticalChannel always statically constructed?
The system specific data consists of tables and lists important to system maintenance. Some of the items that may be in the system data include:
- Physical memory and I/O maps
- Functions assigned to each module
- List of files that make up a module
Writing a “How To”
“How To’s” should be specific, focused, and detailed. They should focus on solving one problem or document one process. A “How To” consists of a detailed step by step procedure for a specific task.
“How To’s” must be accurate and complete to be useful. An inaccurate or incomplete “How To” may be worse than none at all. If an engineer using the “How To” finds problems with it, they may skip using the document the next time and go directly to the more experienced engineer. The whole purpose of the document is to prevent this.
It is easy to forget details and steps in a process when you are familiar with it. The best way to start a “How To”, is to document a process as you are doing it. Try to perform the process on someone else’s computer so that you will find key files or environment variables that may not be present. The next step is to give the document to someone else who is not familiar with the process you are documenting. Observe them performing the process and carefully note any questions that they have, or any problems that they run into.
Producing an accurate, complete “How To” is time consuming but will save you and your team hours of work in the future.
Maintaining a FAQ List
The first step in creating a FAQ list is to get a list of questions. This is easy to do. Keep a log or notebook of questions that arise late in development, during system integration and system test. New questions can be added when ever there is an enhancement project or a bug fix. If a list gets too long it becomes less useful. When this happens, the FAQ list should be broken up by topic to make specific questions easier to find.
FAQ List answers must be accurate and understood to be useful. One strategy for writing useful answers is to have the person asking the question write the answer. Then the engineer who is familiar with the system can review the answer. This insures that the answer was really understood by the person who asked the question and that others who read the FAQ will have a better chance at getting a useful answer.