home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.edu:1351 comp.lang.fortran:3190
- Path: sparky!uunet!olivea!hal.com!decwrl!mips!darwin.sura.net!convex!constellation!geohub.gcn.uoknor.edu!dwight
- From: dwight@geohub.gcn.uoknor.edu (Dwight D. Moore)
- Newsgroups: comp.edu,comp.lang.fortran
- Subject: Re: scientists as programmers
- Message-ID: <1992Aug26.143702.21659@constellation.ecn.uoknor.edu>
- Date: 26 Aug 92 14:37:02 GMT
- References: <DAVIS.92Aug23010605@pacific.mps.ohio-state.edu> <1992Aug25.034553.2990@linus.mitre.org> <1992Aug25.154501.8654@colorado.edu> <1992Aug25.202307.12365@newshost.lanl.gov> <l9lrciINNb7b@almaak.usc.edu> <mcdonald.246@aries.scs.uiuc.edu>
- Sender: usenet@constellation.ecn.uoknor.edu (Nets)
- Reply-To: dwight@geohub.gcn.uoknor.edu
- Organization: Geosciences Computing Network, Univ. of Oklahoma
- Lines: 40
-
- >
- >...too much stuff to include...
- >
- There are really several problems when considering a "good programmer":
-
- 1. Good coding techiniques (modularity vs. the "one routine program", documenting
- your code, readability, declaring your variables explicitly, name your variables
- something useful instead of "th" or "de",...etc)
-
- 2. Efficient code (i.e. understanding the underlying concepts to improve code
- performance). Do you index your array in declared subscript order (similar to
- memory order, i.e. a[i][j][k], this makes a difference). Do you minimize your
- expressions (removing extraneous mults by rephrasing your equation) or
- replace division by mults when possible? I have seen where simple changes
- in an equation in a loop improve performance and cut execution time in half.
-
- 3. Documentation. Do you document your code to indicate what is going on?
- Readability, is part of documentation; the more readable your code is, the
- easier it is to maintain, debug, port, etc. Is there paper documentation describing
- methodologies, algorithms for your model, general approach to the problem?
-
- Scientist that I have encountered generally learn (a few do, acutally) to write readable
- code, and pick up a few tricks for efficient coding. This depends on the scientists
- experience and training, but little exposure to good techniques, and good coding
- techniques inhibits, their growth. If I taught a short lecture to a group of scientists,
- I would focus on #1 and #3 (too many people under -estimate the value of #3) and
- work on #2 later...you can always improve your code efficiency after it works, but
- if it is hard to read, you will waste a lot of time trying to figure out where to start.
-
- There is really a fourth category for using data structures, and maybe a fifth for
- advanced programming concepts, but that isn't necessary when talking about scientific
- models and Fortran 77, which is probably still the best language for scientific models.
- ----------------------------------------------------------------------------
- Dwight D. Moore
- Geosciences Computing Network
- University of Oklahoma
-
- dwight@geohub.gcn.uoknor.edu (129.15.40.10)
- These opinions do not necessarily represent the opinions of OU or the GCN.
- ----------------------------------------------------------------------------
-