16 questions linked to/from Understanding Villegas-Gayley
130k views

### Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
6k views

### What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools)

Note: I put Simon's implementation on GitHub. Contributions welcome! When trying to read the definition of already defined (package or built-in) symbols using ...
1k views

### Placement of Condition /; expressions

It is my practice to place Condition expressions on the left side of := and :> in almost ...
2k views

### How to perform a depth-first preorder traversal of an expression?

Mathematica provides functions that perform a depth-first postorder traversal, or which use such a traversal, including: Scan, ...
616 views

### Prevent graphics from rendering inside a held expression

Assuming each odd line is input I would like the even lines to be the output of the following lines. In the above the Graphics are inside ...
496 views

### Mathematica unable to solve easy differential equation $y''+y\,y'=0$ with initial conditions $y(0)=1, y'(0)=-1$

Trying to solve the following: DSolve[{y''[x] + y[x] y'[x] == 0, y == 1, y' == -1}, y[x], x] leads Mathematica to declare that no analytic solution exists <...
271 views

### How to find out what files are touched when Get is called?

Is there a way to capture all package files touched whenever a package is called via Get, Needs, ...
331 views

### Why do subsequent evaluations seem to be stopped by a False Condition (/;)?

Exploring another problem and this example of @halirutan, I came across an evaluation behavior I don't understand. When g[] below is evaluated the first time, <...
169 views

### How to prevent Mathematica from complete evaluation of special functions?

Recently I tried to check a result of integration which should be a linear combination of the Riemann $\zeta\;$-function at various arguments, the coefficients of the combination being of primary ...
177 views

### Unexpected behavior when directly assigning to DownValues

I'm encountering some unexpected behavior when assigning to DownValues. When I assign two definitions for test as below, ...
163 views

### Why does Block reset Attributes?

Not even "formal symbols" such as \[FormalX] are guaranteed to always be symbolic. Their Protected argument is forgotten when ...
210 views

### Capturing an F1

I teach an Intro to Mathematica course, and one of the things I try to reinforce early on is just how helpful Mathematica's help is. In the very first lab for the course, I even give the students a ...
77 views

### How to make a contextual variable?

I have a question that would be trivial in OOP, but I am a newbie to programming in Mathematica, so I'm wondering how to deal with it. Basically, I want to create a package which basically involves a ...