Date: Apr 11, 2013 4:10 AM Author: David Park Subject: Re: Sample Workbooks - Suggested sources to get a newbie going? A subject that greatly interests me. Many Mathematica users are simply

interested in using Mathematica as a kind of super graphical calculator to

obtain some numbers and a plot, or perhaps a dynamic Manipulate output;

others see it as a programming language in which they write extended code

for some problems and perhaps again obtain some numbers and plots.

I see Mathematica more as a platform for creating a longer term knowledge

base and capability in some technical area. Doing it correctly produces

material that will have long term value for yourself and might well be very

useful to other people. If you spend a lot of time at it, it's the fruit of

your labor. Getting off on the right foot will help you to more quickly

produce useful material.

I'm not going to go into great detail in everything because this will be

long enough as it is.

Suppose you have a major field of interest, say BeamEngineering. There is a

single good place to put your work. Evaluate $UseBaseDirectory (or possibly

$BaseDirectory) in Mathematica. This will give you the location of your

private Mathematica folders. There you will find a folder called

Applications. In the Applications folder create a BeamEngineering folder.

This is THE place to put all your work on that subject. You can have a

folder structure inside of BeamEngineering. You might have folders for

developmental notebooks and folders for relatively finished notebooks. You

might include files other than Mathematica notebooks. As you accumulate

useful routines that you may have developed along the way, you can add

package files to the BeamEngineering folder (i.e., Application). At some

point you might develop style sheets and palettes that go with your

Application. You simply add a FrontEnd/StyleSheets and Palettes folders and

put them there. You might add a Kernel/init.m file to contain

initialization statements when the Application is loaded. Even later you

might use Workbench to add Mathematica style Documentation to the

Application.

The reason this is a good place for your work is: 1) It is all together and

not scattered all over your computer; 2) It is outside the WRI folders and

not lost or hidden when you update Mathematica; 3) Mathematica automatically

looks at that location for packages, documentation, style sheets and

palettes. It just works smoothly. If you want to transmit your Application

to someone else you can zip it (and maybe delete certain folders) and they

just unzip into their private Mathematica/Applications folder and it will

work right off. (It is shocking that many users fall into convoluted and

difficult to use schemes when they don't follow this standard form.)

My paradigm for a Mathematica notebook is a piece of paper on which I'm

trying to write a literate technical document. I use a Title and Sectional

groupings. I use Text cells to explain the material, just as one would in a

technical paper. I generally have a Routines section (Package Purgatory)

near the top where I place routines that have been developed but not yet

placed in a package. I have a style sheet that looks more like a paper.

(Section heads and Output cells are unadorned. Text font size and Output

font size are the same. The range of font sizes is less than WRI uses. There

are openers on the various section headings but not Input/Output groupings.)

If I find a need for a new routine I will develop it in a main Section of

the notebook, often with a number of tries, and then transfer it to the

Routines section where I will make it an initialization cell. I will always

write a usage message for the routine, SyntaxInformation, and Attributes and

Options definitions when appropriate. The routine will be ready to transfer

to a package after a bit of testing and usage.

As for learning Mathematica, I wouldn't buy too many books. They tend to be

out of date and cannot illustrate dynamics very well. Also, with books, one

just tends to copy other peoples` special interest code. WRI supplies plenty

of documentation and tutorials that you can work with. Study them,

especially the functional programming commands. Then take SIMPLE

non-Mathematica books or material in your field and try to "fly solo" with

Mathematica. This is much better learning.

David Park

djmpark@comcast.net

http://home.comcast.net/~djmpark/index.html

From: d_j_fennell@yahoo.com [mailto:d_j_fennell@yahoo.com]

Hello,

I'm a brand new Mathematica user. I'm trying to get up to speed in

Mathematica to set up workbooks for engineering problems. I've been using

pad and paper to calculate beam stresses and deflections and to solve a

variety of other engineering calcs for many years. Time to update my

methods.

Anyhow, I'm impressed with Mathematica's documentation. That said, I wish I

could locate some fully worked out sample problems/workbooks. Mathematica

has a huge library of awesome demostration projects, but it appears that the

meat and potoes code of these demonstrations is not provided. It seems as

if the only code available to view is in the "Maniupulate" section of the

demonstration workbooks. I haven't downloaded a demonstration workbook yet

that shows any code in the "Initialization" section. The code that I can

see tends to be specific to the cool user front-end. Right now, I'm trying

to pick up best practices for more mundane coding process. I suspect the

code that I really want to be looking at right now is usually located in the

Initialization area of the demos, which seem to be mostly blank. Am I

looking in the wrong place? Is all the the code in every demo available to

be seen or is much of the underlying "meat and potaties" work of the demo

files typically remove d/hidden by the authors or Wolfram?

I'd like to better understand how power users document their work, choose

symbol names, format their workbooks, and choose amongst the various ways of

getting things done. Looking at power users' VBA code for excel proved

extremely helpful when I was trying to pick up some wherewithall in that

area. I suspect that my ability to use Mathematica effectively will be

greatly enhanced by following a similar process reviewing Mathematica code.

(I have ordered some texts, but still waiting on delivery.)

In the meantime, if anybody could point me towards a source of sample

workbooks with all code available for view - I would much appreciate the

help. Workbooks related to mechanical engineering problems would be awesome

- but any mathematical problem solved with Mathematica would prove helpful

to meat this point.

Thanks!