home *** CD-ROM | disk | FTP | other *** search
/ ftp.robelle3000.ai 2014 / 2014.06.ftp.robelle3000.ai.tar / ftp.robelle3000.ai / papers / popquiz.txt < prev    next >
Text File  |  1994-11-27  |  31KB  |  778 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                            The Warning Signs
  12.  
  13.                          A Pop Quiz on Quality
  14.  
  15.  
  16.                     By Robert Green and David Greer
  17.  
  18.  
  19.                         Robelle Consulting Ltd.
  20.                        Unit 201, 15399-102A Ave.
  21.                      Surrey, B.C. Canada  V3R 7K1
  22.                         Phone:  (604) 582-1700
  23.                          Fax:  (604) 582-1799
  24.  
  25.  
  26.  
  27.  
  28.                                Abstract
  29.  
  30.    Everyone is in favor of software quality, but not everyone is
  31.    producing quality software.  How can you tell if a software group
  32.    has gone off the track? It could be your DP department, your
  33.    computer manufacturer, or even one of your software suppliers.
  34.    The ideal software group uses feedback and repeated development
  35.    cycles to find out what users really need.  But it also uses
  36.    rigorous software engineering.  Despite the constant changes, the
  37.    ideal software group ensures that existing features continue to
  38.    work and future changes are possible.  We have organized our
  39.    ideas into a non-threatening Pop Quiz, consisting of tell-tale
  40.    phrases that you may recognize, phrases that warn of a troubled
  41.    software project, phrases such as "that's not my job" and "it's
  42.    against our policy."
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.                 Copyright Robelle Consulting Ltd. 1992
  51.  
  52.  
  53.    Permission is granted to reprint this document (but not for
  54.    profit), provided that copyright notice is given.
  55.  
  56.  
  57.  
  58.  
  59.                            The Warning Signs
  60.  
  61.                          A Pop Quiz on Quality
  62.  
  63.  
  64.                     By Robert Green and David Greer
  65.  
  66.                         Robelle Consulting Ltd.
  67.  
  68.  
  69.    Everyone is in favor of software quality, but not everyone is
  70.    producing quality software.  How can you tell if a software group
  71.    has gone off the track? It could be your DP department, your
  72.    computer manufacturer, or even one of your software suppliers.
  73.  
  74.  
  75.                      Introduction by Robert Green
  76.  
  77.    I was presenting my paper, Improving Software Quality, before a
  78.    hometown crowd in Vancouver, when a local consultant rose to ask
  79.    a question.  "Responding to the users sounds fine," she said,
  80.    "but I've seen a lot of systems where the programmers did
  81.    constant changes and patches to give the users whatever they
  82.    wanted.  Most of the systems were a buggy, kludgy, impossible
  83.    mess.  How do you avoid that?"
  84.  
  85.    "That's the topic for another paper," I replied, with a quick tap
  86.    dance to distract the audience.  Later, I admitted to myself what
  87.    a good point she had made.
  88.  
  89.    Robelle creates software tools.  About once a month we release a
  90.    new version of Qedit and Suprtool.  We are constantly on the go,
  91.    so how do we avoid producing a disaster?
  92.  
  93.    I went to my partner David Greer for the answer.  At Robelle I'm
  94.    the one who leans toward wild, creative impulses.  David is
  95.    stronger on reliability, discipline, and long-range thinking.  I
  96.    was so concerned by bureaucratic software groups which didn't
  97.    satisfy user needs that I was overlooking another style of shop:
  98.    groups with weak software skills who react to user complaints as
  99.    fire fighting.
  100.  
  101.    The ideal software group uses feedback and repeated development
  102.    cycles to find out what users really need.  But it also uses
  103.    rigorous software engineering.  Despite the constant changes, the
  104.    ideal software group ensures that existing features continue to
  105.    work and future changes are possible.  My previous paper on
  106.    improving software quality was only half the story.  Now David
  107.    Greer and I finish it off.
  108.  
  109.  
  110.  
  111.              Teaching Quality Without "Should" and "Ought"
  112.  
  113.    To avoid having our paper degenerate into a sermon, we have
  114.    organized our ideas into a non-threatening Pop Quiz -- a way to
  115.    quietly rate your quality record.  The quiz consists of giveaway
  116.    phrases that warn of a troubled software project, remarks such as
  117.    "that's not my job" and "it's against our policy."
  118.  
  119.    See how many of these phrases you've heard.  Score 5 penalty
  120.    points for each one you hear regularly.  We made the penalty 5
  121.    points so you could fudge if you want to.
  122.  
  123.    Disclaimer:  Despite the fact that we use Hewlett-Packard for
  124.    some examples, we are not out to get HP.  We mention HP because
  125.    we know them and you know them, not because we think their
  126.    software quality is substandard.  To show it isn't personal,
  127.    we've thrown in a few Robelle follies too.  All shops are guilty
  128.    of some of these quality slips from time to time.
  129.  
  130.  
  131.                               o    o    o
  132.  
  133.  
  134.    Ready?  Here's our first warning sign, a classic programmer
  135.    excuse:
  136.  
  137.  
  138.                      That's a feature, not a bug.
  139.  
  140.  
  141.    If the user then points out the spot in the documentation showing
  142.    that he is right, there is still the second tell-tale excuse:
  143.  
  144.  
  145.                     That's an error in the manual.
  146.  
  147.  
  148.    With those two replies, a programmer can deflect any conceivable
  149.    bug report.
  150.  
  151.    The longest-running problem report at Robelle is caused by a
  152.    "feature" of MPE.  A batch job can log onto another MPE system by
  153.    doing a Remote Hello Command and creating a remote session.  But,
  154.    if the job runs Qedit (or any program) on the remote system, MPE
  155.    tells Qedit it is in an interactive session, not a batch job.
  156.    Qedit cannot tell this phoney session from a true session.
  157.  
  158.    Qedit attempts to do a CRT status request, assuming that the
  159.    session comes with a person and a terminal.  Because no one is
  160.    there running the sesion, the first Qedit command gets read as
  161.    the CRT status!  The DS/3000 Manual from 1978 is aware of this
  162.    problem and warns about it, but in 13 years HP has not fixed it.
  163.    It's a feature, not a bug.
  164.  
  165.    Reluctance to admit problems leads to a reputation as a "Black
  166.    Hole".  Questions go in, but nothing useful ever comes out.
  167.  
  168.                               o    o    o
  169.  
  170.  
  171.    When users gather, they swap "war" stories.  One user was
  172.    overhead at lunch, complaining about his software vendor.  When
  173.    he called the support line, their first question always seemed to
  174.    be:
  175.  
  176.  
  177.                     Why would you want to do that?
  178.  
  179.  
  180.    This statement suggests a superior attitude on the part of the
  181.    programmer, an attitude that is seldom backed by reality.
  182.    Customers do find unexpected and incredible ways to apply
  183.    programs to solve their problems.  The sign of a truly great
  184.    program is that even when used in unanticipated ways, it still
  185.    works.
  186.  
  187.    Whether a program is useful is up to the customer to judge.  Take
  188.    an example from the carpet business, where despite superior
  189.    technical knowledge at the factory, the customer knew best:
  190.  
  191.         One of our customers in Europe came to us several years
  192.         ago with his own testing spec for carpet foam backing.
  193.         We were a bit put out that someone thought they could
  194.         test it better than we could.  We told him not to
  195.         worry.  Dow measures for foam stability, molecular
  196.         weight distribution, particle size conformity, percent
  197.         of unreacted monomer, adhesion strength -- all the
  198.         vital things.  We told him, "You're going to get the
  199.         best there is, real quality!"
  200.  
  201.         Well, three times we tried to ship him the order, and
  202.         three times he sent it back.  Now, that gets annoying.
  203.         So we asked him, "What's the deal?" And he told us,
  204.         "Your product can't pass my roll-stool test!"...  What
  205.         he did was take the bottom half of an office chair, put
  206.         a weight on it, and spin it around on a piece of test
  207.         carpet 30,000 times...  If the carpet sample didn't
  208.         delaminate from the foam, you passed the test and got
  209.         the order...  Quality is what the customer says he
  210.         needs, not what our tests indicate is satisfactory.
  211.         [I. Snyder of Dow, in T. Peters]
  212.  
  213.  
  214.                               o    o    o
  215.  
  216.  
  217.           If there are no questions, everyone must be happy.
  218.  
  219.  
  220.    At a Management Roundtable where the users submitted only 18
  221.    questions, the moderator jokingly remarked, "This proves the
  222.    customers are happy."
  223.  
  224.    Wrong.
  225.  
  226.    Customers who don't voice their complaints, when given a chance,
  227.    have given up expecting answers.  The unconscious attitude behind
  228.    this warning sign is that customer complaints are an irritant to
  229.    be tolerated.
  230.  
  231.    Real user complaints are good, not bad.  People who use and like
  232.    software constantly think of more problems the software could
  233.    solve.  This shows up as increased "complaints".  If you actually
  234.    fix something for them, watch out!  The complaints will escalate
  235.    dramatically.
  236.  
  237.    At Robelle, we have a saying:  If we send out a batch of new
  238.    software and no one complains, there is only one conclusion.
  239.  
  240.             It means that no one tried it.
  241.  
  242.  
  243.                               o    o    o
  244.  
  245.  
  246.  
  247.  
  248.                       We've lost the source code.
  249.  
  250.  
  251.    On his first outside consulting job, Bob Green found that the
  252.    client had lost his source code.
  253.  
  254.    The client's billing program was taking 2 days to run on a
  255.    sampling of accounts--to do all the accounts it would be running
  256.    continually.  The system was designed by an expensive consulting
  257.    firm, then programmed by contractors.  The client had only a
  258.    junior programmer to make the inevitable patches and fixes.
  259.    There were lots of source files, but no one knew which ones
  260.    compiled into the current version of the billing program.  It
  261.    took most of a day to find the proper source files and get them
  262.    to re-compile.  After that it took only an hour to fix the
  263.    program.
  264.  
  265.    Programs are valuable assets that depend upon an infrastructure
  266.    for their preservation.  If you take shortcuts in development,
  267.    you will lose control of this asset.
  268.  
  269.    What is needed is simple, but requires discipline.  For every
  270.    program, there is a job stream that recompiles the current
  271.    version.  This job stream shows the source files that go into the
  272.    program and how to combine them.  The test environment is kept
  273.    separate from production.  Another standard job moves a new
  274.    version from testing into production.
  275.  
  276.  
  277.                               o    o    o
  278.  
  279.  
  280.  
  281.                    We're too busy to document that.
  282.  
  283.  
  284.    Having each programmer in a shop re-invent the wheel is
  285.    inefficient.  Software techniques uncovered by a software group
  286.    can be a valuable asset if they are documented.  There is an even
  287.    better way of retaining knowledge.  Use libraries of code.
  288.    Reusable code leverages the investment.  One programmer suffers
  289.    to solve a problem so the others won't have to suffer as well.
  290.  
  291.    As an example, consider double-sided printing on the LaserJet.
  292.    In our shop, Dave Lo first added this feature to our Prose text
  293.    formatter by hard-coding the Escape sequence into the program.
  294.    Then Bob Green hard-coded it into Qedit.  When David Greer wanted
  295.    to add double-sided printing to Suprtool, he asked, "Why is the
  296.    Escape sequence hard-coded in Prose and Qedit, when we have a
  297.    library routine that could have held that knowledge?"
  298.  
  299.    David added the Escape sequence to our library code and removed
  300.    it from the individual programs.  Now we can add double-sided
  301.    printing to the rest of our programs without having to re-learn
  302.    the Escape sequence.
  303.  
  304.         The good programmer writes software that can be reused,
  305.         even if he doesn't see a reuse immediately on the
  306.         horizon.  His experience ... assures him that someone
  307.         from the next hallway, reasonably soon, will be asking,
  308.         "Do you have a module that ...  ." He also knows that
  309.         writing reusably will force him to define clean
  310.         interfaces.  [D. Boundy]
  311.  
  312.  
  313.                               o    o    o
  314.  
  315.  
  316.    When a programmer can't find the reason for a particularly
  317.    bizarre and puzzling bug, there is one sure fire excuse.
  318.  
  319.  
  320.                     It must be a hardware problem.
  321.  
  322.  
  323.    In all the bugs we have investigated in 13 years in business,
  324.    only one turned out to be a true hardware problem.
  325.  
  326.    Our Qedit program was repeatedly losing track of lines in a file
  327.    at one customer site, but we couldn't repeat the problem on our
  328.    machine.  Through painful hours spent in Debug, we finally proved
  329.    that the Load Instruction was failing on this one customer's
  330.    computer, but only when indexing was done without indirection.
  331.    And Qedit was the only program on the system that used this
  332.    unusual mode of the Load Instruction.
  333.  
  334.    The ugly truth is that hardware is amazingly reliable and
  335.    software is not.
  336.  
  337.  
  338.                               o    o    o
  339.  
  340.  
  341.             It would cost too much to update the paperwork.
  342.  
  343.  
  344.    The late Dr. Richard Feynman of Cal Tech did a famous study of
  345.    the Challenger shuttle disaster.  He ranged widely throughout
  346.    NASA and its contractors, talking to anyone who could shed light
  347.    on the quality problems.
  348.  
  349.    A group of production workers had found a simple way to improve
  350.    the calibration of the rocket engines, but it was never
  351.    implemented.
  352.  
  353.         The foreman said he wrote a memo with this suggestion
  354.         to his superiors two years ago, but nothing had
  355.         happened yet.  When he asked why, he was told the
  356.         suggestion was too expensive.  "Too expensive to paint
  357.         four little lines?" I said in disbelief.  They all
  358.         laughed, "It's not the paint; it's the paperwork.  They
  359.         would have to revise all the manuals."
  360.  
  361.         The assembly workers had other observations and
  362.         suggestions...  I got the impression they were very
  363.         interested in what they were doing, but they weren't
  364.         being given much encouragement.  Nobody was paying much
  365.         attention to them.  It was remarkable that their morale
  366.         was as high as it was under the circumstances.
  367.         [R. Feynman]
  368.  
  369.  
  370.                               o    o    o
  371.  
  372.  
  373.    When people want to cut corners, you hear assertions like this:
  374.  
  375.  
  376.                        No one will ever notice.
  377.  
  378.  
  379.    What they mean is that the users are too stupid to recognize
  380.    quality when they see it.
  381.  
  382.    At Ford Motor Company, they once came up with a scheme called
  383.    PIP, Profit Improvement Program.
  384.  
  385.         The purpose of PIPs [Profit Improvement Programs at
  386.         Ford] was to bring down the costs of making a car by
  387.         taking them out of an existing budget; an example might
  388.         be the decision to equip a Mercury with Ford
  389.         upholstery, which was cheaper.  Some traditionalists
  390.         were convinced that the PIPs systematically reduced
  391.         quality, that it was automotive sleight of hand, and
  392.         that the covert philosophy behind the program was that
  393.         the customer would never know the difference.  PIPs
  394.         quickly became part of the vernacular, turning into a
  395.         verb.  "What happened to that hood ornament?"  "Oh, it
  396.         got pipped."  [D. Halberstam]
  397.  
  398.    You seldom know which features will be important to your users.
  399.    Success demands attention to all details.  In software, users
  400.    notice the little things.  They seem to be more sensitive to
  401.    details than to the big picture, perhaps because they take the
  402.    overall objective for granted but the details drive them crazy
  403.    day after day.  The one enhancement to Qedit which received the
  404.    most positive feedback from the users was a tiny and simple
  405.    change:  allowing the entry of MPE commands without the preceding
  406.    colon.
  407.  
  408.  
  409.                               o    o    o
  410.  
  411.  
  412.                     One more Go To won't hurt much.
  413.  
  414.  
  415.    Good programmer don't use Go To to solve their logic problems.
  416.    They structures their code as easily as they breathe.  They keep
  417.    their programs within their intellectual grasp by using limited
  418.    control structures:  While, Do-Until, If-Then_Else, and Case.
  419.    Keeping it simple keeps it easy to understand.  The problem with
  420.    Go Tos is that you can build convoluted structures with them.
  421.  
  422.    Well-structured programmers limit the scope of their data
  423.    structures.  If a variable is only needed within a procedure,
  424.    they make it a local variable not a global variable.  If a
  425.    procedure needs to access a global they either pass it in as a
  426.    parameter or export it.  If the programming language allows, they
  427.    distinguish parameters which are input only from those that are
  428.    both input and output (i.e., call by value versus call by
  429.    reference).  The fewer places in the code that can touch a
  430.    variable, the easier it is to debug a program.
  431.  
  432.    The competent programmer uses top-down design and bottom-up
  433.    implementation:
  434.  
  435.         The first thing he does in any programming task is to
  436.         analyze the entire problem into smaller problems that
  437.         can be solved separately.  He begins coding by writing
  438.         functions that implement the primitives and building
  439.         blocks he will need.  The rest of the program almost
  440.         writes itself.  [D. Boundy]
  441.  
  442.  
  443.                               o    o    o
  444.  
  445.  
  446.                    We'll just reuse this data item.
  447.  
  448.  
  449.    The disciplined programmer does not give two names to one thing
  450.    nor attribute two things to one name.  Names are meaningful and
  451.    specific, and their length is proportional to their scope.  A
  452.    loop variable used only once in a two-statement loop may be
  453.    called "i", but a global variable that may be used anywhere in
  454.    the program will have a long name that accurately describes its
  455.    usage.  [Boundy's Laws of Naming]
  456.  
  457.    The disciplined programmer adheres to the standards of his
  458.    workgroup, even when these standards appear arbitrary.  A
  459.    standard as small as indentation style makes the code more
  460.    readable for a person who doesn't know it.  That person might be
  461.    the programmer, two years later, after the code is forgotten.
  462.  
  463.    A program is written once, but read many times.  Why not make it
  464.    easy on the next person who reads the code?
  465.  
  466.  
  467.                               o    o    o
  468.  
  469.  
  470.           That could never fail--don't bother testing for it.
  471.  
  472.  
  473.    When he first began to program, one of the authors of this paper
  474.    (please don't ask which) developed an unfortunate impatience with
  475.    writing code to test for error conditions.  In his programs, he
  476.    would skip error checking after certain operating system calls,
  477.    such as Fclose and Fgetinfo which he "knew" could never fail.
  478.  
  479.    Then he discovered that a :File Command could cause the Fclose
  480.    Intrinsic to fail, leaving the file hanging open.  And Fgetinfo
  481.    failed once, undetected, when he closed the file by mistake, and
  482.    another time when it was accessing a remote file on another
  483.    system, and a third time when the calls were being intercepted by
  484.    another vendor's run-time library.
  485.  
  486.    This programmer learned the hard way to test every system call
  487.    and every library function for failure.  If he doesn't, his
  488.    program may go merrily along, processing with the wrong data.  He
  489.    accepts the fact that most of his programs will have more lines
  490.    of code to handle failure than to handle success.
  491.  
  492.    Sometimes we develop a similar attitude toward manual procedures,
  493.    such as installing a new version --  "I've done this so many
  494.    times, I could do it in my sleep!"  Implying, "I couldn't
  495.    possibly make a mistake".  Unfortunately, uninspiring tasks are
  496.    the most likely place to misstep, since it is difficult to keep
  497.    your concentration focused.  When we install new software, we
  498.    have to follow a written checklist.  The checklist includes every
  499.    step to create a new version of the product, plus steps to verify
  500.    that the installation was done properly (i.e, make a demo tape
  501.    and install it on another machine).
  502.  
  503.  
  504.                               o    o    o
  505.  
  506.  
  507.                Fascinating project -- too bad it failed.
  508.  
  509.  
  510.    Fascination with grandiose schemes and bigness leads to White
  511.    Elephants.  The symptoms are pretentious objectives, high cost,
  512.    fantastic claims, neglect of other projects, fanatical denial of
  513.    failure, and a sudden, total write-off.  All so unnecessary.  In
  514.    software, big results can come from tiny investments and tiny
  515.    results can come from big investments.
  516.  
  517.         The original Lotus 1-2-3 (tm) and dBASE (tm) programs
  518.         were two of the most successful application programs
  519.         ever written.  1-2-3 was written mostly by one person
  520.         in eighteen months.  The macro capability, one of the
  521.         things that made 1-2-3 really successful, was added by
  522.         the developer at the end because he had some extra time
  523.         -- it wasn't even in the informal spec he had.  dBASE
  524.         was written by one person over a two-year period while
  525.         he also held a full-time job.  [D. Thielen]
  526.  
  527.    Hewlett-Packard has done two large, exotic database projects for
  528.    the HP 3000 that were never released to users.  Those projects
  529.    consumed R&D resources that could have provided badly-needed
  530.    enhancements to HP's popular but untrendy IMAGE product.
  531.  
  532.         There is a popular view that technology is only
  533.         technology if it is high-tech -- sort of a "Big Bang"
  534.         theory of technological development where somebody
  535.         suddenly thinks of a major innovation or invention.
  536.         But most of the technological change that goes on in
  537.         society is not the "Big Bang" type.  Rather it is
  538.         small, gradual, marginal things.  [Michael Bradfield,
  539.         Dalhousie University, Globe and Mail newspaper.]
  540.  
  541.    Robelle's biggest failure was the Virtual Fortran compiler.  We
  542.    had no Fortran expertise and no local test sites, but we did have
  543.    big plans.  We were going to run big, scientific Fortran programs
  544.    on a 16-bit HP 3000, instead of waiting for a new RISC computer.
  545.    Although we did complete the project, it was late and never
  546.    performed fast enough.  We were seduced by the glamour of the
  547.    project.  We squandered two man-years we could have spent on more
  548.    humble but more successful projects.
  549.  
  550.  
  551.                               o    o    o
  552.  
  553.  
  554.              We tested it once by hand, isn't that enough?
  555.  
  556.  
  557.    You can't test for the complete absence of bugs, because you
  558.    can't try every path through the code.  But you can test the
  559.    typical cases and the boundary cases:  minimum value, maximum
  560.    value, and no value.  In rigorous testing environments, such as
  561.    software for jet aircraft, it is standard practice to measure the
  562.    percentage of program statements being executed by the tests and
  563.    aim for 100% coverage.
  564.  
  565.    Automated testing is the answer.  The computer can do more tests
  566.    than we can manually and do them more reliably.  We borrowed the
  567.    idea for test jobs from the Pascal validation suite, a series of
  568.    tests that told whether a Pascal compiler was up to the standard.
  569.    A typical job tests one command, often by modifying data two
  570.    different ways and comparing the results.  For example, copy a
  571.    file with Suprtool and again with Fcopy.  Any difference and the
  572.    job aborts.
  573.  
  574.    When we are revising a program, we schedule the test suite to run
  575.    at night.  It is amazing how often a seemingly minor change
  576.    causes 10 or 20 test jobs to fail.
  577.  
  578.    When working on a bug, a good practice is to add a test that
  579.    reproduces the problem.  When the bug is fixed, the test passes.
  580.    Reproducing a bug in the test suite also provides a warning if
  581.    the bug creeps back into the code.  It is embarrassing how often
  582.    old bugs resurface.
  583.  
  584.  
  585.                               o    o    o
  586.  
  587.  
  588.         It's fixed, but is waiting for the next release cycle.
  589.  
  590.  
  591.    Installing new software into production is an error-prone
  592.    process.  The program has to match the source code, the help
  593.    file, and the manual; everything has to be tested; and so on.
  594.    The more error-proof the installation process, the more onerous
  595.    and time-consuming it becomes.  This discourages frequent
  596.    software updates, causing release cycles to stretch out until it
  597.    takes two years to get the simplest bug fix into production.
  598.    Look how many years it has taken HP to add support for IEEE
  599.    floating-point numbers to TurboIMAGE.
  600.  
  601.    The way to quicken development cycles is to automate every step
  602.    in sight.
  603.  
  604.    For our products such as Suprtool, we have a job stream that
  605.    regenerates a new version.  The job stream
  606.       *  recompiles all the code, including supporting modules
  607.          and programs,
  608.       *  runs the test suite against the NM and CM versions of
  609.          the product,
  610.       *  reformats the documentation files to check for
  611.          hyphenation errors, which it delivers to the programmer
  612.          through electronic mail, and
  613.       *  generates a new help file.
  614.  
  615.    Now if we could figure out a way to have the computer actually
  616.    fix the bugs and write the documentation, we could retire.
  617.  
  618.  
  619.                               o    o    o
  620.  
  621.  
  622.            It can't be changed, too much code references it.
  623.  
  624.  
  625.    Global variables are the worst enemy of good software.  This
  626.    insight came to us in two waves.
  627.  
  628.    First we learned not to use a literal constant, such as "80",
  629.    when an identifier like "buffer-size" was allowed.  Which would
  630.    be easier if you want to change the buffer size?
  631.  
  632.    Later we learned that this is not enough.  The wider the access
  633.    to any data structure, the more code to be checked when that data
  634.    structure is revised.
  635.  
  636.    For example, Suprtool has a fixed-size table for the Extract
  637.    Command.  On Classic machines, the space used by Extract limits
  638.    the space left for buffering.  We want to convert the Extract
  639.    table into a linked list.  So far we haven't found the time,
  640.    because there are so many places in the code where the table is
  641.    indexed as an array.  If we were doing the Extract Command today,
  642.    we would hide the data structure in a separate module.  The rest
  643.    of Suprtool would call procedures in that module to access the
  644.    data structure.
  645.  
  646.    The AIFs for MPE XL are a good example of making programs data
  647.    independent.  An AIF is a fast subroutine for accessing system
  648.    tables.  When a system tool uses AIFs, it doesn't know the
  649.    location and structure of system tables.  MPE XL may be improved
  650.    and changed drastically, but the system tools will still run
  651.    properly.
  652.  
  653.  
  654.                               o    o    o
  655.  
  656.  
  657.               That would mean changing all the programs.
  658.  
  659.  
  660.    The year 2000 haunts those of us with only two digits reserved
  661.    for the year instead of four.  Will our invoices be dated January
  662.    1st 1900 at the turn of the century?  How are we going to sort by
  663.    date when "01" is less than "99"?  Why did the millennium have to
  664.    occur in our generation?
  665.  
  666.    We wish now that we hadn't hard-coded the date format into all
  667.    those programs, nor sprinkled ad-hoc code throughout our systems
  668.    to edit and format dates.  Couldn't we just extend the year 1999
  669.    instead of going to 2000?
  670.  
  671.    With perfect hindsight, we would have used modular programming in
  672.    the first place.  Programs wouldn't "know" about dates--they
  673.    would depend on a date module for that knowledge; a module that
  674.    holds all the functions and data structures for dates and reduces
  675.    them to a clean, published interface; a module that edits dates,
  676.    converts them between different formats, compares dates, and does
  677.    date arithmetic.  To change a date format, we change the module.
  678.  
  679.    There is still time to correct past follies.  You can break up
  680.    large modules into smaller ones, write new, generalized modules
  681.    to replace the old, restrictive ones, and design modules to be
  682.    used as tool kits upon which other can build.
  683.  
  684.    That should be enough to redeem past sins.
  685.  
  686.  
  687.                               o    o    o
  688.  
  689.  
  690.                 We gave the users what they asked for.
  691.  
  692.  
  693.    As an experienced developer once quipped, "The firmer the specs,
  694.    the more likely to be wrong."
  695.  
  696.    It is natural to plan for only one release of a new program.
  697.    Unfortunately, the original software design is seldom what the
  698.    users really need.  The harder we pressure the users to tell us
  699.    what they want, the more frustrated we both get.  Users can't
  700.    always tell us what they need, but they certainly recognize what
  701.    they don't like when they see it.
  702.  
  703.    The key to writing quality software is to do it in several
  704.    releases.  Once the users have the first release, the programmer
  705.    incorporates their feedback (i.e., complaints) into the next
  706.    release.  At our firm, we send new "beta test" software to our
  707.    customers every month.  During a year, we may have 80 test
  708.    installations for a product with 800 active users -- about 10% of
  709.    the customer base.
  710.  
  711.    At Robelle we use a development method called "Step by Step",
  712.    created by Michel Kohon.  It breaks a large project into small,
  713.    two-week steps.  This does not mean ignoring long-term goals, but
  714.    once we learn more about the users' actual needs from each step,
  715.    we commonly adjust our long-term goals as the program evolves.
  716.  
  717.         The final aim is the program, not the analysis.  So,
  718.         until the program or its results are in the hands of
  719.         user, nothing is completed.  [M. Kohon]
  720.  
  721.  
  722.                               o    o    o
  723.  
  724.  
  725.  
  726.    Computing Your Score
  727.  
  728.    That is the last of our warning signs.  Did you recognize many of
  729.    them? Now calculate your score?  Remember, five points per
  730.    warning sign, and the lower the score, the better.
  731.  
  732.         0 is too good.  You must have cheated.
  733.  
  734.         20 is excellent.  Congratulations.
  735.  
  736.         40 is respectable.  Good work.
  737.  
  738.         60 is worrying.
  739.  
  740.         80 or more is a disaster.  Update your resume.
  741.  
  742.  
  743.  
  744.    Suggested Readings
  745.  
  746.  
  747.    Boundy, David.  "A Taxonomy of Programmers." Software Engineering
  748.    Notes (ACM SIGSOFT), October 1991.
  749.  
  750.    Denning, Peter J.  "What Is Software Quality?", Communications of
  751.    the ACM, January 1992, Volume 35, No. 1.
  752.  
  753.    Feynman, Richard P.  "Personal Observations on the Reliability of
  754.    the Shuttle." What Do You Care What Other People Think?, New
  755.    York: W. W. Norton, 1988.
  756.  
  757.    Gomory, Ralph.  "Of Ladders, Cycles, and Economic Growth."
  758.    Scientific American, June 1990.
  759.  
  760.    Green, Robert M.  "Improving Software Quality." Steps to Software
  761.    Quality.  Robelle Consulting Ltd., 1990.
  762.  
  763.    Halberstam, David.  The Reckoning.  New York: Avon, 1986.
  764.  
  765.    Kernighan and Plauger.  Elements of Programming Style.  Bell
  766.    Telephone Labs, 1974.
  767.  
  768.    Kohon, Michel.  "Introduction to Step by Step." Steps to Software
  769.    Quality.  Robelle Consulting Ltd., 1990.
  770.  
  771.    Peters, Tom.  Thriving on Chaos.  New York: Harper and Row, 1987.
  772.  
  773.    Reich, Robert.  "The Quiet Path to Technological Preeminence."
  774.    Scientific American, October 1989.
  775.  
  776.    Thielen, David.  "Unconventional Thoughts on Managing PC Software
  777.    Development." Microsoft Systems Journal, May 1991.
  778.