Introduction to software planning and basic size measurement
Read chapters 3 and 4 of the textbook
Write program 2A using PSP0.1
Write report R1 (LOC counting standard) and R2 (Coding standard)
One of the great appeals of the PSP philosophy is that of identifying the repetitive and uninteresting portions of a task and giving them structure and form so that they're easier to accomplish. Surely one of the best ways to do this is automate the process, using the computer itself-- after all, it is supremely qualified for repetitive and uninteresting tasks. And the process of collecting and processing data can (and should be automated.
To that end, I did a quick web search for the "personal software process" and "Emacs" using Google (my favorite search engine), and turned up the University of Karlsruhe's PSP tools page, referenced by a Mr. Lutz Prechelt. I don't know Mr. Prechelt personally, but had corresponded with him before on a scripting language "contest" he was hosting, and the tools on the page seemed consistent with his continuing efforts to improve the software development process.
The only tool I really stuck with so far, though, is pplog-mode, an Emacs add-in package which helps automate the data-collection process. It adds a window in an Emacs project; whenever a loggable item occurs, the developer presses F8 and is greeted with a time-stamp; by typing in a few mnemonic codes, one can log the beginning and end of development phases, interruptions, and defect fixes. A portion of the log I generated while playing with pplog-mode and the Eiffel program from lesson 1 is below:
The pplog-mode package had a companion piece, evalpplog, a Perl script for parsing logs and gathering information, but the information produced was too copious for me to use, and in a format I didn't like. To get something more to my needs, I cobbled together a python script which can take a "log format" and produce something which will better suit my needs for this independent study:
Table 2-1. Interruptions Recording Log
Student: | Victor B. Putz | Date: | 991219 |
Instructor: | Wells | Program# | 1A |
Defect found | Type | Reason | Phase Injected | Phase Removed | Fix time | Comments |
991220 18:16:08 | syn | kn | compile | compile | 0 | didn't add the word "then" to the if-block |
991220 18:20:24 | syn | kn | compile | compile | 1 | numerous problems using = instead of := for assignment |
991220 18:23:00 | syn | kn | compile | compile | 2 | couldn't figure out how to redefine make and call precursor |
991220 18:29:26 | log | kn | compile | test | 0 | wasn't allowing for integer entries in the file (just double) |
991220 18:30:03 | log | kn | compile | test | 1 | wasn't incrementing indices in loops |
991220 18:31:57 | log | typo | compile | test | 0 | erroneously typed "/" instead of "-" for the top term of the standard dev. |
It can produce time logs in addition to defect logs. Hopefully this will suit my needs better, will streamline the process of data collection, and make this a more enjoyable experience; after all, if a process is too difficult to use, developers simply won't use it.
It should be noted that the log tools as they stand have a serious weakness: they only allow the representation of one error at a time, and obviously it's possible to have several extant defects simultaneously. But even the PSP defect recording log has this problem, since it focuses on "fix time"-- so here, we'll only log defects when we're actively focused on fixing them, to better judge fix time.
One last note: the new logging tool allows me to log both a defect type and a defect reason (actually, any number of classifications, but I'll stick to type and reason). This, to me, is critical-- a defect's type is interesting, but a defect's cause is more critical-- it gives me something to work toward; if most of my defects are caused by knowledge of syntax, for example, I can combat that by studying the language's syntax (or by choosing a less-confusing language!). To that end, and because numeric typecodes are poor mnemonics, I will be adopting the following as type and reason codes, taken directly from Lutz Prechelt's defect classification standard at http://wwwipd.ira.uka.de/PSP/Dokumente/DefTyp/defecttypes.html:
Table 2-2. Defect Type Classification
Item | Short Description | Full Description |
Defect Types | ||
IC | Interface Capability | The design of an interface is wrong, so that the interface does not provide the functionality that it must provide. |
IS | Interface Specification | The specification of an interface is wrong, so that the parameters involved cannot transfer all of the information required for providing the intended functionality. This is a less fundamental variant of IC: Only parameters need be added. |
ID | Interface Description | The non-formal part of the description of an interface is incomplete, wrong, or misleading. This is typically diagnosed after an IU. Note that the description of a variable or class attribute or data structure invariant is also an (internal) interface. |
II | Interface Implementation | Something that I cannot influence does not work as it should. This defect should never be used when I am the source of the defect. (In principle, this is a special case of ID.) |
IU | Interface Use | An interface was used wrongly, i.e., in such a way as to violate the interface specification. |
IV | Data Invariant | A special case of IU. The interface violation is: not maintaining the invariant of some variable or data structure. Violating the meaning of a simple variable is a special case of this. |
MD | Missing Design (of required functionality) | A certain requirement is covered nowhere in the design. This is stronger than IC, where the coverage is present, but incomplete. |
MI | Missing Implementation | A certain part of a design was not implemented. If the part is small, MC, MA or WA may be more appropriate. |
ME | Missed Error Handling | An error case was not handled in the program (or not handled properly) |
MA | Missing Assignment | A single variable was not initialized or updated. Only one statement needs to be added |
MC | Missing Call | A single method call is missing. Only one statement needs to be added. |
WA | Wrong Algorithm | The entire logic in a method is wrong and cannot provide the desired functionality. More than one statement needs to be added or changed. |
WE | Wrong Expression | An expression (in an assignment or method call) computes the wrong value. Only one expression needs to be changed. |
WC | Wrong Condition | Special case of WE. A boolean expression was wrong. Only one expression needs to be changed |
WN | Wrong Name | Special case of WE. Objects or their names were confused. The wrong method, attribute, or variable was used. Only one name needs to be changed. |
WT | Wrong Type | Two `similar' types were confused. |
Notes | IC, IS, ID, MD are typically related to the design phase; IU, IV, MI, WE, WC, WN are typically related to implementation. | |
Defect Reasons | ||
OM | Omission | I forgot something that I knew I had to do. |
IG | Ignorance | I forgot something, because I did not know I had to do it. |
CM | Commission | I did something wrong, although I knew in principle how to do it right. |
TY | Typo | I did something trivial wrong, although I knew exactly how to do it right. |
KN | Knowledge | I did something wrong, because I lacked the general knowledge (ie education). |
IN | Information | I did something wrong, because I lacked the specific knowledge how to do it right or had received misleading information about how to do it. This refers to a problem in communication. |
EX | External | I did nothing wrong. The problem was somewhere else and the defect was introduced by some other person. |