Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 5478

General guidelines and best practices for Mathematica usage and programming.

3 votes
Accepted

Understanding Dynamic, Refresh, and TrackedSymbols

In this case I'd not bother with Refresh but for the full answer see: What is the point of Refresh if Dynamic has an UpdateInterval option? If you have nested Dynamic where you want to explicitly …
Kuba's user avatar
  • 138k
6 votes

Unexpected behaviors in built-in functions

Exceptions in the standard stylesheet/style inheritance stack Quick list of deviations Feel free to add anything, try to make it short and if needed add examples or more explanation at the end of the …
8 votes

Unexpected behaviors in built-in functions

Support for Directory[] This was always puzzling me but I'm happy to delete this answer if I'm alone in this. TL;DR; Functions that do NOT respect Directory[]: NotebookOpen (*1*) NotebookLocat …
6 votes

Unexpected behaviors in built-in functions

Arguments conventions for export like functions It is not that tough yet I'm always confused, so again, if that is only me let me know and I will delete that answer. Export[ "where", what, how] …
5 votes

Unexpected behaviors in built-in functions

Exceptions to "first option's value takes precedence" rule One usually expects expr[opt1 -> a, opt1 -> b] to be equivalent to expr[opt1 -> a]. At the end this is how Replace* functions work: opt1 /. …
6 votes

Renaming options of custom functions while preserving backwards compatibility

I have not heavily tested it but I decided to give it a try because I don't like minor issues with other proposals. E.g. that old options stay in Options or the way legacy rules are applied/used. Her …
Kuba's user avatar
  • 138k
6 votes

How to handle package dependencies?

The problem I see is that in principle every package should be suited to be embedded with specific context. And we can't expect everyone to start writing packages in this manner. So it should be Other …
Kuba's user avatar
  • 138k
18 votes

Package organization

It is possible, your code works. I don't see any downsides which aren't a matter of taste. I like to keep usages next to definitions too. But I hate using full names, you can just mention symbols in …
Kuba's user avatar
  • 138k
18 votes

Unexpected behaviors in built-in functions

...Q functions that can return something else than True or False TL;DR; Those exceptions return unevaluated or $Failed which needs handling. Or if you don't want to think about that and only True is w …
2 votes

Memoization and packages

How about: BeginPackage["MyPackage`"]; ClearAll["`*", "`*`*"]; foo; DisableMemoization; Begin["`Private`"]; foo[0] = 0; foo[x_Integer?Positive] := foo[x] = foo[x - 1] + x; DisableMem …
Kuba's user avatar
  • 138k
3 votes

Application example of RuleDelayed in options

Short answer is, you can achieve the same with different idioms but some are better in some cases than another. Pick the one that reduces amount of code that you and user need to write because it will …
Kuba's user avatar
  • 138k
5 votes

What are the most common (usual) ways to make palettes with non-trivial functionality?

This is a supplementary answer to what John Fultz has provided. Problem 1: The problem is that sometimes I can't include all functionality inside the palette nor I can call Needs to load it after ke …
Kuba's user avatar
  • 138k
17 votes
Accepted

Working with DynamicModule: SetDelayed + OwnValues

J. Fultz' answer indicates that it is not a bug but a feature which needs better documentation. Get a habit of defining your procedures with [], e.g. f[]:=Print[1]. (Which creates DownValues instead …
Kuba's user avatar
  • 138k
3 votes

Internal DynamicModule steals scope of external DynamicModule

JHM is right about the reason. John Fultz shows nice versioning and coding style I'm encouraging to use. Yet there is no answer to how to avoid this problem in general and flexible way. Here is my att …
Kuba's user avatar
  • 138k
2 votes
Accepted

Questions about InlineCell vs InlineFormula vs DisplayFormula cells

I don't have much experience with writting books or articles in Mathematica so let me just add technicall notes. For use cases I'd search around using those styles as keywords: How do I use the style …
Kuba's user avatar
  • 138k

15 30 50 per page