MathGroup Archive 2009

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

Search the Archive

Re: Re: Replace and ReplaceAll -- simple application

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106005] Re: [mg105982] Re: Replace and ReplaceAll -- simple application
  • From: "David Park" <djmpark at comcast.net>
  • Date: Wed, 30 Dec 2009 04:13:08 -0500 (EST)
  • References: <200912270006.TAA12080@smc.vnet.net> <hh72dp$kud$1@smc.vnet.net> <hh9vfo$1rk$1@smc.vnet.net> <14301726.1262069417572.JavaMail.root@n11>

It would be nice if some of these features could be designed out. Another
thing I find inconvenient is the way expressions often Simplify to a form
that contains extra minus signs. But perhaps trying to design these things
out will just push out problems somewhere else.

Nevertheless, I think this is primarily an education problem. Users do not
learn the basic use of Mathematica early enough and then they stumble over
various features just when they have a serious problem that needs solving.
Very frustrating.

One skill that students may especially lack is the ability to manipulate
expressions in a more detailed form. They may want to do this to obtain a
specific textbook form, or just because they prefer a certain form, or
because they want to follow a specific solution path. Mathematica is really
good at that kind of stuff but learning to do it takes education, time and
practice. Just adding extra notes and examples in Help, although useful, is
not in itself going to solve the education problem. And it's not fair to
students to throw Mathematica at them on difficult material, when they have
not really learned how to use it.


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  


From: AES [mailto:siegman at stanford.edu] 


In article <hh9vfo$1rk$1 at smc.vnet.net>,
 Richard Fateman <fateman at cs.berkeley.edu> wrote:

> Scot T. Martin wrote:
> > The problem is that "-1." is not "1".

> And furthermore, this bug has been declared a feature. And defended,
> repeatedly.   Just as I does not occur in -I.
> It can be fixed, should be fixed, and has been fixed in other CAS.


I'll defer to Richard Fateman (and/or other computer algebra experts) as
to whether this general behavior (!! especially with respect to -I  !!)
is a bug that should be fixed, or a feature.

But if it's gonna be considered a feature in Mathematica, I'd strongly
suggest that it should be strongly **featured** -- or, if you like, it
should be warned about!! -- in the Mathematica documentation, especially
at the more elementary levels of documentation, **so that ordinary users
can't miss being warned about this unexpected behavior**  ^HH^H^H^H
sorry, so that they can't miss being warned about "this feature".

For example, right after the first line of the Help for I, which says

      I  represents the imaginary unit Sqrt[-1].

there might be a warning line which says

      WARNING:  I is a number and not a symbol.  Attempting to replace
      or reverse the sign of I using a rule, such as  expr/.{I->-I) may
      produce unexpected results if the expr contains -I.

(By the way, note the wording above:  "I represents", not "I is".)

There are a very large number of other places in the Mathematica
documentation where emphasized WARNINGs like this would be helpful.

(I suppose there could even be optional warning messages that appear any
time a cell executes a rule containing a number on the LHS of a
ReplaceAll symbol.  And, the documentation for ReplaceAll could have an
initial WARNING message that it is not just the kind of Global Search
and Replace command that many ordinary users, familiar with many other
word processing and software apps, might well think it is. )




  • Prev by Date: Re: Re: Replace and ReplaceAll -- simple application
  • Next by Date: Re: Re: Replace and ReplaceAll -- simple application
  • Previous by thread: Re: Re: Replace and ReplaceAll -- simple application
  • Next by thread: Re: Re: Replace and ReplaceAll -- simple application