home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / sci / math / 10901 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  6.0 KB

  1. Xref: sparky sci.math:10901 comp.lang.misc:2900 comp.lang.fortran:3391
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!network.ucsd.edu!mvb.saic.com!unogate!beckman.com!dn66!a_rubin
  3. From: a_rubin@dsg4.dse.beckman.com (Arthur Rubin)
  4. Newsgroups: sci.math,comp.lang.misc,comp.lang.fortran
  5. Subject: Re: Scientists as Programmers (was Re: Small Language Wanted)
  6. Message-ID: <a_rubin.715469580@dn66>
  7. Date: 2 Sep 92 21:33:00 GMT
  8. References: <1992Aug31.170849.11927@mprgate.mpr.ca>   
  9.  <1992Aug31.195540.13074@ctr.columbia.edu> 
  10.  <1992Sep1.115849.13522@relay.nswc.navy.mil> <Btx4vF.Jx6@mentor.cc.purdue.edu> <92Sep1.205116edt.669@neuron.ai.toronto.edu>
  11. Lines: 104
  12. Nntp-Posting-Host: dn66.dse.beckman.com
  13.  
  14. In <92Sep1.205116edt.669@neuron.ai.toronto.edu> radford@cs.toronto.edu (Radford Neal) writes:
  15.  
  16. >In article <Btx4vF.Jx6@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  17.  
  18. >The following post is so profoundly incorrect that I feel compelled to
  19. >respond (despite the fact this is usually a Bad Idea on usenet :-).
  20.  
  21. >Perhaps I should note that I have 18 years experience in programming,
  22. >have programmed in numerous assembler languages, and most high-level
  23. >languages you could think of (yes, including Fortran and Cobol :-),
  24. >and have lots of experience in both systems and application
  25. >programming, including statistical applications (in fact, the later is
  26. >the topic of the Ph.D. thesis I am currently working on). I'm not one
  27. >of those CS graduates who aren't sure what an assembler is, who have
  28. >been mentioned earlier in this thread...
  29.  
  30. Well, I have 20-22 years experience in programming, have programmed in
  31. numerous assembler languages, and many high-level languages, (including
  32. Fortran, C, Snobol), and have lots of experience of both systems and
  33. application programming.
  34.  
  35. >>Software engineering is not that relevant in general.  What is relevant is
  36. >>the translating of the problem to be computed into the collection of bits
  37. >>which the machine can understand to accomplish the task.  
  38.  
  39. >Someone has greatly mislead you concerning what constitues software 
  40. >engineering. Your second sentence is a good first cut at a definition!
  41.  
  42. What distinguishes "software engineering" from programming, then.
  43.  
  44. >>This involves
  45. >>
  46. >>    Knowing the algorithmic processes which can be applied, their
  47. >>    strengths and weaknesses, and what happens to them on the particular
  48. >>    machine when they are translated using the available languages.
  49. >>
  50. >>    Evaluating the costs of using the tools.
  51.  
  52. >This is a good second cut at defining "software engineering"! 
  53.  
  54. What distinguishes "software engineering" from programming, then.
  55.  
  56. >>If a procedure can use some of the machine instructions and the languages
  57. >>available to the programmer cause code to run considerably slower because
  58. >>the languages cannot use those instructions, the languages are inadequate. 
  59. >>No amount of software engineering, or compiler optimization, and get around
  60. >>this.  It is this feature which can make major differences in the relative
  61. >>speeds of computing on different machines.
  62.  
  63. >This is seldom true. In fact, machines and programing languages have
  64. >co-evolved in such a way as to practically ensure this. (From a later
  65. >comment, perhaps you realize this...) The result may not be a global
  66. >optimum, but it appears that the effort required to do something
  67. >radical is not worthwhile at the moment, and will not be until the
  68. >rate of progress being achieved with present architectures slows down.
  69. >(Look at the state of "Lisp machines" to confirm this - and they
  70. >aren't even very radical, really!)
  71.  
  72. Consider the "index of largest bit"  on an integer variable.  Any binary
  73. machine with integer and floating point hardware, and communication between
  74. them, can generate that number; to do so in assembler may require precise
  75. knowledge of the floating point format (not all machines have IEEE floats);
  76. and it is not available in most programming languages.  (It is available
  77. indirectly in  most extensions of C.)
  78.  
  79. >There are exceptions, of course. The CDC 6000 series had (has? It's
  80. >been years...) a special "count bits" instruction, for example. No
  81. >language has this as a built in operator. You can get at it via a call
  82. >to an assembly-language subroutine, however. The subroutine call
  83. >overhead will almost always be insignificant.
  84.  
  85. (Perhaps) a minor point:  the subroutine call overhead will almost always
  86. be more than the execution time of the special instruction; it is
  87. frequently significant.
  88.  
  89. >>The CS curricula exascerbate the problem by indoctrinating the student in
  90. >>the attitude that the machine instruction set is not to be considered in
  91. >>normal programming. 
  92.  
  93. >While "indoctrination" is, of course, undesirable, the indicated
  94. >attitude is indeed correct. Try writing a commercial program in
  95. >assembly language and see how popular you are with the boss when he
  96. >finds out that because of this the company can't switch to a new
  97. >machine that's cheaper and faster. Or that the program stops working
  98. >when a new release of the standard subroutine library is installed,
  99. >with a different calling convention. Or that there's a much faster
  100. >algorithm that a sensible programmer would have found, in the time you
  101. >wasted grubbing for microseconds at the machine level.
  102.  
  103. He didn't say "writing in ... assembler language"; he said be aware of the
  104. machine instruction set.  (I admit most of the improvement would be by a
  105. small factor, but....).  For instance, in writing programs for machine
  106. which don't have hardware multiply and divide, you should generally avoid
  107. using multiplies and divides in the program, even if there is an emulator
  108. package to perform those functions.  For a more modern example, if you are
  109. programming a vector machine, you should attempt to use a vecorizable
  110. algorithm, even if it appears a little less efficient because it performs
  111. unnecessary operations.
  112.  
  113. --
  114. Arthur L. Rubin: a_rubin@dsg4.dse.beckman.com (work) Beckman Instruments/Brea
  115. 216-5888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal)
  116. My opinions are my own, and do not represent those of my employer.
  117. My interaction with our news system is unstable; if you want to be sure I see a post, mail it.
  118.