Live data from Hacker News

Jupyter notebooks in the IDE: VS Code vs. PyCharm

towardsdatascience.com

21–30 of 62 posts

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

#21
post #17
post #11

Why are you using a notebook and an IDE? I thought the notebook UI was an alternative to the IDE UI.

Frankly I HATE web based notebooks. I do deep learning research, and I write a lot of complex functions to handle pre-processing. And with that there's a lot of debugging I need to do, particularly visual debugging of images. The interactivity of notebooks and the features of an IDE has made my programming experience much better.

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 variable viewer and even allows you to attach a debugger to your python interpreter and debug things on-the-fly.

I find myself able to prototype code a lot faster in that setting compared to a Notebook. Even with plots, plotting in Pycharm provides me an interactive plot I can zoom around in, which is not the default behavior in Jupyter. The only situations where I ever use a Notebook is when I need to share a Python "document" that isn't just a python script + results, but rather some form of extensive self-documenting code that could benefit from Markdown integration and co-location of output plots, etc. The other situation is some of their built in animation/interactive widgets (perhaps that is the interactivity you are referring to?). In most other cases, I've found it quite limiting compared to a good IDE like Pycharm/Code.

That being said, I think the efforts on Pycharm and Vscode's part to bridge this gap is commendable and quite interesting.

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

#22
post #11

Why are you using a notebook and an IDE? I thought the notebook UI was an alternative to the IDE UI.

What I'm working on right now is a perfect example. Mission: to write a Python program that parses. a file format that has no documentation. Create a folder for the project along with a data directory inside that has some of the files I need to parse. VS Code is my tool of choice, with the Python extension. Use its ability to run Jupyter to play with opening the files and parsing their contents. Experiment with some Jupyter. Get something running. Take my code and paste it into a module. Save the module, which I install locally in develop mode. Import the module into the notebook. Try what I just did against the file to make sure everything works nicely together. Keep going until the file format is completely figured out. Go on to the next challenge.

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

#23
post #11

Why are you using a notebook and an IDE? I thought the notebook UI was an alternative to the IDE UI.

The problem with notebooks is that they are not searchable and tracking code changes and creating libraries from them is not straight forward.

My approach is to combine the strengths of both IDE and notebooks. I put my code into a package that I edit with PyCharm. I import that code with the `%autoreload 2` magic in Jupyther to load data and test my functions. This way I get data persistency and plotting capabilities of the notebook and editing, etc capabilities of the IDE.

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

#25

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?

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

#26

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?

Not GP, but I think they are referring to https://github.com/jupyter/jupyter/wiki/Jupyter-kernels

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

#27
post #17

Earlier quoted context omitted.

Frankly I HATE web based notebooks. I do deep learning research, and I write a lot of complex functions to handle pre-processing. And with that there's a lot of debugging I need to do, particularly visual debugging of images. The interactivity of notebooks and the features of an IDE has made my programming experience much better.

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…

[deleted]

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

#28
post #17

Earlier quoted context omitted.

Frankly I HATE web based notebooks. I do deep learning research, and I write a lot of complex functions to handle pre-processing. And with that there's a lot of debugging I need to do, particularly visual debugging of images. The interactivity of notebooks and the features of an IDE has made my programming experience much better.

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 user. It is starting to come back with Flutter, React, and all the livereload stuff but you need a ton of work to get it to work on Python.

See:

https://news.ycombinator.com/item?id=16289856

https://news.ycombinator.com/item?id=21646240

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

#29
post #6
post #5

Earlier quoted context omitted.

What do you mean misses? The author mentions that exact combination in paragraph 4.

You're right, I missed that, thanks for pointing it out. I wish it had ranked high enough for a comparison though, seems to solve some of the issues raised (though perhaps causes others).

I strongly second the use of Atom + Hydrogen.

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

#30

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.
Post reply on HN