home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / programm / 2390 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  5.9 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!olivea!mintaka.lcs.mit.edu!bloom-picayune.mit.edu!bloom-beacon!eru.mt.luth.se!lunic!sunic!aun.uninett.no!nuug!ifi.uio.no!enag
  2. From: enag@ifi.uio.no (Erik Naggum)
  3. Newsgroups: comp.programming
  4. Subject: Re: Teaching by Value (was Re: Teaching the Basics)
  5. Message-ID: <23311I@erik.naggum.no>
  6. Date: 19 Aug 92 23:36:02 GMT
  7. References: <1992Aug17.123916.14815@husc13.harvard.edu> <Bt6DGq.HuB@metropolis.com> <1992Aug18.190506.9935@cc.gatech.edu> <1992Aug18.230426.26425@lucid.com> <1992Aug19.135744.14889@husc13.harvard.edu> <1992Aug19.142513.14893@husc13.harvard.edu>
  8. Organization: Department of Informatics, University of Oslo, Norway
  9. Lines: 88
  10.  
  11. peregrin@husc13.harvard.edu writes:
  12. |
  13. |  If you look at your programming peers, are you more concerned that
  14. |  they can write easily maintainable code than if they can write
  15. |  super-slick fast routines?  Who do you want on your programming team?
  16. |  Should the majority of programmers be writers of clean, easy to read
  17. |  and maintain code, and only a few are needed to right tight, fast,
  18. |  efficient routines?
  19.  
  20. Excellent question!  "What are your criteria for selecting a team of
  21. programmers?" should be asked of management, to complete the process.
  22.  
  23. What I want, and I'm quite adamant about it, is code I can trust.  That
  24. is, meet the spec, survive bad input, report breaches of invariants and
  25. assumptions.  This means that the programmers have to know what kind of
  26. assumptions they make, and how to check to see that they're valid.  If
  27. all programmers on a team consistently do this, you don't need debuggers
  28. when things break -- the error log will have all you need to know what
  29. failed and where.
  30.  
  31. This should _not_ be removed from production code unless you have space
  32. constraints in embedded systems.  Something unexpected _will_ happen,
  33. and being able to pinpoint the trouble spot and correct it within a few
  34. minutes will be the most important element in customer satisfaction.
  35.  
  36. My ideal team consist of a "language lawyer", a "code auditor", a "code
  37. surgeon", several tools builders, and a "secretary".  The language
  38. lawyer need not be a full-time team member as long as he's within reach
  39. when there are problems in interfacing to the environment, using
  40. language features, searching for standard utilities, etc.  The code
  41. auditor will keep track of coherence between interface specifications
  42. and code, will see that invariants are not broken, that preconditions
  43. are tested for and post- conditions follow from the code, as well as
  44. test for other assumptions, including what pointers are intended to
  45. point to as well as special values, such as NULL in C.  The code surgeon
  46. is the team head, and everything revolves around his needs to complete
  47. the project.  I'm a firm believer in having as few people implement
  48. central functionality as possible, and if you can't make abstractions
  49. powerful enough to let one person keep track of it, you're already
  50. having a maintenance problem.  The tools builders provide the code
  51. surgeon with tools to get his job done, and take care of incidental
  52. details such as "glue" between libraries and such.  All but the code
  53. surgeon can have apprentice team members, and should have, to explain to
  54. them what is going on, and why.  This looks like the job of good
  55. documentation, but the author of the documentation is seldom a good
  56. critic of his own work until several weeks later.  The purpose of the
  57. secretary is to maintain a project development log, including any
  58. suggestions, decisions, and interface changes were decided upon, what
  59. kind of tools the code surgeon needed and the tools builders had to
  60. build because they couldn't find any suitable existing tool, the hidden
  61. assumptions that were discovered.  The secretary should also work with
  62. the documentation group so that all decisions and assumptions made are
  63. well documented.  There could be a "tools library group" in the
  64. organization which took care of maintaining tools made for several
  65. projects and perhaps generalized them if need be.
  66.  
  67. The focus of such a team is to get a job done fast and accurately; and
  68. over time, cheaper than alternatives, too.  The massive amounts of
  69. documentation and logs will make it possible to find out what to change
  70. and where if more than cosmetic changes have to be made, and the code
  71. auditor knows and has logged interdependencies.  This is _not_ your
  72. favorite night-time hacker kind of job, and I guesstimate that it
  73. wouldn't make sense if the project was below 500 man-hours, and would
  74. reap the highest benefits for projects spanning several months.
  75.  
  76. Automated tools could serve many of the functions I have listed above,
  77. but I sincerely think we're far from having any such tools at the
  78. moment.  Besides, the human-human communication aspect should not be
  79. underestimated.
  80.  
  81. I hope some readers will recognize Frederick J. Brooks' The Mythical
  82. Man-Month in the above, because I've borrowed heavily from him.  I also
  83. know this works very well in practice, given intelligent programmers
  84. with a strong attention to detail.  It does _not_ work with PC
  85. programmers accustomed to working alone and never having to talk to
  86. anybody.  The communications overhead will seem stifling to people who
  87. have not worked in large organizations, and will discourage the
  88. top-notch programmers if they're not the code surgeon.  My experience,
  89. including being a tools builder twice, code auditor once, and code
  90. surgeon four times is that it's tremendously rewarding to be part of
  91. such a team.  Especially the going back to understand what you did, and
  92. it's all there.  I only wish we had had more means of automating the
  93. communications aspects, but mostly, it defies systematization by those
  94. who produce the information -- that's for the recipient (secretary) to
  95. handle.
  96.  
  97. Best regards,
  98. </Erik>
  99. --
  100. Erik Naggum             |  ISO  8879 SGML     |      +47 295 0313
  101.                         |  ISO 10744 HyTime   |
  102. <erik@naggum.no>        |  ISO 10646 UCS      |      Memento, terrigena.
  103. <enag@ifi.uio.no>       |  ISO  9899 C        |      Memento, vita brevis.
  104.