Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13161

Re: Mathematica and Lisp

From Murray Eisenberg <murray@math.umass.edu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Mathematica and Lisp
Date 2013-01-16 06:39 +0000
Message-ID <kd5huk$jk6$1@smc.vnet.net> (permalink)
References <kcqkv4$lq5$1@smc.vnet.net> <kct7fj$sgo$1@smc.vnet.net> <kd03ej$6dl$1@smc.vnet.net> <20130115043105.21DD56958@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


On Jan 14, 2013, at 11:31 PM, David Bailey <dave@removedbailey.co.uk.math.umass.edu> wrote:

>  I do tend to agree that teaching Mathematica as a first programming
> language, would be a bad idea, because so much happens behind the scene
> - for example the way in which multiple definitions for a function get
> reordered to improve efficiency. I would imagine that some students
> would get a hazy idea of what the were asking the computer to do, or how
> expensive it might be.


It all depends on just what you want somebody to accomplish when learning his/her first programming language.

I've thought about that a lot over the some 30 years that I taught FORTRAN, Pascal, APL, J, and Mathematica in university math courses. (My very first programming language was Assembly for a Univac I, followed shortly by octal-coded machine instructions for a paper-tape input computer,  and then FORTRAN II  -- all while I was an undergraduate. A decade later, BASIC, APL, Pascal; subsequently, J and Mathematica. Even later, a smattering of C, Perl, Python, Java. I've even dabbled a tiny bit with Forth and Snobol.)

So what is essential for a first exposure to programming? To me, the essentials are:

(0) Understanding carefully what the problem is, including what is given and what is to be found.

(1) Identifying the objects (data) and what is to be done with them (operations, functions, procedures).

(2) Breaking up a larger problem into its constituent parts.

(3) Isolating the big ideas from the smaller technical points.

(4) Expressing things within the constraints of a precise syntax.

(5) Suitably modularizing the code in accordance with (2) and (3).

(6) Making the code readable through judicious choice of names along with sufficient but non-redundant comments.

(7) Making the code maintainable -- by the original author or others.

(8) Being able to test and debug the code.

(9) For numerical work, understanding and coping with roundoff and other errors due to the limitations of finite precision.

(10) Recognizing when and knowing how to code an operation repetitively -- whether explicitly (iteratively or recursively) or implicitly (functionally).

(11) Recognizing when and knowing how to express conditionals (whether via an explicit If, Which, etc., or instead as is possible in Mathematica, separate definitions of the same function for different cases).

Must the first-language learner get closer what s/he is "asking the computer to do" than might be the case with Mathematica?  If so, how should you reasonably decide how deep to descend? (If you don't know what the ultimate actual binary code is, how could you know what the computer is _actually_ doing?)

My experience, in fact, is that the higher the language level -- such as that possible with Mathematica or APL or J -- then the easier it is to master these essentials.  All too often I have seen students unable to ascend to effective programming with a higher-level language if their minds were rotted by the first exposure being to too low-level a language. (And that is despite my personal learning path that ascended from the ridiculous to the sublime.)

---
Murray Eisenberg                          murray@math.umass.edu
Mathematics & Statistics Dept.      
Lederle Graduate Research Tower           phone 413 549-1020 (H)
University of Massachusetts                     413 545-2838 (W)
710 North Pleasant Street                 fax   413 545-1801
Amherst, MA 01003-9305





Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Mathematica and Lisp amzoti <amzoti@gmail.com> - 2013-01-12 03:23 +0000
  Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-01-13 02:51 +0000
    Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-01-14 05:01 +0000
      Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-01-15 04:28 +0000
        Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-01-17 04:15 +0000
          Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-01-18 05:49 +0000
            Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-01-22 07:40 +0000
              Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-01-23 04:18 +0000
                Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-01-24 06:17 +0000
                Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-01-25 06:33 +0000
                Re: Mathematica and Lisp Murray Eisenberg <murray@math.umass.edu> - 2013-01-26 06:37 +0000
                Re: Mathematica and Lisp Murray Eisenberg <murray@math.umass.edu> - 2013-01-26 06:37 +0000
                Re: Mathematica and Lisp "W. Craig Carter" <ccarter@MIT.EDU> - 2013-01-26 21:58 +0000
      Re: Mathematica and Lisp Murray Eisenberg <murray@math.umass.edu> - 2013-01-16 06:39 +0000
        Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-01-17 04:14 +0000
        Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-01-17 04:14 +0000
        Re: Mathematica and Lisp Richard Fateman <fateman@eecs.berkeley.edu> - 2013-01-18 05:50 +0000
        Re: Mathematica and Lisp W Craig Carter <ccarter@MIT.EDU> - 2013-01-18 05:50 +0000
        Re: Mathematica and Lisp Murray Eisenberg <murray@math.umass.edu> - 2013-01-18 05:50 +0000
        Re: Mathematica and Lisp Murray Eisenberg <murray@math.umass.edu> - 2013-01-18 05:49 +0000
        Re: Mathematica and Lisp W Craig Carter <ccarter@MIT.EDU> - 2013-01-18 05:49 +0000
    Re: Mathematica and Lisp John Doty <noqsiaerospace@gmail.com> - 2013-02-01 01:46 +0000
      Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-02 06:15 +0000
        Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-02-03 07:52 +0000
          Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-05 08:06 +0000
            Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-02-06 10:52 +0000
              Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-07 02:28 +0000
      Re: Mathematica and Lisp danl@wolfram.com - 2013-02-02 06:15 +0000
        Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-03 07:51 +0000
      Re: Mathematica and Lisp Andrzej Kozlowski <akozlowski@gmail.com> - 2013-02-03 07:52 +0000
        Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-05 08:06 +0000
          Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-02-06 10:52 +0000
          Palette problem with Feynman slash notation "Dave Snead" <dsnead6@charter.net> - 2013-02-08 10:10 +0000
    Re: Mathematica and Lisp Matthias Bode <lvsaba@hotmail.com> - 2013-02-04 01:19 +0000
    Re: Mathematica and Lisp John Doty <noqsiaerospace@gmail.com> - 2013-02-04 01:20 +0000
      Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-06 06:51 +0000
        Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-02-06 10:52 +0000
        Re: Mathematica and Lisp "mathgroup " <fizzymath@knology.net> - 2013-02-07 02:27 +0000
    Re: Mathematica and Lisp Alex Krasnov <akrasnov@eecs.berkeley.edu> - 2013-02-05 03:23 +0000
    Re: Mathematica and Lisp John Doty <noqsiaerospace@gmail.com> - 2013-02-07 02:28 +0000
      Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-08 10:10 +0000
      Re: Mathematica and Lisp ?iso-8859-1?Q?J=E1nos_L=F6bb?= <janos@lobb.com> - 2013-02-09 05:42 +0000
      Re: Mathematica and Lisp Richard Fateman <fateman@eecs.berkeley.edu> - 2013-02-09 05:43 +0000
    Re: Mathematica and Lisp Andrzej Kozlowski <akozlowski@gmail.com> - 2013-02-08 10:10 +0000
    Re: Mathematica and Lisp John Doty <noqsiaerospace@gmail.com> - 2013-02-08 10:10 +0000
      Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-09 05:43 +0000
      Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-02-10 08:34 +0000
    Re: Mathematica and Lisp Matthias Bode <lvsaba@hotmail.com> - 2013-02-09 05:43 +0000
    Re: Mathematica and Lisp John Doty <noqsiaerospace@gmail.com> - 2013-02-15 06:56 +0000
      Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-02-17 09:08 +0000
        Re: Mathematica and Lisp Joe Gwinn <joegwinn@comcast.net> - 2013-02-18 10:59 +0000
      Re: Mathematica and Lisp "djmpark" <djmpark@comcast.net> - 2013-02-18 11:00 +0000
        Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-22 06:05 +0000
          Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-02-23 12:01 +0000
            Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-24 04:31 +0000
              Re: Mathematica and Lisp David Bailey <dave@removedbailey.co.uk> - 2013-02-25 07:19 +0000
                Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-26 06:09 +0000
  Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-01-13 02:51 +0000
  Re: Mathematica and Lisp John Doty <noqsiaerospace@gmail.com> - 2013-01-16 06:38 +0000
    Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-01-17 04:15 +0000
      Re: Mathematica and Lisp John Doty <noqsiaerospace@gmail.com> - 2013-01-18 05:50 +0000
  Re: Mathematica and Lisp Peter Klamser <klamser@googlemail.com> - 2013-02-24 04:31 +0000
    Re: Mathematica and Lisp Richard Fateman <fateman@cs.berkeley.edu> - 2013-02-25 07:19 +0000
    Re: Mathematica and Lisp John Doty <noqsiaerospace@gmail.com> - 2013-02-26 06:09 +0000

csiph-web