MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: snippets

  • To: mathgroup at
  • Subject: [mg89708] Re: snippets
  • From: David Bailey <dave at>
  • Date: Wed, 18 Jun 2008 06:41:03 -0400 (EDT)
  • References: <g1o8fd$hd4$> <> <g2qhe2$8kr$>

Murray Eisenberg wrote:
> That's a useful tutorial on your blog. Of course the palette shown 
> reflects your own interests and needs.
> But the title "Newbie.nb" for this palette jarred when I saw the For 
> expression on one of the buttons.  In general, it's a bad idea to look 
> right away to For in order to do iteration.  I recommend that "newbies" 
> not even be told about For until all other, more reasonable constructs 
> -- Table, Sum, f@@expr, f/expr, Nest, etc. -- be tried first for fit to 
> the problem.
> In short, when in Mathematica-land, code in the best 
> "Mathematica-speak", not in FORTRAN-speak, C-speak, etc.
> bobeuland at wrote:
>> Since nobody answered my question I had to do some digging myself. The
>> best approach I found was to make a custom palette for my snippets.
>> You can see how I've done it at

Can I suggest that people should be taught BOTH procedural and 
functional code. This is because procedural code can be very useful for 
messy problems - where the arrays are not going to be processed in a 
nice uniform way. Sure, there will probably be a functional equivalent, 
but it may be quite hard to formulate.

Procedural code also provides a comforting link with C and Fortran 
programming experience - a bit like learning to ice skate by holding on 
to the barrier!

David Bailey

  • Prev by Date: Re: Will adding RAM help "No more memory available" error?
  • Next by Date: Re: plot in text mode
  • Previous by thread: Re: Re: Re: Re: snippets
  • Next by thread: Re: Re: snippets