Live data from Hacker News

Jupyter notebooks in the IDE: VS Code vs. PyCharm

towardsdatascience.com

41–50 of 62 posts

Re: Jupyter notebooks in the IDE: VS Code vs. PyCharm

#41
post #40

I don’t do data science and I really don’t understand what Jupyter notebooks are used for. Are they just a way to explore ideas with immediate feedback?

You can publish them on github or mybinder as persistent self documenting interactive repl sessions. Then others can see what the code did, the intermediate results, and can easily play with it.

(No "data science" here either, but into repl based instant feedback development & collaboratiove programming tools)

Re: Jupyter notebooks in the IDE: VS Code vs. PyCharm

#42
post #41
post #40

I don’t do data science and I really don’t understand what Jupyter notebooks are used for. Are they just a way to explore ideas with immediate feedback?

You can publish them on github or mybinder as persistent self documenting interactive repl sessions. Then others can see what the code did, the intermediate results, and can easily play with it. (No "data science" here either, but into repl based instant feedback development & collaboratiove programming tools)

Oh, very cool. Sounds like something I’d love to use. I always loved the Clojure REPL.

Re: Jupyter notebooks in the IDE: VS Code vs. PyCharm

#43

Spyder has a Jupyter notebook plugin. I was able to get a notebook going and link the kernel to the IDE. The variable editor worked and I could debug code in Spyder and then paste it into the notebook. The notebook piece of it was good for graphics, widgets, markdown, etc.

Is spyder still super slow? I gave it up back in 2018 because of the (perceived) performance problems.

Hard to say as I am not a power-user/coder by any standard least of all those of this forum. I've tried Python on and off over the years and the Spyder 3.x/Jupyter combo was the closest I could get to the kind of UI that Matlab offers: Variable inspector, debugger, persistent/docked plots, documentation, recordkeeping, etc. It wasn't clear whether the Spyder/Jupyter plugin was going to be maintained in future Spyder releases and the combo, although close, was not as smooth as I would have liked.

Ultimately, Matlab is a better fit for the things I want to do in technical computing. My employer offers it and Simulink with a wide variety of toolboxes and blocksets so I can get farther faster for the problems that interest me or that I am asked to solve. The new table datatype and the steadily improving Livescript make exploration and notetaking very easy. I've also been able to rely on Mathworks documentation to get up-to-speed in new areas.

Re: Jupyter notebooks in the IDE: VS Code vs. PyCharm

#44
post #42
post #41

Earlier quoted context omitted.

You can publish them on github or mybinder as persistent self documenting interactive repl sessions. Then others can see what the code did, the intermediate results, and can easily play with it. (No "data science" here either, but into repl based instant feedback development & collaboratiove programming tools)

Oh, very cool. Sounds like something I’d love to use. I always loved the Clojure REPL.

Notebooks also inline visualizations more naturally than the repl, which makes them really nice for the data analysis workflow.

Re: Jupyter notebooks in the IDE: VS Code vs. PyCharm

#46
post #42
post #41

Earlier quoted context omitted.

You can publish them on github or mybinder as persistent self documenting interactive repl sessions. Then others can see what the code did, the intermediate results, and can easily play with it. (No "data science" here either, but into repl based instant feedback development & collaboratiove programming tools)

Oh, very cool. Sounds like something I’d love to use. I always loved the Clojure REPL.

Fun fact: you can use Clojure with Jupyter: https://github.com/clojupyter/clojupyter

(Jupyter supports "kernels" and there are also more non-Python language kernels that you can use)

Re: Jupyter notebooks in the IDE: VS Code vs. PyCharm

#47

Microsoft have released another IDE with notebook support called Azure Data Studio. It uses the same underlying code base as VS Code but is targeted at data driven tasks such as connecting to databases. Strangely, it uses a different jupyter notebook implementation to VS Code. I found it avoids some of the annoying bugs mentioned in another comment. It also introduces a SQL kernel which I’ve found useful for organisi…

> SQL kernel I've never heard this term before and a brief search for it did not bear any definitions. Can you expand on what exactly makes an SQL kernel?

Whilst jupyter notebooks are often synonymous with python code, the languages are actually pluggable by using a different kernel. Microsoft have implemented an SQL kernel which means you can write SQL queries directly in a notebook.

Re: Jupyter notebooks in the IDE: VS Code vs. PyCharm

#48

Earlier quoted context omitted.

I'm curious, what interactivity do you enjoy about notebooks that you find missing in IDEs? I find my situation to be quite the opposite. I love developing/writing code in Pycharm because apart from all the things it excels at (introspection, auto complete, linting, documentation, debugging, etc), it lets me easily prototype things in the interactive python interpreter (usually set to IPython), has an excellent varia…

Microsoft Visual Studio level of Edit and Continue has never been well implemented in open source tooling (with the exception of certain Common Lisp implementations that predate even visual studio, I suspect Turbo Pascal might have this feature too but I have never really used it). This is why most people have to resort to hacks like notebooks and repls with bad UX that spend most of the time spewing errors at the us…

Turbo Pascal never had it, which barely mattered as it was already damm fast on a 4 Mhz MS-DOS PC.

Not sure about Delphi though.

However, I would also point to Java, Smalltalk, Eiffel as another set of examples.

Re: Jupyter notebooks in the IDE: VS Code vs. PyCharm

#49
post #9

Needs more mention of emacs and org mode... :) I am curious to see the general workflow expanded on. I hesitate to think there is a single correct way to keep a notebook. Seems flexibility is the key feature. And is why text is so well used.

I haven't even gotten into org mode, I just edit Python using emacs and it works great. I can evaluate parts of the code and jump to the interpreter when needed. I keep a matplotlib window open with plt.ion() when running locally, or use plt.savefig() when running remotely and have a qiv window open that automatically detects new images. Works great.

The only thing I would like is to be able to use the Python interpreter _within_ the context of a function sometimes, it's annoying when an error occurs inside a function and I can't access the local variables.

I like jupyter notebooks too, but one of the things stopping me is that I can't use emacs features for editing ;)

Re: Jupyter notebooks in the IDE: VS Code vs. PyCharm

#50

I'm trying to implement these same features in my app, Repla, but without requiring an editor plugin, and instead having a view in a separate app that automatically updates via file-system events when you save. There's some more information here https://repla.app/live-coding.html It's an approach that I think has somes pros and cons relative to integrating these features into an IDE. The main argument for moving them…

I'm not on macOS, so I can't try it right now, but I've bookmarked this and will keep an eye on it. Basically the report/output view of Iodide/Jupyter without the "editor" view? I was really hoping something like this would come along.
Post reply on HN