# Tagged Questions

Questions on how to write code in a better or different style, using Mathematica's capabilities for coding in multiple styles.

21 views

### why the result not contain imaginary, I?

Good day, First of all, sorry if my coding in this forum has mistake. I already learned it and this is the best try from me. May anyone help me troubleshoot my problem below. ...
43 views

### How to add new formula in existing formula in certain time?

Good day, May anyone help me to give an idea to edit the coding For as below towards my problems. ...
4k views

### How do I increase the readability of this code?

Below is some code I am working on; being a beginner. How can I increase the readability of the part behind Manipulate? I can't read my own code anymore, because it is simply too long and unordered. ...
351 views

### Is there a guideline about when to end expressions with semicolons?

Whether for nested Ifs or within scoping constructs like Module and Block, I never know ...
1k 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 ...
1k views

### Granular versus terse coding

While reading Leonid's grand answers to General strategies to write big code in Mathematica? I came across something that goes against my own practices. I do not disagree with the principle but the ...
127 views

### Coding using time from system(computer)

Please help me to solve this problem below. I want to run this coding based on the time given by the system. Given, A = ( { {E^(I [Beta]1 + I [Beta]3) Cos[[Beta]2t], E^(I [Beta]1 - I [...
189 views

### Replace For with If in Mathematica way

I have this code: ...
477 views

### How to generate this structure of a list without While and the like?

I need to create a list that holds, for given integer d, the elements $1,\ldots,d,d+2,\ldots,2d,2d+3,\ldots,3d,3d+4,\ldots,d^2$ where $\ldots$ is just denoting ...
394 views

### Writing functions with “Method” options

I'd like to implement several behaviors for a particular function using a Method option added to the function definition: ...
5k views

### Can one identify the design patterns of Mathematica?

... or are they unnecessary in such a high-level language? I've been thinking about programming style, coding standards and the like quite a bit lately, the result of my current work on a mixed .Net/...
749 views

### What's the most “functional” way to do Cholesky decomposition?

I can do Cholesky in a procedural style, such as: ...
184 views

### stop notebook evaluation when Assert fails

I would like a notebook evaluation to entirely stop when an Assert fails, without quitting the kernel. Is this possible (e.g., by setting ...
66 views

### Good coding for integral substituions

This question is aimed at improving both my coding and my understanding of MMa's capabilities. A lot of my code is still hacks and workarounds for things I don't know how to do properly. I want to ...
282 views

### Good coding for a sequence of derivatives

People on this site keep telling me that good MMa practice avoids the use of loops. The code below calculates the same Table of derivatives two different ways, ...
935 views

### Placement of Condition /; expressions

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

215 views

### Should I end all definitions from packages with semicolon?

I noticed that if I open a .m file in Mathematica and click on the Run Package button, all the ...