f



Re: Re: Mathematica Programmer vs. Programming in Mathematica

 

> -----Original Message-----
> From: Steven T. Hatton [mailto:hattons@globalsymmetry.com] 
> Sent: 15 December 2005 10:30
> Subject:  Re: Mathematica Programmer vs. Programming 
> in Mathematica
> 
.......
> > I wonder what value there woudl be in trying to explain what makes 
> > Mathematica "functions" different from functions in 
> languages such as 
> > C in a book addressed to readers most of whom have no 
> knowledge of C 
> > and are not particualry interested in getting it?
> 
> I suspect you will not find very many people who have never 
> programmed in Java, C#, or C++ and are likely to use 
> Mathematica extensively.  I'm not really saying the 
> introduction should use these languages extensively as a 
> means of contrast.  I'm saying that Mathematica should be 
> introduced very differently from the way these general 
> purpose languages are introduced. 

Hang on for a minute - our entire corridor is full of scientists who use
Mathematica every day. And only a couple have used even C. Most
scientists have grown up with Fortran, right? (at least judging from the
way they use Mathematica! ;) So your statement that most Mathematica
people start from Java or C is incorrect.

> "Everything is an expression" should be explained in terms of 
> recursive data structures, which they are.  Obviously, such a 
> presentation should include tree diagrams showing the 
> decomposition of expressions. A brief explanation of how the 
> expression tree is traverse during evaluation should also be 
> given at this point.

I completely disagree - I think for most people who want to understand
Mathematica to get a job done, this actually confuses the issue. It's of course
an interesting topic in computer science, but not really relevant for
people who just want to do something with Mathematica.
 
> Symbols should be explained in relative detail.  UpValues, 
> DownValues, OwnValues, SubValues, and attributes should be 
> presented as part of the introduction to Symbols.  Again, an 
> example showing how these properties of Symbols impact 
> evaluation should be given, and it should use the same tree 
> traversal approach as is used in the introduction of expressions.

I agree with this though!
 
Etc....

H
> 

0
H.L.Owen (69)
12/15/2005 12:18:36 PM
comp.soft-sys.math.mathematica 28821 articles. 0 followers. Follow

1 Replies
851 Views

Similar Articles

[PageSpeed] 58

Owen, HL (Hywel) wrote:

>  
> 
>> -----Original Message-----
>> From: Steven T. Hatton [mailto:hattons@globalsymmetry.com]
>> I suspect you will not find very many people who have never
>> programmed in Java, C#, or C++ and are likely to use
>> Mathematica extensively.  I'm not really saying the
>> introduction should use these languages extensively as a
>> means of contrast.  I'm saying that Mathematica should be
>> introduced very differently from the way these general
>> purpose languages are introduced.
> 
> Hang on for a minute - our entire corridor is full of scientists who use
> Mathematica every day. And only a couple have used even C. Most
> scientists have grown up with Fortran, right? (at least judging from the
> way they use Mathematica! ;) So your statement that most Mathematica
> people start from Java or C is incorrect.

How long ago did they graduate?  I'm talking about new people graduating
from, or still in college.  I cannot imagine they have had no exposure to
Java or something similar.

>> "Everything is an expression" should be explained in terms of
>> recursive data structures, which they are.  Obviously, such a
>> presentation should include tree diagrams showing the
>> decomposition of expressions. A brief explanation of how the
>> expression tree is traverse during evaluation should also be
>> given at this point.
> 
> I completely disagree - I think for most people who want to understand
> Mathematica to get a job done, this actually confuses the issue. It's of
> course an interesting topic in computer science, but not really relevant
> for people who just want to do something with Mathematica.

I'm speaking from the perspective of someone who just wanted to get the job
done.  Mathematica did not behave as I expected it to.  Right now I am
dealing with the conflicting paradigms of the complex structure J:R^2->R^2
verses Complex[] verses v={x,y}.  Trying to coerce Mathematica to deal with
these in general and compatable ways is not straightforward. 

I believe you may be missing the point of saying expressions should be
presented as recursive data structures.  I'm not talking about some
elaborate expostion on data structures, I'm talking about "pointer
diagrams", the kind found in K&R.

Showing the traversal of the expression tree is an essential prerequisite to
teaching about UpValues, DownValues, attributes, evaluation order, etc. 
Forget Mathematica! That is how mathematics should be taught!
  
>> Symbols should be explained in relative detail.  UpValues,
>> DownValues, OwnValues, SubValues, and attributes should be
>> presented as part of the introduction to Symbols.  Again, an
>> example showing how these properties of Symbols impact
>> evaluation should be given, and it should use the same tree
>> traversal approach as is used in the introduction of expressions.
> 
> I agree with this though!

You can't have the second part without the first part.
-- 
The Mathematica Wiki: http://www.mathematica-users.org/
Math for Comp Sci http://www.ifi.unizh.ch/math/bmwcs/master.html
Math for the WWW: http://www.w3.org/Math/

0
hattons (214)
12/16/2005 8:32:44 PM
Reply:

Similar Artilces:

Re: Mathematica Programmer vs. Programming in Mathematica
Hi, "Programming in Mathematica" is the standard book for Mathematica Programming, the "Mathematica Programmer" collects mainly Roman Maeders articles in "The Mathematica Journal" and include interesting stuff like his polyhedron code. But it focus *not* on the programming techniques ... Both books are excelent ... The classes.m package is designed to show, that object oriented programming can be done in Mathematica. But nobody would consider it as more than an example that even a wonderfull functional programming language can be misused for nonsen...

Re: Mathematica Programmer vs. Programming in Mathematica #2
On 12/13/05 at 3:41 AM, hattons@globalsymmetry.com (Steven T. Hatton) wrote: >Has anybody read both of Roman Maeder's books _The Mathematica >Programmer_ and _Programming in Mathematica_? I specifically mean >the out of print first volume of the former. Yes. I have copies of each within arms length of my desk. >Dose _The Mathematica Programmer_ give a significantly different >perspective than what is presented in _Programming in Mathematica_? I am not sure there is much difference in perspective. But there is a difference in the information covered. Prog...

Mathematica Programmer vs. Programming in Mathematica
Has anybody read both of Roman Maeder's books _The Mathematica Programmer_ and _Programming in Mathematica_? I specifically mean the out of print first volume of the former. Dose _The Mathematica Programmer_ give a significantly different perspective than what is presented in _Programming in Mathematica_? It is, I believe, the best source for information about the design of his Classes` package. The only other source I am aware of is an unavailable (other than buying the hardcopy) back issue of The Mathematica Journal. And, if my understanding is correct, that is not as com...

Re: Reduce in Mathematica 5 vs Mathematica 8 (2nd problem)
olfa wrote: > Hi Mathematica Community, > > First,wish you happy and successfull new year. > > For this 2nd problem in the same subject,I have this system to solve: > > Reduce[Not[ > ForAll[{aaP, abP, iP, jP, sP, tP, uP, xP, yP, zP}, > Implies[t == tP && i + x == iP + xP && y == yP && > j t + z == jP tP + zP && t x + z == tP xP + zP && > Floor[Log[j]/Log[2]] == Floor[Log[jP]/Log[2]] && > Floor[Log[x]/Log[2]] == Floor[Log[xP]/Log[2]] && x >= xP, > t x == tP x...

Re: Re: Re: Mathematica language issues
I think most people this entire discussion does not have any practical importance. Obviously something like this: 2*Unevaluated[1+1] 2 Unevaluated[1+1] is extremly unlikely to have any practical use. After all, we use Unevaluated when we want something to remain unevaluated, whereas here only two things can happen: either one will be left with Unevaluated[something] or the "something" will evaluate. Both of these outcomes are obsiously undesirable. Why should one ever use anything like this in a program? In fact if for some unimaginable reason somone neede...

Re: Re: math glyphs from non-Mathematica font
On Fri, 22 May 2009 01:50:51 -0400 (EDT), skkaul wrote: > On May 10, 5:13 am, John Fultz <jfu...@wolfram.com> wrote: > >> <install= >> directory>/SystemFiles/FrontEnd/TextResources/UnicodeFontMapping.tr >> > Besides the comments, is there any documentation on this file? In > particular, what are type V and H entries, and what font is referenced > by -2? > > Thanks, > Shiva It's not documented because it's not intended for user consumption, although being able to edit it very rarely allows working around certain issues...

Re: Re: Re: Mathematica language issues #2
So far I could resist the temptation to participate in this discussion. However, in his mail Maxim Rytin presents some examples of which he thinks the result is unpredictable. Maybe there is some interest in how I predict the results of simple commands in which Unevaluated occurs. Of course these examples are of no practical interest. Unevaluated is meant to pass unevaluated arguments to a function body and as such it works perfectly. No one in practice is interested in (1+1)*Unevaluated[2+2]. The basic principle has been clearly explained by Andrzej Kozlowsky. Suppose we have a ...

Re: Re: Re: Any Mathematica 6 book yet?
I must agree about the debugger. I was very excited by the release of Workbench 1.0 because of the promise of a good debugger. I even took a course on it. The reality is that Workbench is so hard to use ( I can't bring in my old code and debug changes- it just doesn't work) that I never use it. So I'm back to using Print statements again. I love Mathematica but would love to have an easy to use debugger with break points, etc. Oh well. Cliff Nasser Abbasi <nma@12000.org> wrote: "Murray Eisenberg" wrote in message news:fdf236$20u$1@smc.vnet.net... &...

RE: RE: Re: Mandelbrot Set & Mathematica
Sorry again, but your previous message said >=, not <=. It's still posted on Google Groups, and I checked to make sure. DrBob www.eclecticdreams.net -----Original Message----- From: AGUIRRE ESTIBALEZ Julian [mailto:mtpagesj@lg.ehu.es] Subject: RE: Re: Mandelbrot Set & Mathematica On Tue, 11 May 2004, DrBob wrote: > Sorry, but that just doesn't work, even after changing =BE to >=. There are > only two colors (even using your rainbow function), and no fractal > "antennae". As noted in a previous message, it should be "<=...

Re: behavior from Mathematica 7 to Mathematica 8
On 11/19/10 at 5:10 AM, edskulsky@gmail.com (David Skulsky) wrote: >While testing Mathematica 8 on some heritage code, I found a problem >which a colleague traced to a behavioral change in Times[]. >Specifically, the documentation for Times[] states that "0 x >evaluates to 0, but 0.0 x is left unchanged." This appears to be >true in Mathematica 7 but not in Mathematica 8 (at least not under >Mac OS X 10.6.4). >I have informed Wolfram about this change (bug?). I can confirm getting 0. as the result of doing 0.0 x in version 8 but getting 0.x as the...

Re: Re: Bug in Mathematica ?
Version 5.0 gives different answers with NIntegrate and Integrate. However, if you load the package Calculus`Integration, then both give the same answer. In[1]:= $Version Out[1]= 5.0 for Microsoft Windows (November 18, 2003) In[2]:= Integrate[Max[x,y],{x,0,1},{y,0,1}] Out[2]= \!\(1\/3\) In[3]:= NIntegrate[Max[x,y],{x,0,1},{y,0,1}] Out[3]= 0.666667 In[4]:= In[5]:= <<Calculus`Integration` In[6]:= Integrate[Max[x,y],{x,0,1},{y,0,1}] Out[6]= \!\(2\/3\) In[7]:= NIntegrate[Max[x,y],{x,0,1},{y,0,1}] Out[7]= 0.666667 Reagards! Jos� Luis -----Mensaje ori...

Re: Re: Music to Mathematica
At 03:01 AM 3/30/2004, Matthias.Bode@oppenheim.de wrote: >Hello Steve, hello Marc, > >sorry, I wanted to be concise but was imprecise. > >1. I have music notes (a song) on paper (classical five line system). > >2. I identify (the key) the note(s) and pauses; e.g. "a" (= 440 Hz). (I can >calculate the frequency for each note.) > >3. How to input this information into Mathematica in order to make it *play* >the music? > >4. I do *not* want to write notes in classical notation on paper using >Mathematica. > >5. I used "...

Re: Re: mathematica to word
I would also point out that you can simply copy and paste from your notebook into Word. So you can write your text in Word and produce formulae, graphs, diagrams, figures etc in word. This is what I do. I don't know how editable they are from Word but I have never had a problem > -----Original Message----- > From: bghiggins@ucdavis.edu [mailto:bghiggins@ucdavis.edu] > Subject: Re: mathematica to word > > > Why not simply make a PDF of your notebook. In pdf form, all > gentlesouls at your university can read it using Adobe Reader or > equivalent. Of...

Re: Re: Some bugs in Mathematica
On 12 Aug 2005, at 06:08, Alex wrote: > Kozlowski's posting is wrong from a to z. First, the square root of a > complex number has two branches. One is "positive" and the other is > "negative". So, if we cancel square root in the numerator and > denominator, the worst error we can make is in the sign. There is no > way to justify the fact that Mathematica was unable to do the > simplification. > As for the first sentence above I think I should leave it to others to make the judgement whether it applies to my posting more than to ...

Re: Re: Some bugs in Mathematica
Looking at the sum in more detail: s1[n_] := Sum[x^k*(Gamma[n-k-1/2]*Gamma[k+1/2])/ (Gamma[n-k-1]*Gamma[k+1]),{k,0,n-1}]; Calculating each term separately TableForm[t=Table[(Gamma[n-k-1/2]*Gamma[k+1/2])/(Gamma[n-k-1] *Gamma[k+1]), {n,5},{k,0,n-1}], TableHeadings->{Automatic,Table[i,{i,0,4}]}] Summing each row of the table Tr/@t {0, Pi/2, Pi, (3*Pi)/2, 2*Pi} For example, for n=2, the term for k=0 is ((Gamma[n-k-1/2]*Gamma[k+1/2])/(Gamma[n-k-1]*Gamma[k+1])/. {n->2,k->0}) == Gamma[3/2]*Gamma[1/2]/(Gamma[1]*Gamma[1])== (1/2)*Gamma[...

Re: Re: Mathematica slows down
Dr. Bob, Presumably it has to do with whether intermediate results are effectively cached. Note that the order in which calls to Prime are made matters m=10000; r=Range[m]; rr=Reverse[r]; Timing[p=Prime[r];] {0.03 Second,Null} Timing[pr=Prime[rr];] {1.33 Second,Null} p == Reverse[pr] True Consequently, additional inefficiencies in the original algorithm are probably due to the sequencing of the calls to Prime. Here is the original algorithm (except Print) NumP=15000; Timing[For[k=1,k<NumP,k++, Gap[1]=Prime[k+1]-Prime[k]; Gap[2]=Prime[k+2]...

Re: Re: Types in Mathematica
I like this idea. Does the mathematical/algebraic "programming" style scale up to large problems? Are there examples? Or perhaps it doesn't strictly scale, but is better applied judiciously. It could be used to steer a code at a very high level, or conversely, used in the gaps (the Mathematica-in-the-gaps argument). Conventional programming would make up the difference. If indeed mathematical programming is not the silver-bullet paradigm, where should the conventional (though modern) programming be done? Within or without Mathematica? If within, then we've c...

RE: Re: How should I start with mathematica?
> I completely agree - can you remember who it was who wrote a > "Mathematica book generator" and posted it here - if you can, > I will add a link to it on my site, because that is all that > we seem to have for the foreseeable future! > > I think WRI's approach to documentation is a real mistake. > Newbies must find it almost impossible to get into the > software. Also, some of the new features of 6.0 - such as all > the new capabilities of Import and Export are almost buried > and unusable because of poor, vague, Microsoft-style document...

Re: Re: Mathematica and Education
What an excellent and encouraging response! Here we have: 1) A skilled teacher who has given much thought on how to use Mathematica in an educational setting and has gained a lot of experience. 2) An institution that has given her serious support. 3) All the students have access to Mathematica all of the time. 4) The students learn Mathematica early in their college career so they will have easy use of it in their more advanced courses. I hope people flock to the University of Vermont to see how it's done. I'm sure there are others also and I hope we hear from some of the...

RE: Re: Re: Suggestion: Visualization of complex functions with Mathematica
I'd like to add the ComplexAnalysis package at my web site below: This package contains complex analysis routines and complex graphics routines. There are routines that convert the regular 2D Graphics into equivalent complex forms. For example ComplexLine[{z1,z2,z3...}] takes complex numbers for the point coordinates. There are routines for producing one or two panel plots or animations of complex functions. Each panel may be one of the following plot types. 1) Cartesian/PolarSurface - Plots the surface s[f[z]] where f is a complex function and s is a real function. 2) Cartesian...

Re: Re: Re: Not Using a Text Editor Interface for Mathematica
For some interesting reading take a look at Chapter 2 in Edward R. Tufte's 'Visual Explanations'. Dr. John Snow found the cause of the 1854 Cholera Epidemic in London by FIRST plotting the case data on a map of London, and THEN doing the analysis. In the case of the Challenger Space Shuttle disaster, although they were aware of the potential problem, the technicians never made the proper graphic that related risk to temperature in past launches and thus failed to present a convincing case for not launching. Maybe graphics doesn't always come before analysis, but ...

Re: Re: Re: Do Mathematica applications EVER get updated?
atul wrote: > I'm not entirely sure what prompts your anxiety, as I have used several > packages over the years, including Time Series, Wavelet Explorer and > Mathematica Link for Excel. While some functions (from both Time > Series and > Mathematica Link) were incorporated into the kernel over time, updates to > ensure compatibility with new versions of Mathematica were timely and > unobtrusive. > This has not been the case for me and I subscribe to "Premier Service". I must always ask (usually more than once) for updates to the "Mec...

Re: Re: Re: mathematica 64-bit for ms windows
On Thu, 14 Feb 2008 01:00:12 -0500 (EST), J=E1nos wrote: > > > On Feb 13, 2008, at 4:04 AM, David Park wrote: > >> But be aware that if you are buying a new computer, from Dell at >> least, and >> you specify a 64 bit microprocessor, you will not necessarily get a >> 64 bit >> operating system, and may not even be able to install a 64-bit >> operating >> system. So if you are looking to use 64-bit Mathematica check out very >> carefully before purchase that you will indeed have a 64-bit operating >> system. >>...

Re: Re: EUREKA Re: Types in Mathematica, a practical example
Hi David, Comments are interlaced in the text below, > -----Original Message----- > From: David Bailey [mailto:dave@Remove_Thisdbailey.co.uk] > Subject: Re: EUREKA Re: Types in Mathematica, a > practical example > > Hello, > > If you want to compute with undefined array elements, why not > use subscript elements such as Subscript[a,1,2]. Hmmm, maybe... Let's see ax := {{Subscript[ax, 1, 1], Subscript[ax, 1, 2]}, {Subscript[ax, 2, 1], Subscript[ax, 2, 2]}} is not a good idea, since evaluation of ax gives an infinite loop. (There are o...

Web resources about - Re: Re: Mathematica Programmer vs. Programming in Mathematica - comp.soft-sys.math.mathematica

Philosophiæ Naturalis Principia Mathematica - Wikipedia, the free encyclopedia
The Principia states Newton's laws of motion , forming the foundation of classical mechanics , also Newton's law of universal gravitation , and ...

image processing - How do I find Waldo with Mathematica? - Stack Overflow
This was bugging me over the weekend: What is a good way to solve those Where's Waldo? [ 'Wally' outside of North America] puzzles, using Mathematica ...

Stephen Wolfram: The Background and Vision of Mathematica - YouTube
During the Wolfram Mathematica Virtual Conference 2011, Wolfram founder Stephen Wolfram shared the background and vision of Mathematica, including ...

Wolfram Mathematica coming to the iPad
It would appear that Wolfram, the company behind the Siri search engine is bringing its original product, Mathematica , to the iPad. In response ...

Premium Mathematica software free on budget Raspberry Pi
Wolfram Research is giving away its Mathematica software for use on the diminutive, $25 Raspberry Pi computers and debuting a brand-new programming ...

Stephen Wolfram: It was Steve Jobs who named 'Mathematica'
The creator of the answer engine in Siri writes about his long relationship with Jobs Wolfram. Photo: Creative Commons There are a several novel ...

700 New Functions In Wolfram Mathematica 10
Single biggest jump in new functionality in the software's history

New Wolfram Language Brings The Power Of Mathematica To Any Device
... is being expanded into a logic and knowledge engine that can operate locally or in the cloud. Wolfram Research's flagship program Mathematica ...

Mathematica and Wolfram On The Raspberry Pi
[Stephen Wolfram], possibly the only person on Earth who wants a second element named after him, is giving away Mathematica for the Raspberry ...

Wolfram Brings Mathematica Technical Computing to the Web
If you’re a fan of Wolfram’s Mathematica app, you’ll be pleased to hear its comprehensive tools for technical computing are now more accessible. ...

Resources last updated: 2/16/2016 12:51:19 PM