home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / software / 4349 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  4.3 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!agate!doc.ic.ac.uk!uknet!strath-cs!bnr.co.uk!bmdhh243!agc
  2. From: agc@bmdhh286.bnr.ca (Alan Carter)
  3. Newsgroups: comp.software-eng
  4. Subject: Code Reviews (was SE going offshore?)
  5. Message-ID: <1992Nov17.172139.15122@bnr.uk>
  6. Date: 17 Nov 92 17:21:39 GMT
  7. References: <1992Nov13.142754.12335@ornl.gov> <6962@dove.nist.gov>
  8. Sender: news@bnr.uk (News Administrator)
  9. Organization: BNR-Europe-Limited, Maidenhead, England
  10. Lines: 78
  11. Nntp-Posting-Host: bmdhh286
  12.  
  13. In article <6962@dove.nist.gov>, bagwill@swe.ncsl.nist.gov (Bob Bagwill) writes:
  14. |> Judd Jones (jov@styx.ornl.gov) wrote:
  15. |> : (I note that even a 20:1 productivity differential cannot overcome
  16. |> : a greater than 20:1 cost differential, so greater per capita domestic
  17. |> : productivity may not be terribly relevant.)
  18. |> 
  19. |> Here's something to consider:
  20. |> 
  21. |> Q: What's the most effective method for catching design and
  22. |>    coding problems?
  23. |> 
  24. |> A: Group code reviews.
  25. |> 
  26. |> Q: What's the most [upfront] expensive method for catching design
  27. |>    and coding problems?
  28. |> 
  29. |> A: Group code reviews.
  30. |> 
  31. |> Q: What technique is easiest to apply if you have skilled,
  32. |>    highly-motivated low-paid workers with little hardware or
  33. |>    software support?
  34. |> 
  35. |> A: Group code reviews.
  36. |> 
  37. |> A U.S. company could hire a bunch of local marketeers and
  38. |> superprogrammers to do the design and then group review the code with
  39. |> cheaper non-local labor until it's six sigma.
  40.  
  41. I have found that group code reviews are less effective than individual 
  42. inspection these days. Group reviews are done with listings and it is very
  43. hard to pay attention to every little line or side effect. When code
  44. reviews got into vogue, simple cost meant that the reviewers didn't 
  45. have terminals in front of them. So reviewers don't have access to the
  46. simplest automated search programs when criticising the code. Many groups
  47. now make a virtue of the absence of terminals. 
  48.  
  49. Using a symbolic debugger like dbxtool or CodeCenter one can single-step 
  50. one's code and actually watch it do its things. This naturally focuses 
  51. attention on each line as it is executed, and it is often possible to spot
  52. things like ill-formed expressions that will make conditionals go the 
  53. wrong way under certain circumstances, even while watching them go the 
  54. right way for other test data. This and a listing (to be crossed out in 
  55. red crayon) provide all that is needed for really detailed, 100% code 
  56. coverage, code inspection. Also, I can single-step for longer than anyone 
  57. can code inspect, and my keenness does not diminish until I get tired. 
  58. This is because watching one's own program work is fun, whereas code 
  59. inspections are very boring.
  60.  
  61. I don't run programs any more when I get them compiled; its into the 
  62. debugger and test the stuff straight away. I still have to go to code 
  63. inspections of course; that's policy. But the only changes I've had 
  64. logged against me in a code inspection this year (although the same 
  65. change was specified several times) has been 'I think we need more 
  66. comments here'.  I'm not convinced that the extra comments really were 
  67. needed; people seem to need to find *something* at every code inspection. 
  68.  
  69. My fault report rate from the testers is similarly low, but my fault 
  70. discovery rate during single step testing is still depressingly high. 
  71. I seem to have reached a plateau of being able to type in straight code.
  72. The mistakes go in, but the use of the symbolic debugger in this way gets
  73. a very high proportion of them. 
  74.  
  75. I can single step perhaps slightly faster than a reader can paraphrase. 
  76. Take a typical code inspection involving 4 people, for 2 hours, with 1
  77. hour of prep and 15 minutes of sitting-down overhead per person, and we
  78. have a cost factor of 6.5 over code inspections, with an error detection
  79. rate that is at least as good, and probably better. 
  80.  
  81.    Alan
  82.  
  83. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  84. To arrive at the simplest truth, as Newton knew and practised, requires years
  85. of contemplation. Not activity. Not reasoning. Not calculating. Not busy 
  86. behaviour of any kind. Not reading. Not talking. Not making an effort. Simply 
  87. bearing in mind what it is one needs to know.
  88.  
  89.    George Spencer-Brown, Laws of Form
  90. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  91.