home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / sci / math / symbolic / 3058 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  5.3 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!peoplesparc.Berkeley.EDU!fateman
  2. From: fateman@peoplesparc.Berkeley.EDU (Richard Fateman)
  3. Newsgroups: sci.math.symbolic
  4. Subject: Re: The Real Meaning of Efficiency?  (Re: Serious Programming, etc.)
  5. Date: 20 Nov 1992 17:48:47 GMT
  6. Organization: University of California, Berkeley
  7. Lines: 112
  8. Message-ID: <1ej8dvINN3u2@agate.berkeley.edu>
  9. References: <1992Nov19.203202.17362@wri.com> <1992Nov20.051351.18180@alchemy.chem.utoronto.ca> <By0q94.9p9@news.cso.uiuc.edu>
  10. NNTP-Posting-Host: peoplesparc.berkeley.edu
  11.  
  12. In article <By0q94.9p9@news.cso.uiuc.edu> Richard J. Gaylord <gaylord@ux1.cso.uiuc.edu> writes:
  13.  
  14.  
  15. >recursion is said to be a powerful tool but it is almost never used. why?
  16. >one reason, of course,  is that the old FORTRAN didn't support recursion. 
  17.  
  18. Another reason is that most people are unable to think about it 
  19. without some training.  That's why it is taught in CS classes.
  20. Mathematical Induction is said to be a powerful tool but it is almost
  21. never used. That's why it is taught in mathematics (and CS) classes.
  22.  
  23. digression:  The split program was an example of induction that translated
  24. into recursion. You couldn't write it that way in Mathematica without
  25. losing big on efficiency. It would look Something like this..
  26.  
  27. Split[{},n_]:={}  (* base case *)
  28. Split[lis_,n_]:=MakeANewListOf[FirstNElementsOf[lis,First[n]],
  29.                                Split[ElementsAfterFirstN[lis,First[n]],
  30.                                      Rest[n]]
  31. undigression.
  32.  
  33. At Berkeley, we haven't taught Fortran in CS for many (20) years.  There
  34. is a Fortran intro course in engineering, taught by engineering faculty.
  35. But the main upper division scientific computing for engineers course
  36. is taught using Matlab, although there is some (I think) fortran. Maybe
  37. sometime they will use a CAS too. Working engineers may have to make
  38. many sacrifices to get the job done.  We try to show them better
  39. approaches that might help them during the 40+ years of their career.
  40. We are not a vocational school. They can learn fortran in 1 week, and
  41. they can become expert at it in 3-6 months. This is not important CS stuff.
  42.  
  43. The fact of the matter is that many non-CS scientists think that CS courses
  44. "teach programming languages".  This is (or should be) false.  We should
  45. be teaching ideas about algorithms, data structures, organization of
  46. programs (correctness, etc). The nature of the artifacts (e.g. current
  47. instruction sets, dialects of programming languages) are incidental, but
  48. we teach some of that too.
  49.  
  50. I have heard it said at a major US gov't laboratory that the difference
  51. between physicists and computer scientists is that the computer
  52. scientists know no physics.  Although this is is initially amusing,
  53. it is actually a truthful indication of the sad state of computing in
  54. physics.  Do you really want your students to get jobs where they
  55. can worry about someone else's COMMON statements,
  56. and submit their revisions of programs as"card deck images" --- and
  57. not know that there is something better???
  58.  
  59. >Its totally clear that most cs departments don't have
  60. >the faintest idea what non-cs people want or need to know about
  61. >programming. 
  62.  
  63. I agree on this.
  64.  
  65. >This can be seen from the recent move at many places from
  66. >FORTRAN to C as the first language. 
  67.  
  68. False, at least for my department.  We don't teach C first, and we certainly
  69. don't push C as a language for scientific computing. We introduce Scheme
  70. first as a way of conveying important ideas in COMPUTING.
  71.  
  72. >it has been said that you shouldn't teach programming with mathematica
  73. >because its a bizarre and inconsistent language...
  74.  
  75. I'll agree with whoever said that.
  76.  
  77. ... and if you learn
  78. >mathematica programming it will ruin your ability to learn how to program
  79. >properly. 
  80.  
  81. I doubt that.  But I've heard this said about BASIC, and FORTRAN too. The
  82. human mind is sufficiently flexible that bad habits can be unlearned.
  83.  
  84.  
  85. >the best thing that could happen to the teaching of programming to tech
  86. >people would be to use mathematica to do it.
  87.  
  88. I disagree strongly.  You may think this is a religious argument, but
  89. here are my justifications, in brief:
  90.  
  91. Try to explain the concept of a linked list in Mathematica.  Try to
  92. explain why O(n log n) sorting algorithms take O(n^3). Try to explain that
  93. a/b and 1/2 are different data structures.  
  94. Try to explain why x:=(x+x)/2 increases the accuracy of x, but
  95. that x:= 2*x-x decreases it.  (but only in versions < 2.0) .
  96.  
  97. If you want your students to believe that computers are magic,
  98. although sometimes unreliable, then Mathematica is your language!
  99.  
  100. >
  101. >finally, the comment about the use ofthe 'claptrap' of anonymous
  102. >functions to avoid pattern matching is total claptrap (which according to
  103. >the dictionary means  pretentious nonsense). i write almost all of my
  104. >programs using anonymous functions because i use a functional programming
  105. >style which is very natural to me. others  prefer to program using 
  106. >pattern matching (which is far more sophisticated in mathematica than in
  107. >most other languages). the ability to choose the style most appropriate
  108. >to the problem and to the way in which the programmer thinks is one of
  109. >the most important features of mathematica.
  110.  
  111. Thanks for looking up claptrap.
  112.  
  113.  
  114. > hopefully, this thread will have ended by the time i return from my
  115. >thanksgiving hoiday.
  116.  
  117. I doubt it. Enjoy your turkey..
  118.  
  119.  
  120.  
  121. -- 
  122. Richard J. Fateman
  123. fateman@cs.berkeley.edu   510 642-1879
  124.