home *** CD-ROM | disk | FTP | other *** search
/ ftp.robelle3000.ai 2014 / 2014.06.ftp.robelle3000.ai.tar / ftp.robelle3000.ai / papers / popquiz.pro < prev    next >
Text File  |  1994-11-27  |  33KB  |  1,040 lines

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