Message Boards Message Boards

0
|
13859 Views
|
7 Replies
|
5 Total Likes
View groups...
Share
Share this post:

[?] Do most people use an IDE to program in Mathematica ?

Posted 7 years ago

I am new to Mathematica Programming, and I find the typing of commands into the program itself to be tough and error-prone, I want to start off with the best frontend (GUI). I have seen it works with Visual Studio ( https://www.visualstudio.com/vs ). I have also seen there is a great developer platform that works with JetBrains ( https://plugins.jetbrains.com/plugin/7232-mathematica-support ). Am I missing something in wanting an IDE? And if you develop in an environment which does you prefer. Thanks in advance to the Mathematica Community for this advice.

POSTED BY: Brian Buchholz
7 Replies
Posted 7 years ago

Wolfram Workbench is IDE for package development

POSTED BY: Tsung-Ju Yang

Am I missing something in wanting an IDE?

Yes. Mathematica is designed for interactive use, and its notebook interface beats just about every other competitor in this regard.

When you write C code, an IDE is advantageous because the workflow is: write a whole program, compile it, test it, tweak code, recompile the whole thing, run and test it again, etc.

Many other systems that are based on interpreted languages still keep a similar workflow, including MATLAB and Python: First you write the entire program, then you run it. You work with "scripts", which are entire programs.

Mathematica is much more dynamic. We do not usually write scripts. Instead, we write byte-sized pieces of code at a time, and run/test them immediately. The output is visible right away. It is a very different workflow, and it is a very different way of putting together larger programs.

For example, a typical use of Mathematica is exploratory data analysis. You start by importing the data. That is one input line. You look at the first few elements of the data. That is another one (Take). Now you have some idea about its structure. You extract part of it, another line. You plot those parts. You transform it, and plot it in a different way. Each of these is a small piece of code, which is run individually. If you need to do a complicated transformation, you would do it step by step, checking the result after each one. Only when you are satisfied would you wrap all steps up into a single input (or a single function definition).

I find working this way much less error prone than working in an IDE. Because I almost never write more than a line without running it immediately, I am able to detect and correct mistakes right away. It helps that it is not only the interface that is optimized for interactive use, but also the language itself.

The IDE paradigm is simply not designed for interactive work like this, while notebook paradigm is excellent for it. So much so, that Mathematica's competitors are all borrowing it: Python has Jupyter notebooks, MATLAB has "cell mode", and now (since last year) "live scripts".

I believe that to use Mathematica effectively, one must embrace this workflow. Otherwise, you will just get frustrated, and you will not be productive. So forget about IDEs at least until you start developing packages.

IDEs are useful for package writing. I wrote and maintain several public packages, and use several more privately. Yet I still spend 90% of my time in the notebook interface, even during package development. That's because I build up and test complicated functions interactively, step by step, before putting them in the package.

So the answer to your question:

Do most people use an IDE to program in Mathemetica ?

is a clear no. IDEs have their place in Mathematica development, but most of the work is being done with the notebook interface. Most users don't write packages, so my guess is that most Mathematica users never use IDEs.

POSTED BY: Szabolcs Horvát

Well Szabolcs, I guess you made a perfect description of the workflow in Mathematica :) This post should be on the start-up page of the software :)

POSTED BY: Robert Poenaru

It appears my Naiveté is showing. I need to do much more programming in Mathematica and the flow and usefulness of interactive use and its notebook interface are much more useful than I had thought.

My thanks to Robert and Szabolcs and any others who respond, for their input.

POSTED BY: Brian Buchholz

Robert Poenaru; Thank you very much for your suggestions.One of my reasons for the post was to see if most experienced programmers use an IDE. Thanks once again!

Brian Buchholz

POSTED BY: Brian Buchholz

No problem Brian :)

Have a good day!

POSTED BY: Robert Poenaru

Hey Brian! First of all, in the community posts you should write text in normal mode, and only code in code mode, your post seems a little bit clunky :)

I don't really know why would you need a separate IDE for writing code in Mathematica. The standard software is pretty OK and it provides the user full support (automatic completion, quick access to documentation etc.).

I know that if you are used to a special environment for coding (like VS or CLion) you might want to keep it in the same space, but I think you will get used to Mathematica software quickly. The fact that it is more error-prone than other IDEs might be true, but in this way you will train yourself to write code correctly :D

I don't know if I've provided any help to you but I wish you good luck with Wolfram Mathematica !

POSTED BY: Robert Poenaru
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract