Group Abstract Group Abstract

Message Boards Message Boards

What is the best way to refactor code within a notebook?

Posted 4 years ago
POSTED BY: Andrew Burnett
5 Replies
Posted 4 years ago

Thanks Robert. That's very helpful. I will do some experiments with importing the code into a notebook. But, on the basis of your thoughts, it sounds as though the process of editing the code in IntelliJ is really just a one-way process. I.e. once I have decided that my programming task demands a more capable editor, I won't be going to back to Mathematica, except to run the code.

POSTED BY: Andrew Burnett
POSTED BY: Robert Nachbar
Posted 4 years ago
POSTED BY: Andrew Burnett
Posted 4 years ago
POSTED BY: Rohit Namjoshi

For large code development, I'd suggest using an IDE that supports it. AFAIK, there isn't one that works with notebooks, so this is sort of a half-answer: Someone has written a nice IDE for working with packages (".m"/".wl" files):

https://wlplugin.halirutan.de

There's also Wolfram Workbench.

You can save a .nb file to a .wl if you change all the input cells to be initialization cells; then Save As .wl. Can be a bit of a pain, though. Not sure if you can convert back to a .nb file.

Not a quick solution to your problem -- sorry about that.

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