Questions tagged [guidelines]

General guidelines and best practices for Mathematica usage and programming.

Filter by
Sorted by
Tagged with
5 votes
1 answer
85 views

Introductory material on machine learning?

Does Mathematica have a handbook or other introductory material on machine learning? Or are there any books on analyzing machine learning with Mathematica?
user avatar
4 votes
1 answer
227 views

How to Learn as much about Mathematica as possible efficiently with the Documentation Center and books?

I have been using Mathematica for almost a year now and I am still learning about functions that make me kick myself for not knowing earlier. For example, I wish I had known about the functions ...
user avatar
4 votes
1 answer
82 views

Optimizing some code for WolframCloud deployment/publishing

I am working on creating a demonstration and came across an instance where my code works fine on my machine locally but breaks down when deployed to the cloud (so that it can be publicly accessed). I ...
user avatar
  • 373
0 votes
0 answers
345 views

Is there a beginners tutorial for Wolfram Engine users?

I was taking a look at WolframEngine. The fact that it is freely available, virtually making Wolfram tools and language accessible to anybody is very much attractive! Nevertheless, the first impact ...
user avatar
  • 2,058
7 votes
1 answer
186 views

Understanding Dynamic, Refresh, and TrackedSymbols

I thought I had a pretty good handle on Dynamic, but some recent examples have made me suspect that I may have some misconceptions, and I am not finding good ...
user avatar
  • 2,209
30 votes
2 answers
869 views

Custom atomic expressions - modern tutorial

Atomic but sophisticated expressions are all around for a long time: Graph SparseArray. More are coming with each new release, ...
user avatar
  • 132k
15 votes
2 answers
318 views

Hold attributes vs performance

Is there a reason to use Hold* attributes for functional code (e.g. no intention to mutate input)? I'd expect performance gains as in pass by value vs pass by ...
user avatar
  • 132k
8 votes
1 answer
148 views

Memoization and packages

I am working in a package on symmetric functions, that sometimes are quite expensive to compute. I use memoization extensively, but what is the correct approach for a package intended for the public ...
user avatar
13 votes
4 answers
455 views

Renaming options of custom functions while preserving backwards compatibility

I have a package with many functions. There is an option name that several functions share. I feel that the current name of this option was not the best choice. I would like to rename it, but at the ...
user avatar
  • 224k
6 votes
1 answer
109 views

Conditional rendering of items

Let's say I have a column to display and each of its items can be hidden separately. Question: Is there a way to make it work without re-rendering whole column whenever a particular item is hidden? ...
user avatar
  • 132k
3 votes
1 answer
92 views

Application example of RuleDelayed in options

In this question: Options which require RuleDelayed , an example was given, where the an option has to be given as a RuleDelayed: ...
user avatar
  • 4,686
25 votes
4 answers
931 views

Different strategies to get a clean Kernel. Quit, Exit, ClearAll, Remove, CleanSlate?

Often new users face problems with lingering definitions that, if unaware, may cause unexpected and frustrating behaviour. There are several answers that illustrate different aspects of the solution, ...
user avatar
  • 28.6k
6 votes
0 answers
316 views

Multipart package creation, development and maintenance [closed]

I am a physics major. I focus on theoretical and mathematical physics. After spending some time with Mathematica I found that it is not straightforward to create separate files for logically distinct ...
user avatar
  • 1,504
5 votes
0 answers
77 views

Handling rendering delays gracefully

I moved the second issue to a separate topic: 162013 Please run the code sample As you can see there is a delay between the moment the calculation is finished and when the graphics is shown. And ...
user avatar
  • 132k
13 votes
1 answer
397 views

How to create (Header + Main area + Settings pane) notebook layout

cross-posted in community.wolfram.com The goal is something like in the picture below. Basic? I dare you to try to implement it in a manageable, scalable and flexible way. Requirements: The goal ...
user avatar
  • 132k
3 votes
0 answers
99 views

How to visualise Mathematica code and how to become a better coder [closed]

I seem to be using functional coding frequently. However, it does not come naturally and I usually copy from example, and then adapt for my own. How do you recommend I improve as a coder? I would ...
user avatar
  • 617
30 votes
5 answers
743 views

Unexpected behaviors in built-in functions

Existence of this topic is discussed in this mathematica.meta post. I'm sure I am not the only non-beginner in WL who from time to time finds themselves not being able to predict an outcome of a ...
20 votes
1 answer
391 views

Is building an event-based parser possible/reasonable in Mathematica (WL)?

Too long? Go to Problems section Background I like to learn by doing small, sometimes artificial, projects. Among other things I had 'parsers', and 'stream methods / streams in MMA' on my to learn ...
user avatar
  • 132k
7 votes
2 answers
193 views

Impact of Linkage and DistanceFunction on Agglomerate clustering

I'm using Agglomerate function to find clusters of my experimental points. I have about 20 points with 10 parameters each. It seems it works fine, but there are plenty of Linkage and DistanceFunction ...
user avatar
22 votes
2 answers
2k views

How are Accuracy and Precision related Mathematica for a given operation?

The common understanding for Accuracy and Precision in English language is given by this figure. Inspired by this question I have a follow up question relating ...
user avatar
  • 28.6k
14 votes
1 answer
262 views

Clean package update for API/FormFunctions on Wolfram Cloud

Cross posted on community.wolfram.com (new comments) TLDR There is a pool of kernels/sessions available for each user, you don't have control over the pool only over specific kernel you currently ...
user avatar
  • 132k
6 votes
1 answer
808 views

Begin["`Private`"] vs Module

So, if you have a package formatted like so: ...
user avatar
  • 397
41 votes
2 answers
4k views

What are some common issues with fitting functions to data?

Mathematica has numerous functions designed to, or capable of, fitting known functions, and finding unknown functions to match data sets. What are some common issues that come with finding those fits?
user avatar
  • 8,487
3 votes
1 answer
113 views

Questions about InlineCell vs InlineFormula vs DisplayFormula cells

I'm having trouble with typesetting, and can't get these questions straight in my head. What is the difference between "InlineCell" and ...
user avatar
  • 4,529
18 votes
1 answer
807 views

How to handle package dependencies?

When an application written in C++ depends on some libraries, the libraries are usually shipped together with the application. Two applications that depend on the same library will not share the same ...
user avatar
  • 224k
7 votes
0 answers
108 views

More documentation on stylesheets?

I am finding the "help" for manipulating stylesheets in Mathematica is limited. I have a found a number of helpful tips in the documentation center and StackExchange, including help with ...
user avatar
  • 4,529
2 votes
0 answers
212 views

Any Colocalization measuring methods or WL functions?

[Cross-posted on the Wolfram Community.] Is anyone aware of any Wofram image-processing tutorial or documentation/example that specifically address: 1) Intensity Correlation Coefficient-Based: (e.g. ...
user avatar
10 votes
0 answers
145 views

URL functions overload

All these functions seem capable of doing the same things: Import, URLFetch, URLSave, ...
user avatar
  • 30.3k
6 votes
1 answer
131 views

How to work with BoxOptions (ButtonBoxOptions, PanelBoxOptions, etc.)

The main question is in the title. Here are subtopics I'd like to focus on: Is there a tutorial related to them anywhere in documentation? How can I check what are current values of e.g. ...
user avatar
  • 132k
24 votes
3 answers
1k views

Package organization

When writing a Mathematica package Foo, with functions f1, f2 and f3, one can use the template: ...
user avatar
73 votes
6 answers
4k views

Q&A Mathematica v.11 Neural Networks: A comprehensive look at Layers, Net Functions, and pioneering into this [[experimental]] code

Motivation As Mathematica v.11 was released earlier this month with a host of new [[experimental]] functions and a limited number of examples on curated data that ...
user avatar
  • 5,182
14 votes
2 answers
546 views

Wolfram Cloud deployment obstacles

What are official restrictions about FormFunctions/general deployment contents? There are problems with many things which sometimes I have workarounds for but I ...
user avatar
  • 132k
14 votes
1 answer
329 views

Working with DynamicModule: SetDelayed + OwnValues

Shortly, definitions in form of e.g. x:= RandomReal[] have to be avoided inside DynamicModule[{x}, ...]. Why?, this ...
user avatar
  • 132k
19 votes
1 answer
434 views

Any manual on cell grouping management?

Recently I come back to the problem of cell grouping and performed extensive search on this site and on MathGroup archive for information on how to use the possible values of the ...
user avatar
56 votes
3 answers
4k views

Is manual adjustment of AccuracyGoal and PrecisionGoal useless?

This is a problem confusing me for years. AccuracyGoal and PrecisionGoal are two options that I never truly understand and, to ...
user avatar
  • 51.3k
11 votes
1 answer
209 views

Nested association values validation. POJsO handling

Sometimes it is convenient to work in your package/app with "objects" like: ...
user avatar
  • 132k
19 votes
4 answers
569 views

Internal DynamicModule steals scope of external DynamicModule

I have two dynamic objects, one nested in the other. Both have their own functions defined, as follows. I have simplified them to the point where they don't make much sense, but can still illustrate ...
user avatar
14 votes
2 answers
638 views

Good clearing practices

I have been using Mathematica for about 2 years and I'm pretty ok to write and optimize my code. Wanting to improve my practice, I often look at code examples. However, I can not determine if there is ...
user avatar
  • 397
37 votes
2 answers
2k views

General techniques for creating complex animations

I love good animations of abstract concepts, and when I try to create them myself, I prefer doing so in code to make sure they are exact (and because some things are just way too fiddly to do by hand)....
user avatar
  • 8,564
148 votes
9 answers
13k views

General strategies to write big code in Mathematica?

I think after six months of exposure to Mathematica and the Wolfram Language I am fairly OK with writing short codes and snippets. However, what are some general strategies to use in order to write ...
user avatar
  • 8,528
69 votes
2 answers
2k views

Guidelines for planning custom GUI in Mathematica

This post is here to save your time during GUI development in Mathematica. And one way to do this is to know where limits are and to be aware of features that are awaiting. Background Usually I don't ...
user avatar
  • 132k
4 votes
0 answers
152 views

RealDigits and functional style

So while thinking about Replacing numbers of which you only know certain digits I have faced, again, a problem that I find hard to extract from RealDigits' output ...
user avatar
  • 132k
9 votes
2 answers
373 views

Naming convention for symbols exported from package

I know this is a little opinion based, but so is Mathematica style guide and similar topics. The issue is important so I think this topic will be beneficial for future visitors. Q: So ...
user avatar
  • 132k
19 votes
1 answer
1k views

What is the difference between MathLink and WSTP? Which one should I use?

What is the difference between MathLink and WSTP programs? Will the use of MathLink protocol be maintained or not?
user avatar
  • 191
13 votes
2 answers
9k views

How to draw confidence ellipse from a covariance matrix?

I am studying a two-dimensional dataset, whose mean vector and covariance matrix are the following: ...
user avatar
40 votes
7 answers
4k views

Mathematica style guide?

I encountered this site today https://code.google.com/p/google-styleguide/ regarding the programming style in some languages. What would be best programming practices in Mathematica, for small and ...
user avatar
  • 10.7k
13 votes
2 answers
3k views

How to train a convolutional neural net on images?

The functions Predict[] and Classify[] both have the option Method -> "NeuralNetwork", ...
user avatar
  • 30.3k
6 votes
1 answer
141 views

To TagSet or not to TagSet when using MakeBoxes

What is the difference between the following two: ...
user avatar
7 votes
3 answers
329 views

What is the recommended way to define numeric function with special cases?

What is the recommended way to define a purely numeric function with special cases? Should I define many special cases with pattern matching? ...
user avatar
37 votes
2 answers
3k views

Best practice of passing a large number of parameters to functions

I have a number of functions that all take a large number of parameters. I am wondering what is the best practice of passing these parameters to those functions. I could, of course, simply specify ...
user avatar
  • 563