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 encountered yet. Where (books, websites, etc.) do I look for examples of good (best?) practices of Mathematica programming?
19 Answers
Here's a collection of resources that I started on Mathgroup (a collection of Mathematica learning resources) and updated here at Stack Overflow. As this site is dedicated to Mathematica it makes more sense to maintain it here. This represents a huge amount of information; of course it's not exhaustive so feel free to improve it! Also, don't hesitate to share it and suggest other interesting links! Remember, you can always search the online Documentation Center of Mathematica, that is identical to the built-in help of the latest software version.
Links to more advanced aspects of the program that you can start to appreciate once you understand the basics are provided in separate answers (below) as this post became too large.
Introduction
- If you're just beginning try to have a look at these videos.
Mathematica Basics, Elementary Programming in Mathematica
Hands-on Start to Mathematica
Several introductory videos by Jon McLoone
and many other video introductions and tutorials from the official Wolfram website - An elementary introduction to the Wolfram language
Fast introduction for programmers - Is it necessary to have a prior computational background or is it possible to learn Mathematica as a first programming language?
- What are the most common pitfalls awaiting new users?
- How To-s: full solutions for particular tasks from the online documentation
- Easy-to-understand animations explaining common Mathematica functions
- Sal Mangano's videos for using pure functions,
Part
and patterns - Introductory videos of various applications of Mathematica
- What is the best Mathematica tutorial for young people?
Basic advices for people new to Mathematica
Functional style
Avoid iterative programming using loops like For
or Do
, use instead functional programming functions Map
, Scan
, MapThread
, Fold
, FoldList
, ... and pure functions. This makes the code cleaner and faster.
- Functional Programming, Functional Programming: Quick Start
- Pure functions
What does # mean in Mathematica? - Alternatives to procedural loops and iterating over lists in Mathematica
- An example: Programming a numerical method in the functional style
- How to understand the usage of Inner and Outer figuratively?
Transpose and dimensions
Something not easy to guess alone at the beginning: if you have
x={1,2}
andy={3,4}
, doingTranspose[{x,y}]
or{x,y}
ESC tr ESC in the front end will produce{{1,3},{2,4}}
(format compatible withListPlot
). This animation helps understand why.You can also use the second argument of
Transpose
to reorder the indices of a multidimensional list.Don't forget to regularly control the output of the lists you generate using
Dimensions
.
Get familiar with shorthand syntax (@
, &
, ##
, /@
, /.
, etc.)
Programming easily
Getting help: Execute
?Map
for example for a short description of a function, or press F1 on a function name for more details and examples about it. You can solve many problems by adapting examples to your needs.Auto-completion: Start typing the name of a function and (in Mathematica 9+) select from the pop-up auto-completion menu, or press Ctrl+k to get a list of functions which names start with what has already been entered. Once the name of the function is written completely press Ctrl+Shift+k (on Mac, Cmd+k) to get a list of its arguments.
Function templates: In Mathematica 9, after typing a function name, press Ctrl+Shift+k (on Mac, Cmd+Shift+k) and click on the desired form from the pop-up menu to insert a template with named placeholders for the arguments.
Other useful shortcuts are described in the post Using the Mathematica front-end efficiently for editing notebooks.
Use palettes in the Palettes menu especially when you're beginning.
In Mathematica 8, use the natural input capability of Wolfram Alpha, for example type "= graph 2 x + 1 between 0 and 3" without the quotes and see the command associated with the result.
Tutorials
- An elementary introduction to the Wolfram language, by Stephen Wolfram
Fast introduction for programmers - Fundamentals of Mathematica Programming (by Richard Gaylord, great tutorial for an overview of the logic behind Mathematica: patterns)
Video tutorial also available - Introduction to Mathematica (by Thomas Hahn, another succinct overview of Mathematica)
- Tutorial Collection by WRI (lots of extra documentation and examples, available as free PDFs, also available and up-to-date in Help > Virtual Book in Mathematica).
- Programming Paradigms via Mathematica (A First Course)
- Mathematica Tutorial: A New Resource for Developers
- Wolfram's Mathematica 101
- http://bmia.bmt.tue.nl/Software/Downloads/Campus/TrainingMathematicaEnglish.zip
http://bmia.bmt.tue.nl/Software/Mathematica/Tutorials/index.html - A problem centered approach
- A beginner's guide to Mathematica
- http://math.sduhsd.net/MathematiClub/tutorials.htm
- http://www.austincc.edu/mmcguff/mathematica/
- http://www.mtholyoke.edu/courses/hnichols/phys303/
- http://www.apam.columbia.edu/courses/ap1601y/ (Introduction to Computational Mathematics and Physics)
- http://ftp.physics.uwa.edu.au/pub/MATH2200/2012/Lectures/ (Applied Mathematics)
http://ftp.physics.uwa.edu.au/pub/MATH2200/2009/Lectures (path for some lectures in pdf) - http://en.wikibooks.org/wiki/Mathematica
- http://www.cs.purdue.edu/homes/ayg/CS590C/www/mathematica/math.html (Basic tutorial)
- https://stackoverflow.com/questions/4430998/mathematica-what-is-symbolic-programming (What is symbolic programming)
- http://www.cer.ethz.ch/resec/people/tsteger/Econ_Model_Math_1.pdf
- http://www.physics.umd.edu/enp/jjkelly (An introduction to Mathematica as well as some physics courses)
- Do you know of any web-based university course that is entirely Mathematica based?
- http://homepage.cem.itesm.mx/jose.luis.gomez/data/mathematica (Tutorials in Spanish)
- Mathematica programming (some examples of the various programming paradigms that can be used in Mathematica)
FAQ
- http://12000.org/my_notes/faq/mma_notes/MMA.htm (FAQ)
- https://stackoverflow.com/questions/tagged/mathematica?sort=faq&pagesize=15 (FAQ on Stack Overflow)
- https://mathematica.stackexchange.com/questions?sort=faq (FAQ on this site)
- http://library.wolfram.com/conferences/conference98/Lichtblau/SymbolicFAQ.nb (Symbolic FAQ)
Books
- Stephen Wolfram's The Mathematica Book (online, version 5.2), available for free
- Mathematica programming: an advanced introduction (online) by Leonid Shifrin, available for free
- Tutorial Collection by WRI (lots of extra documentation and examples, available as free pdfs, also available and up-to-date in
Help > Virtual Book
in Mathematica). - Mathematica Cookbook by Sal Mangano (O'Reilly, 2010)
- Mathematica in Action by Stan Wagon (Springer, 2010)
- Mathematica: A Problem-Centered Approach by Roozbeh Hazrat (Springer, 2010)
- Mathematica Navigator by Heikki Ruskeepaa (Academic Press, 2009)
- The Mathematica GuideBooks (for Programming, Numerics, Graphics, Symbolics) by Michael Trott (Springer, 2004-2005)
- An introduction to programming with Mathematica by Paul R. Wellin, Richard J. Gaylord and Samuel N. Kamin (Cambridge University Press, 2005); contains an example of Domain Specific Language (DSL) creation.
- Mastering Mathematica by John W. Gray (Academic Press, 1997)
- Programming in Mathematica by Roman Maeder (Addison-Wesley Professional, 1997)
- Programming with Mathematica®: An Introduction by Paul Wellin (Cambridge University Press, 2013)
- Power Programming With Mathematica: The Kernel, by David B. Wagner (Mcgraw-Hill, 1997), out of print but scanned copy available here.
- http://blog.wolfram.com/2014/01/10/read-up-on-mathematica-in-many-subjects
Wolfram Websites
Learn
- http://www.wolfram.com/broadcast/
- http://www.wolfram.com/training/courses (Online video courses, most are free)
http://www.wolfram.com/training/special-event/ (Links to videos of past conferences) - Slides of seminars
- http://www.youtube.com/user/WolframResearch
- An elementary introduction to the Wolfram language
Fast introduction for programmers
Data drop quick reference
Examples
- http://demonstrations.wolfram.com
- How To-s
- http://www.wolfram.com/mathematica/new-in-8
http://www.wolfram.com/mathematica/new-in-9
http://www.wolfram.com/mathematica/new-in-10/
http://www.wolfram.com/mathematica/new-in-11/
http://www.wolfram.com/training/special-event/new-in-mathematica-10/ - A plot gallery for Mathematica 9
- http://www.wolfram.com/language/
Resources
- http://www.wolfram.com/mathematica/resources
- http://library.wolfram.com/ (Great amount of resources here)
- http://support.wolfram.com/kb/topic/mathematica (Knowledge base)
- http://www.mathematica-journal.com
- Help
Help > Virtual Book - http://www.wolfram.com/support/learn/
- http://www.wolfram.com/books/
- http://reference.wolfram.com
Blogs
- http://community.wolfram.com
- http://blog.wolfram.com
- http://blog.wolframalpha.com
- http://blog.stephenwolfram.com
- http://twitter.com/#!/mathematicatip
Other related sites
- http://www.mathematica25.com
SMP
http://blog.stephenwolfram.com/2013/06/there-was-a-time-before-mathematica http://blog.stephenwolfram.com/data/uploads/2013/06/SMPHandbook.pdf - http://www.wolframalpha.com
- Wolfram Science: the official site of Stephen Wolfram's New Kind of Science
NKS forum
Lecture notes from NKS summer schools
Programs from the notes
Demonstrations - http://computerbasedmath.org/
- http://education.wolfram.com (Some interactive basic math courses, useful for curious young people)
- http://www.wolfram.com/webresources.html (other Mathematica related sites)
Virtual conferences
- http://www.wolfram.com/events/virtual-conference/spring-2013
- http://www.wolfram.com/events/virtual-conference/2012
- http://www.wolfram.com/events/virtual-conference/2011
Mathematica one-liner competition
- http://www.wolfram.com/events/techconf2010/competition.html
- http://www.wolfram.com/events/technology-conference/2011/one-liners.html
- http://www.wolfram.com/training/special-event/mathematica-experts-live-one-liner-competition-2012
Wolfram technology conferences
- http://www.wolfram.com/events/technology-conference/2016
- 2015, http://www.wolfram.com/events/technology-conference/2015
- 2014, http://www.wolfram.com/events/technology-conference/2014
- 2013, http://www.wolfram.com/events/technology-conference/2013
- 2012, http://www.wolfram.com/events/technology-conference/2012
- 2011, http://www.wolfram.com/events/technology-conference/2011
2009, 2007, 2006, 2005, 2004, 2003, 2001, 1999, 1998, 1997, 1994, 1992
-
69$\begingroup$ Apparently, this is the most edited post by a single person across all of the SE network. You've really done a remarkable job at maintaining it! $\endgroup$– rm -rf ♦Jul 17, 2012 at 19:36
-
13$\begingroup$ Thanks, maintaining this list is a good way also to keep track of interesting posts on this site that summarize well some aspects of Mathematica. $\endgroup$– faysouJul 18, 2012 at 11:50
-
$\begingroup$ Is there a way to download the videos from wolfram.com/broadcast? $\endgroup$– a06eOct 18, 2012 at 14:37
-
1$\begingroup$ @becko it's not too hard - like downloading YouTube videos, there are various ways. On Mac Safari, I set the user-agent to iPad before going to the page, then Download Linked File: this gets the mp4 download link. (No Flash for me!) $\endgroup$ Nov 7, 2012 at 15:22
-
$\begingroup$ @cormullion Got any tricks that work on Windows? I usually download videos from Youtube using a little program called Free Youtube Download. But that doesn't work on wolfram.com/broadcast (except for a few videos at wolfram.com/broadcast that are actually hosted on Youtube). $\endgroup$– a06eNov 7, 2012 at 18:15
My original post above became too big so I'm splitting it into two posts. The tips and tricks section that I used to keep track of interesting new posts mostly on this site was big so here it is.
Note the tags at the end of each question on this site in order to read related questions.
I'm further dividing this post. See my third answer on Advanced evaluation, patterns, and neat algorithms below.
Tips and tricks
Top posts
- What are the most common pitfalls awaiting new users?
Programming paradigm change - Can one identify the design patterns of Mathematica?
Mathematica style guide? - General strategies to write big code in Mathematica?
Granular versus terse coding - What is in your Mathematica Toolbag
General tricks
- A New Mathematica Programming Style: Functional-Procedural Fusion
- http://www.verbeia.com/mathematica/tips/Tricks.html (Ted Ersek's tricks)
http://library.wolfram.com/infocenter/MathSource/4557/ (Ted Ersek's tricks as notebooks) - http://szhorvat.net/pelican/pages/mathematica.html (Szabolcs' tricks)
- http://www.verbeia.com/mathematica/tips/tips.html (Verbeia's tricks)
- http://www.nhn.ou.edu/~morrison/Mathematica/ (Tip sheets)
- As pointed out by Mr. Wizard, have a look at the available packages in your install directory for getting new ideas!
- Tricks of the trade in the Mathematica Journal
- How do I designate arguments in a nested map?
- Levels: how do they work?
Why Mathematica chooses bracket for function arguments over parenthesis?
Why do Mathematica list indices start at 1? - Elegant operations on matrix rows and columns
http://reference.wolfram.com/mathematica/tutorial/LinearAlgebraMatrixAndTensorOperations.html
Tips for writing faster code
- Performance tuning in Mathematica?
- http://blog.wolfram.com/2011/12/07/10-tips-for-writing-fast-mathematica-code
- Programming for speed
- Benchmarking expressions (timeAvg function)
Measuring time complexity of a method
Profiling from Mathematica - http://www.dbaileyconsultancy.co.uk/m_performance/m_performance.html
- http://library.wolfram.com/infocenter/Conferences/7005/ (Principles of efficient MM programs, tips for writing fast code)
- http://library.wolfram.com/infocenter/Conferences/320/ (Generally Efficient Numerics Programming in Mathematica)
- Writing Efficient Mathematica Code
- Dispatch tables
Using Mathematica's Dispatch
Efficiently extracting an array subset given a separate array
How to speed up calculations with large number of replacement rules? (Experimental`OptimizeExpression) - Alternatives to procedural loops and iterating over lists in Mathematica
Are there any cases when For[] loops are reasonable?
Alternatives to While Loops?
Is Table the only functional way to construct nested loops in Mathematica?
How to transform Do loop to more efficient codes?
Replace For-loop with functional code
Equivalent Nested Loop Structure
"do ... while" loop equivalent in Mathematica Use Internal`Bag as a linked list (see links in Data Structures paragraph below)
Reap and Sow
- Collecting Expressions during Evaluation
Reap and Sow can be used with StepMonitor - SelectEquivalents (my personal favorite Mathematica function, basically it allows to define classes of equivalence and apply a function on the elements of each class, using Reap and Sow)
How would you do a PivotTable in Mathematica? - Reap and Sow can also be used for debugging, see for example how it's used in ShowIt
- How to collect result continuously (interruptible calculation) when running parallel calculations?
Compile
- How to compile effectively?
How well does Mathematica code exported to C compare to code directly written for C? (Note the function Experimental`OptimizeExpression)
Has this implementation of FDM touched the speed limit of Mathematica? - Note the instruction (<< CompiledFunctionTools`; StringFreeQ[CompilePrint[cf], "MainEvaluate"]) to quickly verify that a compiled function doesn't need calls to external functions, available as from v8.
- http://reference.wolfram.com/mathematica/Compile/tutorial/Overview.html
- http://library.wolfram.com/infocenter/Conferences/7968/ (Effective Use of the Mathematica Compiler and Code Generation)
What kinds of uses of SymbolicC (introduced in Mathematica 8) do you foresee? Are there any neat examples already? - List of compilable functions
Why is there a huge performance gap using Map with more than 100 List entries - Shaving the last 50 ms off NMinimize (Advanced tricks for a very fast Nelder-Mead optimizer)
Minimization by Nelder-Mead
Using Apply inside Compile
Removing calls to MainEvalute when using inlined compiled closures - JIT compilation
Implementing a function which generalizes the merging step in merge sort
A fast, robust DropWhile - Retaining and reusing a one-to-one mapping from a sort
- Is it possible to use Compile on a function with optional arguments?
- Compiling more functions
How can I compile this function
Compiling more functions that don't call MainEvaluate
How to define a complicated function inside the body of Compile? - Does Mathematica have a "MATLAB Builder" equivalent?
http://reference.wolfram.com/mathematica/CCodeGenerator/tutorial/CodeGeneration.html
http://reference.wolfram.com/mathematica/CCodeGenerator/ref/LibraryGenerate.html - Third argument of Compile
- CompiledFunctionCall vs. LibraryFunction
- Compiling LinearSolve[] or creating a compilable procedural version of it
Using links to other languages
- System interfaces and deployment
- Faster alternatives for DayOfWeek (Java)
Working with Java hashmaps from Mathematica - WSTP
Convert C program using mathlink to WSTP
Handling error in WSTP program C/C++
A MathLink tutorial
Mathlink Mode article - LTemplate
How to simplify writing LibraryLink code?
Drawing Clifford Attractors in Mathematica - Minimal effort method for integrating C++ functions into Mathematica
Converting other C++ classes to MTensor in LibraryLink
How can I use shared libraries in LibraryLink code and ensure Mathematica will find them?
How to understand shared passing of a MTensor in LibraryLink?
Using Boost with CreateLibrary
Write C/C++ programs calling Mathematica functions
Example program for calling Mathematica from C
Returning multiple results from a LibraryLink function
Calling Mathematica from Visual Studio - example
Which Distributions can be Compiled using RandomVariate
Librarylink made easier to use with C++11
Calling Mathematica from Visual Studio - example - How to use C language functions in Mathematica?
- Mathematica Functions from VBA
- Linking FORTRAN with Librarylink
- MATLink, link between Mathematica and Matlab
Is it possible to export the equations from Mathematica to MATLAB? - Calling IronPython code from Mathematica
- JLink
JLink classes' reference - ExternalEvaluate for Python fails with Import::nopythonevals
Packed arrays
- http://library.wolfram.com/infocenter/TechNotes/391/ (Packed Arrays)
- What is a Mathematica packed array? (instruction for being warned when a packed array is unpacked)
Mathematica memory management for large arrays - Avoid mixing integers with real numbers in a list, which would unpack the list and slow computations. For example use 1. instead of 1 if you have to enter manually an entry in a list of reals.
- Isn't it possible to Pack a SparseArray?
Debugging
- A debug utility to print or extract intermediate data from a program (ShowIt, a useful variant of Print)
- The clearest way to represent Mathematica's evaluation sequence
How do I evaluate only one step of an expression?
Is it possible to construct a fullform trace function - Debugging memory leaks
Profiling memory usage in Mathematica
Preventing Mathematica from eating up all your memory (not a bug but the info can be useful)
How to un-eat memory? - Using the Mathematica debugger, and other interesting possibilities
Debugging Mathematica Code - DebugTrace
- What are the best practices / most common / idiomatic ways to report errors in Mathematica?
How to program a F::argx message?
How to abort on any message generated?
Best practices in error reporting
How to leave function unevaluated programmatically?
Setting up diagnostic error messages in large Mathematica projects, Debugging a $RecursionLimit error?
Dealing with errors and resuming the code after one
Interrupting package evaluation, handling error
Prepend Information to Warning Messages
Need help with exception handling
Error checking and trapping techniques with Throw and Catch
Exception/Error handling using returns codes
How do I get Mathematica to return a function call unevaluated?
Resource management in Mathematica - Wolfram Workbench has an integrated debugger and profiler. See here for posts about it on this site: https://mathematica.stackexchange.com/questions/tagged/workbench
Inspecting non-variable state from a breakpoint in Workbench
workbench: how to see values of global variables during debugging - Mathematica Debuggability
- Automatically generating a dependency graph of an arbitrary Mathematica function?
Is there an analogue of the Variables command for general expressions? - Using Java log4j in Mathematica
Data Structures
- Data structures and efficient algorithms, from Daniel Lichtblau
Kd-list, Kd-tree (applied to Gröbner bases) - Expr Bag
Internal`Bag inside Compile
Efficiently collecting results inside a compiled function
Most efficient way of splitting a file into length-prefixed blocks - Linked lists
Mathematica “linked lists” and performance
Merge-sort
Variant of the cutting-stock problem in Mathematica
The answer of Leonid is a reference on the topic: Can one identify the design patterns of Mathematica?
Searching linked lists that contain lists? - Efficient circular buffer?
- Efficient priority queues?
- BTree
Using Memoization with a Mutable Object
How to speed up Minimum Spanning Tree algorithm?
How to make Huffman coding by using tree representation
What is the fastest way to maintain a large set of expressions?
Generating an ordered list of pairs of elements from ordered lists
Objects
- How to create strong types?
How to implement FittedModel like objects
How can one define a custom data object? - Struct equivalent in Mathematica?
Implementing a dictionary data structure
Is there HashTable structure in Wolfram Mathematica?
Is there a method to enumerate the keys/values of System`Utilities`HashTable
A usage example in the answer of Oleksandr R. or in the answer to the post
How can you give a Module a context and have its local variables and Modules belong to that context?
What's fastest way of defining 10^5 down values?
Return a Part by Reference? (For accessing hierarchical / structured data) - Once more on object orientation in Mathematica: does it have to be so hard?
Builder pattern for complex objects construction
How can I implement object oriented programming in Mathematica? - MTools, an open-source package for OOP from the author of this answer
- OOP applied to manipulate
- Question about designing a particular data structure
- Code Readability and Object-Oriented Code
- Polymorphism and the pattern-matcher
- Inheritance in Mathematica using pattern matching on UpValues
- How to implement the Observer design pattern?
- http://www.objectica.net/Documentation6/guide/ReferenceGuide.html (non free, but still can give some inspiration)
Traversal of an expression
- How to perform a depth-first preorder traversal of an expression?
- How to perform a breadth-first traversal of an expression?
- Determining all possible traversals of a tree
- Uses for MapAll (//@)
myHold examples with MapAll (1,2) - Can a Trie be implemented efficiently?
- Concatenate strings from different levels of list
Graphs
Optional Values
- Functions with Options
- What are the benefits of switching from Rule and /. to OptionsPattern[] and OptionValue in a large application?
- How to avoid collision between optional arguments and options
- Can a function be made to accept a variable amount of inputs?
- Dealing with nested options
- Evaluation of OptionValue[]
- Custom functions by delegating options in a specific way and using core functions (withOptionConfiguration)
- Specifying optional arguments with variables
- Is there any way to define pure functions with optional arguments?
Is it possible to separately call the default value of a variable which isn't at the end of the sequence? - Why doesn't Mathematica use uniform criteria for validating Options?
How to check the validity of an option value - How to inherit options by scoping?
- How to make a function with its own options as well as passing options to other functions
- Using a held option
- Writing functions with "Method" options (Interesting answer on parsing a grammar of options)
Accessing data in different ways
- Cases[data,Colon[key,_]] vs. Cases[data,key:_] toward XPath, XQuery
- Emulating R data frame getters with UpValues
Creating a R DataFrame like construct in Mathematica
How to achieve Set+Part like behaviour in custom Set function? - The gap between MapAt and ReplacePart for 2D data tables with headers
- Data Table Manipulation in Mathematica
Data Table Manipulation in Mathematica: Step 2
How can a big table be treated as a database? - Path queries for tree-structured data
- Splitting up delimited data in lists
Partitioning with varying partition size (dynamicPartition)
Splitting a list by specifying section headers - Accessing list elements by name
Association/Dataset
- How to make use of Associations?
Normal // Association // Dataset workaround for some user query operators
Can't get Append to append a record (association) to a dataset
How can I save a Manipulate's control settings to a dataset?
V10's Operator Forms - what are they good for?
What is the natural way of using Dataset to get a FittedModel?
Dataset: get number of levels and elements
Is there a comprehensive list of functions with operator forms?
Converting structured data to a dataset
How can I add a column into a existing Dataset?
GroupBy several keys while keeping the Dataset as a Table (List of Associations)
Learning Resources for Data Science in the Wolfram Language (many usage examples of List/Association/Dataset)
SQL-like computation on Dataset: Aggregate function
Is there a faster way to Map an Association?
Difference between Association and Dispatch
Changing Values in an Association using Map (Answer on Immutability)
Filtering Query Nested Data (Dataset and Association)
Is there an idiomatic way to determine whether an `Association` is a subset of another?
Visualizing Type System Operations
Struggling to understand Query
Reshaping associations, generalization of GroupBy
Rules and replacement (the backbone of Mathematica, more advanced)
- Where definitions are stored
- What is the distinction between DownValues, UpValues, SubValues, and OwnValues?
Getting ideas from Lisp
- Structure and interpretation of computer programs, Common Lisp The Language, On Lisp, Practical Common Lisp ...
- repl.it has an online interpreter for Scheme with some examples.
- Is there a Mathematica/Lisp link?
- Other functional languages : Scala, Haskell, Erlang, Clojure, Caml, F#, Maude ...
- FAQ on functional programming
Memoization/Caching
- The answer of Leonid is a reference on the topic: Can one identify the design patterns of Mathematica?
- What does the construct f[x_] := f[x] = ... mean?
- Avoid repeated calls to Interpolation (Interesting answers and links about caching values and expressions)
- Function that caches when it returns unevaluated
- Why is there no PositionFunction in Mathematica?
- Built-in Mathematica data: are they cached? how to speed up the loading?
- Memoization with pure functions?
Undocumented features
- What are some useful, undocumented Mathematica functions?
Documentation of the frequently-used functions in the context of Internal` and Compile`
Items known by CurrentValue - How can one find undocumented options or option values in Mathematica?
- What is the complete list of valid Front End Tokens?
- How do you convert a string containing a number in C scientific notation to a Mathematica number?
- What is the complete list of valid FrontEnd Packet types?
- How can I get the unchanged Box form of an arbitrary expression?
- How can I manipulate TemporalData?
- How to work with Experimental`NumericalFunction?
- Full documentation for AppearanceElements
- How to create internally optimized expression for computing with high WorkingPrecision?
- What are all the named Mathematica styles?
- How to create expanding summary boxes like the ones displayed for InterpolatingFunction, NearestFunction, etc.?
- Incompatible Changes since Mathematica Version 7?
- Monte Carlo integration with random numbers generated from a Gaussian distribution
IDEs and packages
- How to install the Wolfram Workbench plugin into Eclipse Kepler or Neon?
Wolfram Workbench
Managing formatted usage messages in Wolfram Workbench
Creating cross-version compatible documentation with Workbench
Renaming projects in Wolfram Workbench
Recommended settings for git when using with Mathematica projects?
How to setup Team Development for a Mathematica project? - Open-source IntelliJ IDEA plugin to support Mathematica development
- How to distribute Mathematica packages as paclets?
How to properly handle mutual imports of multiple packages? What's the difference between these two ways of specifying dependent packages?
Second argument of BeginPackage with nested package loading
Creating Mathematica packages
What are recommended guidelines for developing packages?
How to unload automatically loaded packages?
How can I dynamically get a file whenever it is saved in Workbench?
How to work with Application Project files in Wolfram Workbench?
What is a "Paclet"?
Mathematica functions and environment
- How to specify Mathematica as a programming language?
http://www.wolfram.com/mathematica/quick-revision-history.html
Where can I access documentation for old versions of Mathematica?
http://12000.org/my_notes/compare_mathematica/index.htm
How to get complete Documentation Center graph of guide pages?
Automated testing for compatibility with older Mathematica versions
Integrating notebooks to Mathematica's documentation center (Using Wolfram Workbench is easier for building a help but the answer is still interesting)
List of dangerous functions
What are all the named Mathematica styles? - How does Plot work?
How to implement the sample-point process like the built-ins of Mathematica?
How to examine the structure of Graphics objects
Symbolic derivatives are being calculated numerically
Embed Code Into Image - How does Mathematica calculate integrals?
- Is it possible to define a new PlotTheme?
How to get grid lines at all (log) tick marks in Version 10? - How can I set up a versioning system within a notebook?
Is there a notebook autosave frequency configuration?
Are there suitable versioning systems for Mathematica notebooks? - How to find a specific error message?
- The Joy of Tagging: Manipulating and Mining Notebooks in Mathematica
How to programmatically mark and then select a subset of input cells? - Programmatic formatting for Mathematica code - possible?
Syntax highlighting for your own functions
Customizing syntax highlighting for private cell styles
Special Mathematica Cell to work with R code - Is it possible to improve Mathematica's auto-completion feature?
- Creating a notebook that has cells of a certain style password protected
Advanced typesetting
Resources for beautiful Mathematica Stylesheets
Some tutorials on formatting notebook for exporting to pdf
What options and settings can be used to create print quality typeset documents with Mathematica? - Adding a label to an expression result
How to fold output cells by default? - Automatic e-mail/text message when a calculation has finished?
Keep MathKernel Running In Background - Speed Up Execution Time - Simpler input for the new unit support
- Quality of random numbers
- Will Mathematica install and run on Raspberry Pi computer?
- Scheduling Mathematica scripts to run from a command line
- How to keep $FrontEnd options from resetting?
- How do I add new menuitems to menus?
- Mathematica color schemes for the colorblind
Is there an easy way to use Matteo Niccoli's perceptual color maps for 2D plots in Mathematica? - What's inside InterpolatingFunction[{{1., 4.}}, <>]?
- Are there any tutorials on version 10 notebook templating and report generation? Are there missing docs?
- Handling Kernel start. What is a full initialization stack and what place the Autoload has there?
-
9$\begingroup$ Now this is really useful, big +1. The better we categorize all these resources, the more effective this page will be. $\endgroup$ Jul 25, 2012 at 10:55
-
5$\begingroup$ This could be the Table of Contents of Mathematica.SE. $\endgroup$ Mar 11, 2013 at 16:54
-
2$\begingroup$ This is such a fabulous resource, thank you for taking the time to compile it. $\endgroup$ Jun 3, 2013 at 8:11
-
$\begingroup$ Hi, @faysou, I'd like to see "Data structures and efficient algorithms, from Daniel Lichtblau", but this resources is not available anymore. Do you have a copy? $\endgroup$ Aug 31, 2016 at 4:32
-
Third part of my collection of links, dedicated to advanced evaluation, pattern matching and neat algorithms (which is quite arbitrary but contains a lot of interesting Q&As in my opinion).
Advanced evaluation of expressions
Non standard evaluation allows to work on the symbols of an expression before they get evaluated.
Here's how I represent myself Mathematica's evaluation: consider a function/tree f[a,b]. Without any particular attribute for f the leafs/arguments will be evaluated before the parent f. With f having a HoldAll attribute you don't evaluate the leafs but go directly in the evaluation of f. a and b will be evaluated as soon as they are used in a function that doesn't hold again their evaluation. For example
f[a_,b_]:= a Hold[b]; f[2^2,2^2] (* returns 4 Hold[4] *) SetAttributes[f, HoldAll]; f[2^2,2^2] (* returns 4 Hold[2^2] *)
You can also see with the above example that SetDelayed (:=) acts like a With, ie it can insert a value inside a held expression.
http://reference.wolfram.com/mathematica/tutorial/NonStandardEvaluation.html
Preventing evaluation of Mathematica expressions
Hold any argument
How can I hold UpValues but evaluate other expressions?
Symbolic computations with already assigned variables
How to pass a symbol name to a function with any of the Hold attributes?
Pure function with attributes of arbitrary number of arguments: Is it possible?- Mathematica Language Structure
- Mathematica Internals: A Tutorial
The evaluation process
http://reference.wolfram.com/mathematica/tutorial/Evaluation.html
http://reference.wolfram.com/mathematica/tutorial/TheStandardEvaluationProcedure.html
List manipulation to build a functional expression
How does Mathematica determine that an evaluation should be terminated?
What are all the "magic" Symbols in the Mathematica language? - Some notes on internal implementation
The Internals of the Wolfram System
Algorithm used by IsomorphicGraphQ - What is the complete sequence of evaluations/transformations from submitting a cell to actual evaluation?
\$PreRead, \$Pre, \$Post, \$PrePrint - Robby Villegas, Working with Unevaluated Expressions (Advanced resource about the evaluation process)
Update a function avoiding infinite recursion (Villegas-Gayley technique)
Understanding Villegas-Gayley What are the use cases for different scoping constructs?
A speed comparison between Module, Block and With (Still, Module is what users use most of the time)
Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs
What does Internal`InheritedBlock do?
How safe is the use of Block and Internal`InheritedBlock
What is the purpose of Internal`LocalizedBlock?
What are the scoping rules for function parameters shadowing System` symbols?
Constructing symbol definitions for With
Using With to scope over pure functions
Module variable scoping in Scheduled Tasks?Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs
StringReplace, ReplaceAll and Rule interact in a bizarre way- What are some advanced uses for Block?
How to set Block local variables by code?
Safely nesting RuleDelayed - Metaprogramming in Mathematica
- Can one identify the design patterns of Mathematica?
- Replacement inside held expression
Injecting a sequence of expressions into a held expression
Is it possible to replicate the "magic" of OptionPatterns[] with DynamicModule's local variables?
How does MakeBoxes handle an n-ary operator?
How to inject an evaluated expression into a held expression? (Trott-Strzebonski in-place evaluation trick, RuleCondition)
How to pass a list of arguments into HoldAll
Returning an unevaluated expression with values substituted in
Passing a joined list of symbols for Module or Block to treat as its own local symbols
Replacing parts of a held expression with held parts of another expression Expression parsing examples
Converting StringJoin to StringForm inside Hold
How to write a function to remove comments from a .m source file preserving formatting such as line wrapping reasonably?
How to write a function-defining function which stores the function arguments in a stack?
Is there a Mathematica API for the functions.wolfram site?
Function that counts the number of arguments of other functions
Using MatchQ (or other means) to parse an expression using sums of COS or SIN correctly Automatically generating a dependency graph of an arbitrary Mathematica function?- Functional style using lazy lists?
Tally repeated evaluation of function
File-backed lists/variables for handling large data (Lazy evaluation of streams)
Lazy lists of Tuples and Subsets - How to use pattern matching to assign values to Subscript[f,x_]?
- Implementing a safe ValueQ that does not evaluate its argument
- Convert an expression to a Function
Nested definition: How can I define a function with a passed-in expression? - How to avoid nested With[]?
Comparing LetL and Module efficiency - Do people actually use UpValues?
Upvalues, TagSet and UpSet, what's the difference, when should a use each?
How to implement dual numbers in Mathematica?
Make mathematica treat $e_i^2$ as numeric
How to differentiate formally? - Currying with Mathematica
Going full functional (Haskell style) - How to avoid returning a Null if there is no "else" condition in an If construct (Vanishing function)
- SetAttributes[f,Flat]: Why the order dependence?
The Flat Attribute, Unevaluated and the Evaluation Process
Orderless pattern matching - Spelunking
What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools)
How to see which arguments are passed into a function - How does Return work?
What can I use as the second argument to Return in my own functions?
FoldWhile and FoldWhileList - Tail call optimization in Mathematica?
What tools can help in realizing tail recursion? - Elegant manipulation of the variables list
How to name a variable with the value of another variable? - Block attributes of Equal
- How to find the name of the current function?
- Does pass-by-value affect the performance of function calls?
- Comparing Mathematica expressions like diff
- What is the fastest way to get a list of subexpressions and their positions?
- Resource management in Mathematica
- How to pass a list of arguments into HoldAll
Dynamic Programming with delayed evaluation - Multiplying expressions within a list of pure functions
Using Through to evaluate complex expressions - How to make a function like Set, but with a Block construct for the pattern names
Scoping in assigning a derivative - Getting a usable expression tree
- Call Functions From File Without Modifying Context (Sandbox)
- Functions vs. patterns
when is f@g not the same as f[g]?
When should I use Apply (or Function) and when @@ (or &)? - Constructing functions with variable number of output arguments
Alternative to overloading Set - What are the cool kids talking about when they use ##&[]?
How to avoid returning a Null if there is no "else" condition in an If construct - How to create symbols from strings and set values for them?
- What's the difference between Inactive and HoldForm?
- Is it possible to reference "self" from a pure function?
- How can one manually change the rule ordering
- Permanently extending the behaviour of functions (like decorators)
Pattern matching
A pattern is a way to quickly describe the structure of expressions and do computations on them, using /.
or Cases
for example.
- Some examples
Much more elaborate: a Texas Hold'em package by Sal Mangano - Rules, pattern and functions, one of the chapter of Leonid Shifrin's book.
Demistifying rules - Where in the documentation can I find a list of function argument types?
How can I type-check the arguments of a Mathematica function? - Advice for Mathematica as Mathematician's Aid
- Using ?NumericQ to Affect Order of Evaluation
Is it possible to use the LevenbergMarquardt algorithm for fitting a black-box residual function? - Convert boolean test function to pattern?
- http://library.wolfram.com/infocenter/Conferences/6999/ (Inside the Mathematica pattern matcher)
- Is there an open source implementation of Mathematica-the-language? (Some interesting links to papers about pattern matching, 1,2,3,4)
MockMMA
Mathador
Mathematica as a normal programming language
Mathematica for Computer Scientists - Mathematica Destructuring (Mr. Wizard also gives many links to interesting answers illustrating the same point)
- How to match a pattern with a pattern?
How to generally match, unify and merge patterns?
Pattern matching a pattern with patterns - Semantica, a package for using semantic patterns (f[(2 n_)] for example)
- How do I perform string matching and replacements?
Working with string patterns
Counting the number of instances of one sub-string within a given string within a lower- and upper-bound gap of a second sub-string - Placement of Condition /; expressions
Using a PatternTest versus a Condition for pattern matching
Use of StringExpression as argument
Quick way to use conditioned patterns when defining multi-argument function? - Assessing argument type in set delayed function definitions
How to Combine Pattern Constraints and Default Values for Function Arguments - ForEach in Mathematica
- Why does the name of a pattern affect the result of a transformation rule?
- Conflict with variables in pure functions
- How to match expressions with a repeating pattern
- Is it possible to specify a context-sensitive, "depth-agnostic" rewrite rule?
- Change variables in differential expressions
- Transforming XML
Extract information from HTML using Mathematica
How to manipulate web pages on Mathematica?
Extract information from HTML using CSS selectors? - Replacements/Substitutions in Mathematica (\$Assumptions)
- Position function not always returning an answer even with no apparent problems
- How can I ensure that I am constructing patterns in the most efficient way possible?
- How can I find these patterns' signatures?
- replacement rules from a pattern and a matching expression
- Position of a pattern-matched part of an expression
Select cases from a list (ReplaceList) - Patternmatching sets
- Using patterns in pure functions
- The difference between 0. and 0
- “Strange” behavior of Rule
- f[arg1, arg2,...,argN] vs. f[{arg1, arg2,...,argN}]
A function that accepts a pair or a list of pairs
Alternatives pattern in a function definition
How to distinguish between lists and values?
Vanishing patterns - Get a "step-by-step" evaluation in Mathematica
Interactively inspecting parts of an object - How to do Cases with multiple related patterns?
- How to match a cyclically repeating sequence?
- How to define a recursive pattern?
Convert recursive RegularExpression to StringExpression?
Pattern match for nested Association - How to enlarge Mathematica's knowledge about certain functions?
- Calling Table with custom iterator
Neat algorithms
- Mathematica Minecraft
How to create word clouds?
How can I use Mathematica's graph functions to cheat at Boggle?
Performance tuning for game solving (peg solitaire | senku)
Factorisation diagrams
Happy 2K prime question
Simulating Theatre puzzle
How can I generate this "domain coloring" plot?
Tiling a square
Generating visually pleasing circle packs
Circuit drawing in Mathematica
Detecting patterns of black and white stones on a 2D board
How to build a bvh (a motion capture file format) player in Mathematica? - How to draw Fractal images of iteration functions on the Riemann sphere?
Generating a Sierpinski carpet
Speeding up this fractal-generating code - Explain a Mathematica winning one-liner
- How can this confetti code be improved to include shadows and gravity?
How to create animated snowfall? - xkcd-style graphs
xkcdConvert routines perform slower in Mathematica 9
http://blog.wolfram.com/2012/10/05/automating-xkcd-diagrams-transforming-serious-to-funny/
Sketch-type graphics with transparency and dashed hidden lines? - How to improve the performance of solutions to Project Euler (#39)?
How to find palindromic numbers (Project Euler #4)? - Image processing
Help find a bright object on Mars!
How can I find Waldo?
QR Code in shopping cart handle
Playing with Matrix falling code in Mathematica
Image segmentation and object separation in 3D using Mathematica
Artistic image vectorization
DumpsterDoofus's captivating generative art - How to express trigonometric equation in terms of of given trigonometric function?
How do I introduce a new variable in a trigonometric equation?
Checking if two trigonometric expressions are equal - Efficiently generating n-D Gaussian random fields
Distribution of random points in 3D space to simulate the Crab Nebula - How to improve this code for solving the "Mr.S and Mr.P" puzzle?
Efficient code for the Ten True Sentences puzzle
Mathematica Implementations of the Random Forest algorithm
Soft-Match String Comparison
Gram-Schmidt Process for Polynomials
How to determine the center and radius of a circle given some points in 3D?
Counting multiplications (complexity function)
Insert $+$, $-$, $\times$, $/$, $($, $)$ into $123456789$ to make it equal to $100$
Higher order SVD
How to check if a 2D point is in a polygon?
Find eigen energies of time-independent Schrödinger equation
Solving a time-dependent Schrödinger equation
Efficient backtracking with Mathematica
Determine frequency of oscillations
Alternative ways to implement a triangular recursion
Implementation of smoothing splines function - Position
Efficiently finding the positions of a large list of targets in another, even larger list
Looking for a way to insert multiple elements into multiple positions simultaneously in a list
Efficient way of identifying the indices of first occurrences - Duplicates
Deleting quasi-duplicates from large list efficiently
Delete duplicate elements from a list
Ordering function with recognition of duplicates
How to get list of duplicates when using DeleteDuplicates?
How to efficiently find positions of duplicates?
Removing elements from a list which appear in another list - Map/Thread
Scan vs. Map vs. Apply
Map a function across a list conditionally
Map-Thread-Through-Apply a list of functions onto a list of (lists of) values
Thread over list in different levels Thread over a nested list top to bottom until non-list elements are found How can I make threading more flexible?
How to make MapAt work with Span? - Flatten
"Unflattening" a list
Transpose uneven lists - List manipulations
Finding a subsequence in a list
How to select minimal subsets?
Optimising 2D binning code
Efficiently extracting an array subset given a separate array
Quick multiple selections from a list
How to Derive Tuples Without Replacement
Need help coding/creating a recursive list (FoldList)
Find subsequences of consecutive integers inside a list
Instruct a Table to only evaluate until a condition is fulfilled
How do I replace a missing value in a column with the value immediately above throughout a table?
Sort+Union on a list
How to generalize and speed up this program?
How do I obtain an intersection of two or more list of lists conditioned on the first element of each sub-list?
Vlookup function as Excel in Mathematica
Partitioning a list of numbers the Mathematica way
How to pick increasing numbers from the list
How to replace an element in a list based on the value of the next element?
How to partition a list in a specific way
Nest , Fold ... is there an extension for more than 2 arguments?
List comprehension in Mathematica (similar to Python)
Select a repeated element in a list
Fast method for combining two lists
Discrete Convolution
Shuffle product of two lists
Is there a function which instantly tells you whether an element is part of a list?
Sort data after specific ordering (ascending/descending) in multiple columns
Total by a criteria
-
1$\begingroup$ That's incredible! Thanks for keeping up a great work, this is very useful for all of us, much appreciated. $\endgroup$ Sep 17, 2013 at 13:42
-
$\begingroup$ You're welcome, you're the hero of many of these posts. $\endgroup$– faysouSep 17, 2013 at 14:52
-
1$\begingroup$ @Leonid I've collected some of your answers where you use a parsing approach, if there are other such posts could you please add them to the list ? $\endgroup$– faysouJan 18, 2014 at 22:30
-
2$\begingroup$ Thanks. It's good that this technique is now systematically represented here, I think it is an important one. I have added this one, and my answer for the code formatter question (since in a sense formatter is also an expression parser, and in fact a pretty sophisticated one), which are the only ones that comes to mind right now. $\endgroup$ Jan 19, 2014 at 12:56
-
2$\begingroup$ I find the most difficult part of Mathematica is controlling evaluation (because there isn't just a single way to do it), and I think it's very important for the future of Mathematica, where macros (or code for rewriting code) is the horizon. The post above is extremely valuable. $\endgroup$ Dec 27, 2014 at 12:26
I highly recommend examining the included packages under your Mathematica installation directory:
\AddOns\ExtraPackages
\AddOns\LegacyPackages
\AddOns\Packages
\AddOns\Applications
You can also find examples of good practice, framework guidelines, and insider methods in the presentations from various Mathematica conferences. A mere sampling:
1999 Mathematica Developer Conference
2003 Mathematica Developer Conference
Besides the documentation, which I find very helpful, I also like the following resources:
- The Wolfram Demonstrations Project is a fantastic resource, where you can draw up previously successful programs and learn some best practices. Their utility has varied, but I've certainly learned a lot by seeing great code in practice.
- In a similar vein, I also follow the 'Wolfram Blog'. It's not all universally relevant for my own interests, but following it on Twitter is a good way to dip in here and there.
- Finally, as a new user, I also draw on the Mathematica Cookbook for some nifty examples.
As noted above, however, I normally use the documentation and look through examples of uses, as that's my best way of learning.
-
1$\begingroup$ +1 for the cookbook but I agree with @Nasser on the readability of the demonstrations (plus, doing everything in one giant code block as demonstrations seem to organize things is probably not going to scale very well for anything nontrivial) $\endgroup$– aclJan 19, 2012 at 13:26
In my opinion, rules and pattern matching are central to mastering Mathematica. I strongly recommend Demystifying Rules by Nancy Blachman published in The Mathematica Journal, Volume 8, Issue 4, for a solid grounding in this area. It is available on-line at The Mathematica Journal
For neat tips and tricks, there is a daily tip posted to the MathematicaTip twitter page.
-
1$\begingroup$ This is a pretty good resource. It has lots of small, easy to digest snippets. $\endgroup$ Jan 18, 2012 at 4:44
The Mathematica GuideBook by Michael Trott always gives me lots of inspirations. Beside of it (and other places been mentioned above), I like exploring the SystemFiles folder. Some interesting tricks (especially about interface and FrontEnd) are hiding there.
-
$\begingroup$ The SystemFiles suggestion is a good one. Do you have any particular examples to share? $\endgroup$– VerbeiaJan 18, 2012 at 2:28
-
1$\begingroup$ @Verbeia Some undocumented things can be learned from the system files. such as
"SyntaxColoringReasons"
forCurrentValue
which can be seen in WhyTheColoring.nb (Dynamic[CurrentValue[InputNotebook[], "SyntaxColoringReasons"]]
), system fonts classification which can be seen in UnicodeFontMapping.tr, some inappropriate converting when import GBK encoded Chinese text can be corrected by manipulating CP936.m, etc. $\endgroup$– SilviaJan 18, 2012 at 11:49
The 'Mathematica GuideBook' series by Michael Trott has tons of good examples that go much further than typical 'toy-examples'. I found it a very valuable and thorough ressource for learning the ins and outs of the Mathematica language.
Nobody's mentioned the packages that come with Mathematica. There's a heap of great coding examples in there, especially the later packages.
Fourth fork of the list of links.
Manipulate/Dynamic
- Using Refresh[..] with TrackedSymbols
- Got Manipulate? (Seminar slides)
Manipulate secrects revealed - What is the equivalent of a prototypical Manipulate in lower level functions?
Selective evaluation of blocks of code in a Manipulate - Understanding CDF
- How to modularize custom controls for Manipulate?
http://reference.wolfram.com/mathematica/tutorial/AdvancedManipulateFunctionality.html (See last paragraph) - Question about collections of custom GUI controls for Mathematica
- How to execute a function each time the slider is dragged?
How can I make controls have Button-like behaviour? - How can I effectively performance-profile Dynamics?
- Multiplayer game in Mathematica: how to communicate between kernels?
- Mathematica Manipulate with macros AND variable number of controls (persistence desired)
- How to wrap this dynamic code inside a Manipulate?
- For[] or While[] can't be used inside Manipulate[]?
- Manipulate with explicit updates
- Wrapping EventHandler by Table
- Generalized input (look at Interpretation)
- What does None mean in a control specification for Manipulate?
- How to anchor a Pane's scroll position to the bottom?
- How to visualize/edit a big matrix as a table?
- Button evaluation inside DynamicModule
- Altering layout and sizing of Manipulate controls?
- Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module
- How can I use Dynamic to run a script when a new file is added to a directory?
- Using list elements in TrackedSymbols for Dynamic
- Evaluation order control
- How to make slider in/visible in Manipulate?
- How to visualize the structure of this dynamic programming code
- Slider resistance and Play-Pausing with Manipulate, TabView, and attempt an granular TrackedSymbols?
trouble with Dynamic range in SetterBar - How to save Manipulate bookmarks permanently?
- Writing a simple application: interactive quiz for multiplication table practice
- Dynamically Updating Function
- How can I create an advanced grid interface?
- Alternative updating of a dynamic expression
How to anchor a Pane's scroll position to the bottom? - How to Initiate a queued evaluation from a Dynamic GUI without using a Button
Evaluation order control - How to avoid an expensive subset of a Manipulate computation when dependent variables have not changed?
Slider resistance and Play-Pausing with Manipulate, TabView, and attempt an granular TrackedSymbols?
OOP applied to manipulate - Event driven GUI
- Using Refresh[..] with TrackedSymbols
What does None mean in a control specification for Manipulate? - SaveDefinitions considered dangerous
Palettes
- Can I easily post images to this site directly from Mathematica? (Yes!)
- A palette of accumulated expertise
- For Sale! Three potentially useful palettes
- What are the most common (usual) ways to make palettes with non-trivial functionality?
Finance (but not only)
- Learning Finance with Mathematica
- http://www.wolfram.com/events/chicago2011/nVidiaFinancePresentation.nb
- High-Performance Computing in Finance
- http://blog.wolfram.com/category/finance/
- How can you compute Itō Integrals with Mathematica?
Fast Simulations with Compile - Problem with Financial Data
- Growth theory with Mathematica
How to model Macroeconomic dynamics? - Making a Stock Options Database in Mathematica
How to request financial data from Yahoo's YQL and Quandl?
Graph databases / Nosql with Mathematica - http://www.mathestate.com/
- How can I connect to the IB TWS platform from Mathematica?
- Exploring asset allocation
- Empirical market microstructure
Correlation
- What is the best way to create a correlation matrix heatmap with values?
- Correcting a correlation matrix to be positive semidefinite
Proba/Stats
- DistributionFitTest[] for custom distributions in Mathematica (How to define a custom probability distribution in Mathematica 8)
- Probability: proportion of 1000 random lists for x that contain the same nrs
- Filtering beat-to-beat heart rate data
- Time-series decomposition in Mathematica
- http://blog.wolfram.com/2013/02/01/the-ultimate-univariate-probability-distribution-explorer
- Mathematica code for hidden Markov models (HMM)
- Autoregressive distributed lag model
- Finding the likeliest path in a Markov process
Misc
- Open Excel file with Mathematica
Exporting data from Excel into Mathematica using clipboard
how to delete specific data from text file and then update it - Tricks for making graphics for the math book
- Automating SFTP upload within Mathematica?
- How to include Mathematica animation in a PowerPoint presentation?
- Calling external commands without showing command prompt on windows
- Web Browsing Automation with Mathematica
- Capturing Data from an Android Phone
- Quit the Kernel and start new session automatically
- how to write string to file without Quotation mark
- How to create a progress bar?
Creating "detached" plots - Using parallel kernels
Asynchronous evaluation: Is it possible?
Transferring a large amount of data in parallel calculations
Are built-in Mathematica functions already parallelized?
Does parallel programming use up large quantities of memory in Mathematica?
Why is this parallel evaluation with Dispatch[] so slow?
Computing Many Slow I/O Operations
Evaluator option for Mathematica Scripts
Writing data to a common file during parallel processing
ParallelTable and DistributeDefinitions
http://reference.wolfram.com/language/ref/DistributedContexts.html
Suspecting bug in Parallel Framework
How to share numbered variables between kernels
Evaluate while external command is being run
http://reference.wolfram.com/legacy/applications/parallel/
Not strictly a Mathematica blog but Rip’s Applied Mathematics Blog is a very nice resource for advanced Mathematica problem solving. Rip makes regular weekly posts on whatever interests him that week and they usually include some neat implementation in Mathematica.
And another very good reference Mathematica blog by Kris Carlson with interesting methods and examples:
-
1$\begingroup$ If bewildered one should look into examples rip94550.wordpress.com/2012/04/16/… $\endgroup$– ArtesApr 24, 2012 at 12:03
-
1
-
$\begingroup$ The author of this blog has passed away late last year. $\endgroup$ Jan 25, 2014 at 14:10
I'm not sure this has already been posted but I found these tutorials really helpful as a beginner. They are problem based (similar to the Euler Problems) and the author takes you through the solutions in a step wise fashion. Hope it helps.
Blogs
- http://mathematica.blogoverflow.com/
- http://mathematica-bits.blogspot.com/ (Blog of Yaroslav Bulatov dedicated to graph theory)
- http://12000.org (Blog of Nasser M. Abbasi)
- http://blog.matthen.com/ (Various interesting demos by Matt Henderson)
- http://ibnhconsulting.blogspot.co.uk (Blog of Mike Honeychurch)
- http://textanddatamining.blogspot.com/ (Blog about data mining in texts)
- http://shuisman.com (Blog partly about Mathematica)
- http://mathgis.blogspot.com/ (Lunchtime playground)
- http://mathematics-diary.blogspot.com (Blog of Nilo de Roock)
- http://www.walkingrandomly.com (Blog about scientific programming languages)
- http://rip94550.wordpress.com/ (Rip’s Applied Mathematics Blog, Mathematica is used to demonstrate various concepts of graduate level)
- http://mathematica-guide.blogspot.co.uk/ (Blog of Kris Carlson)
I liked this post: Functional-Procedural Fusion, this function is useful for this style of programming: MapEach[function_]:=(function/@#)& (for example: {1,2}//MapEach[2 #&]) - http://mathematicanews.blogspot.co.uk/
Personal websites
- http://math.sduhsd.net/MathematiClub/ (Games, various interesting notebooks)
- http://www.theodoregray.com/BrainRot/ (Conversation with Theodore Gray one of the historical developer of Mathematica)
- http://www.dbaileyconsultancy.co.uk/ (Super Widget Package, can be interesting, but using Dynamic with built-in Mathematica GUI components is now easier)
- http://www.verbeia.com/mathematica/code.html (Various interesting links to other packages)
- http://katlas.org/wiki/Main_Page (Knot Atlas, package available)
- http://www.weber-und-partner.com/resources (Some applications to mathematical finance, package working as an interface to Quantlib)
- http://home.comcast.net/~djmpark/Mathematica.html (Site of David Park, Expression manipulation and some interesting packages)
- http://www.mathestate.com (Site about finance, with some links to demonstrations)
- http://library.wolfram.com/infocenter/Conferences/8073/ (A formal approach for modeling and simulation)
- http://www.bugman123.com/ (Paul Nylander)
- http://vimeo.com/groups/mathematica/videos (Some cool videos in 3D made with MM)
- http://pages.uoregon.edu/noeckel/MathematicaGraphics.html (Creating an Post-Processing Mathematica Graphics (on Mac OS X))
- http://www.lauschkeconsulting.net (Some interesting (non free) packages, like JavaTools which provides Mathematica links to Scala, C# and F#)
- http://www.oftenpaper.net/sierpinski.htm (Very cool pictures and math using Mathematica, code available)
- http://dev.ragfield.com/ (Useful Mathematica scripts among others. Connection with iTunes,Twitter, YouTube, Font outlines,Mapping GPS Data are some of them)
- http://mathematicaforprediction.wordpress.com (Blog for different methodological and algorithmic aspects of computing predictions with Mathematica.)
- http://www.familydahl.se/mathematica/ (Ingolf Dahl, package implementing several interpolation methods)
Calculus
- http://www.wright.edu/~richard.mercer/Calculus/Lab/Download/index.html (Various notebooks about mathematics)
- https://sites.google.com/site/calcuplus/ (Introductory calculus course with CDF demos)
- http://library.wolfram.com/infocenter/TechNotes/6111/ (Numerical analysis, code of a lot of common numerical methods)
http://mathfaculty.fullerton.edu/mathews/n2003/NumericalUndergradMod.html
Resources on other languages
- Having used Mathematica as a "gateway" language, where to from here?
- Online interpreters can be found here Online-REPs-and-REPLs in order to test ideas in a lot of different languages.
https://c9.io (Cloud 9) - This resource is very useful for common languages like Java, C++ or VBA
http://www.java2s.com - C++ reference books
- Tutorials on a lot of current technologies (but Mathematica is missing there ...) http://www.tutorialspoint.com
- http://rosettacode.org/wiki/Mathematica (Several algorithms in Mathematica together with other languages)
- http://www.cheat-sheets.org (Cheat sheets for a lot of languages)
- Wikibooks, can be handy for a quick reference on many languages.
- The Archive of Interesting Code
- dGSD, a great tool for organizing your projects and knowledge (Based on TiddlyWiki, a wiki stored in a single HTML file).
Or use Evernote with the secret weapon (this thing is so good ...) - Alternatives to Mathematica
- google-styleguide
Forums
MathGroup
- https://groups.google.com/group/comp.soft-sys.math.mathematica
http://www.mathkb.com/Uwe/Forums.aspx/mathematica/201107/1
http://forums.wolfram.com/mathgroup/
Stack Exchange sites
- Mathematica questions on Stack Overflow
- Mathematica.StackExchange (look at "favorites" in the profiles of active users for reading past interesting answers)
- Mathematica questions on Stack Exchange: all questions tagged mathematica on the Stack Exchange Network
Links to some packages
- PackageData.net is a comprehensive collection of links to packages
- What third-party packages do you use?
- http://www.xact.es/index.html (Open source tensor package suite)
also see this post Differential geometry add-ons for Mathematica and Tensor analysis - FeynRules by Neil D. Christensen, Claude Duhr & Benjamin Fuks (latest version: 1.6.0, package to calculate Feynman rules)
- Automatic physical units, by Jon McLoone (2010, available from the Wolfram Library Archive)
http://library.wolfram.com/infocenter/MathSource/7655/ - NCAlgebra (Non Commutative Algebra Package)
- Sym (Symmetry analysis of differential equations)
- Some packages written by Leonid Shifrin
http://www.mathprogramming-intro.org/additional_resources.html
https://gist.github.com/lshifr - Various links to common websites (Google, Amazon,...), financial data, and some useful functions for manipulating time series. https://github.com/fmeinberg?tab=repositories
- RUBI (symbolic integration rules)
- MTools (Object oriented programming)
Packages for preparing publication-quality scientific figures
- LevelScheme by Mark Caprio (latest version: 3.52, Sep 2011, for Mathematica 6 and higher)
- Presentations and other packages by David Park (latest version: 25 Aug 2011)
- A WorkLife Framework by Scientific Arts LLC (extendable and customizable toolset that broadens Mathematica's scope across many aspects of daily work)
- FeynArts by Thomas Hahn (latest version: 3.7, 27 Mar 2012, package for generation and visualization of Feynman diagrams and amplitudes)
- Writing and Publishing a Book with Mathematica by Paul R. Wellin (2005, available from the Wolfram Library Archive)
Useful non-free tools for development, deployment, distribution, linking, etc.
- Workbench by WRI, current version: 2 (official Mathematica IDE based on Eclipse, great for projects involving several packages and generating integrated documentation)
- webMathematica by WRI, current version: 3 ("Deploy high-powered applications as interactive websites")
- gridMathematica by WRI, current version: 8 ("Easily control CPUs and GPUs to solve large problems fast")
- SystemModeler by WRI, current version: 3. Integrated symbolic modelling platform.Some related links: MathModelicaPaper, ObjectMath, Modelica, OpenModelica
How to do System dynamics simulations / diagrams in Mathematica? - Finance Platform by WRI, current version: 1. Includes option pricing, risk analysis, enterprise system development, and interactive reporting
- Mathematica Applications and Add-Ons (all add-ons marketed via WRI, related to Mathematica)
- Mathematica Link for Excel by Episoft, Inc., current version: 3.5 (links Microsoft Excel with Mathematica)
Stephen Wolfram: An Elementary introduction to Wolfram Language
Also, this does not belong 100% here but it is an overshelming list of reference to be missed. A Bibliography of Publications about the Mathematica Symbolic Algebra Language
I am not sure if it has already be mentioned.
I'm a beginner, and I find it interesting to explore the documentation. Some of the commands I've read about have given me interesting ideas for programs. Also, I'm not sure if this has been mentioned, but the Wolfram Demonstrations Project has a bunch of amazing programs you can play with and download the code from.
ApplicationMaker shows how to create packages that look like native functionality, including integration into the Documentation Center.
I have been adding some new content here (mostly following along with the elementary introduction book and doing explorations in machine learning):
https://www.livecoding.tv/learn/wolfram/
These 'live coding' sessions are recorded so you can watch them. They are a little bit different from pre-recorded video tutorials, because there is a chat window where 'live watchers' can ask questions (which you can not do when you watch the recording, of course).