home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / edu / 1395 < prev    next >
Encoding:
Text File  |  1992-08-29  |  3.7 KB  |  83 lines

  1. Xref: sparky comp.edu:1395 comp.lang.fortran:3266
  2. Path: sparky!uunet!olivea!decwrl!zazen!doug.cae.wisc.edu!umn.edu!noc.msc.net!uc.msc.edu!shamash!ems!ems.cdc.com!mstemper
  3. From: mstemper@ems.cdc.com (Michael Stemper)
  4. Newsgroups: comp.edu,comp.lang.fortran
  5. Subject: Re: scientists as programmers (was: Small Language Wanted)
  6. Message-ID: <21575@nntp_server.ems.cdc.com>
  7. Date: 28 Aug 92 17:50:10 GMT
  8. References: <1992Aug25.034553.2990@linus.mitre.org> <1992Aug25.154501.8654@colorado.edu> <1992Aug25.202307.12365@newshost.lanl.gov> <1992Aug26.102735.12519@wl.com>
  9. Sender: sys@ems.ems.cdc.com
  10. Reply-To: mstemper@ems.cdc.com
  11. Followup-To: comp.edu
  12. Organization: Empros Systems International, a division of Ceridan
  13. Lines: 67
  14. Nntp-Posting-Host: kirk.ems.cdc.com
  15.  
  16. In article <1992Aug26.102735.12519@wl.com>, schuette@wl.com (Wade Schuette) writes:
  17. |> 
  18. |> Can we focus some attention on what CAN and SHOULD be taught to the
  19. |> scientists who would prefer to write good code and are reasonably bright
  20. |> but extremely busy.  On a very practical, very pragmatic basis.
  21. |> Suppose you can get 45 minutes of time, and hold a seminar on What every
  22. |> scientist should know about computing but probably doesnn't... or some such.
  23. |> 
  24. |> One shot.  The room is impatient. The top people are late. (the projector
  25. |> doesn't focus.) Now what?  This is a serious question, as I'd like to do
  26. |> precisely this, for an audience of primarily biological / chemical 
  27. |> researchers.  Software Engineering 101, extremely applied, for people
  28. |> heavily into Fortran and "getting results today."
  29.  
  30. I would stress the following points:
  31.  
  32. 1. Write down your equations, formulae, algorithms, process description
  33.    on the board (or a piece of paper) first. Make sure that you under-
  34.    stand the physical reality that you are trying to model BEFORE you
  35.    ever start thinking about writing a program.
  36.  
  37.    You're a scientist. You are smarter than a computer. You know lots
  38.    of math. You understand the principles of the situation. This is
  39.    why you get the big bucks. Use your talents to refine the problem
  40.    statement and simplify it if possible.
  41.  
  42.    Have a firm goal in mind.
  43.  
  44. 2. Before you write the code, write a program prologue or header. This
  45.    is one to five paragraphs of comments at the beginning of the module
  46.    that describes (briefly):
  47.    A. Purpose of module
  48.    B. Nature of inputs
  49.    C. Nature of outputs
  50.    D. How module goes from B to C. This can and should include references
  51.       to books, papers (even your own), etc.
  52.    E. Your name and the date
  53.  
  54.    What? You don't know all of that yet? Then you're not ready to write
  55.    anything else, are you? This is the plan for your experiment or the
  56.    model of your process. If you don't know this much about it, how do
  57.    you think the computer can help you?
  58.  
  59. 3. Now, start writing the module:
  60.    A. Name some variables. If you have to deal with an Oxygen flow,
  61.       call the value of that O2FLOW, not OF. But, if everything that
  62.       you are dealing with is an Oxygen flow, don't call them OFLOWA
  63.       OFLOW3, etc. Call them OFCOLD, OFHIGHP, OFXHAU, etc.
  64.    B. Write comments marking off the major parts of the module:
  65.          Get parameters
  66.          Calculate load values
  67.          Find overloads
  68.          Print results
  69.    C. Fill in the details by actually writing some code.
  70.  
  71. 4. If this is truly a one-shot program written only because you left
  72.    your calculator in your car, ignore 1-3 :->
  73.  
  74. Of course, this is the same advice that I would give anybody who wanted
  75. to write good code. The only part that I would change for a non-science-
  76. oriented audience would be not saying "You're smarter than a computer."
  77.  
  78. -- 
  79. #include <Standard_Disclaimer.h>
  80. Michael F. Stemper
  81. Power Systems Consultant
  82. mstemper@ems.cdc.com
  83.