Live data from Hacker News

Jupyter notebooks in the IDE: VS Code vs. PyCharm

towardsdatascience.com

31–40 of 62 posts

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

#31
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…

I do something similar, but I also check in my notebooks with all the output cells cleared. It’s not perfect but I can see what changes between commits.

While most of my code is in my modules, I still like having the actual notebook versioned.

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

#32
post #24

I can’t help thinking that notebooks would be less relevant if people embraced unit testing more

I don’t think they are very related, aside from both being useful.

I use primarily for doing stepwise development. I also use them for a decent way to see the output of my code, usually tables and charts.

I have unit tests for the various modules and classes created.

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

#33
post #14
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'm curious if there is an objective breakdown of emacs org mode and other methods. I'd suspect emacs penetration is not terribly high due to initial learning curve.

I'm sure you're right about penetration, but I've found EIN [1] very usable, and particularly like the org support.

[1https://github.com/millejoh/emacs-ipython-notebook/blob/mast...

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

#34
post #11

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

I keep trying VSCode and Jupiter Labs every so often and yet I keep going back to the old Jupiter Notebook web UI. It’s getting better but it’s still not as good. For example, just the way VSCode displays a Pandas dataframe when you do something like .head() just isn’t as nice as Jupiter Notebook’s output. Anecdotally I’ve been developing software for 2 decades from C, Java, all the web crap, using Vim, IDEs, etc. and I _still_ prefer Jupiter Notebooks (not Labs, it sucks) over anything in terms of just how quickly you can iterate. With Vim keystrokes plugin and Black plugin I feel very comfortable.

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

#35
post #7
post #3

Anyone else noticed that when editing a notebook in VS Code, one could lose unexecuted edits to a cell with accidental arrow key input (that defocuses the current cell and erases changes)? Too many times I have lost a paragraph worth of Markdown text midst typing, it’s kind of maddening.

Yep - it's very annoying but for me it only happens with markdown cells? So now I generally select all and copy now before leaving a markdown cell if I've edited it. The other issue is the language server seems to get into a funk regularly - the completion stops working as does the display of docstrings so I regularly use the "Developer: reload window" feature to reset everything. Also the plots view is poor - it's b…

Fyi VS Code is working on[1] native first-class notebook support, which should make the experience of using a notebook much better. Notebooks right now stretch the bounds what extensions can do, particularly in that they can't use the VS Code's own text editing services, so things like vi mode aren't inherited.

(Disclaimer: I work on VS Code, but am not working on notebooks)

1. https://github.com/microsoft/vscode/issues/88243

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

#36
post #7

Earlier quoted context omitted.

Yep - it's very annoying but for me it only happens with markdown cells? So now I generally select all and copy now before leaving a markdown cell if I've edited it. The other issue is the language server seems to get into a funk regularly - the completion stops working as does the display of docstrings so I regularly use the "Developer: reload window" feature to reset everything. Also the plots view is poor - it's b…

Fyi VS Code is working on[1] native first-class notebook support, which should make the experience of using a notebook much better. Notebooks right now stretch the bounds what extensions can do, particularly in that they can't use the VS Code's own text editing services, so things like vi mode aren't inherited. (Disclaimer: I work on VS Code, but am not working on notebooks) 1. https://github.com/microsoft/vscode/iss…

Cool. A while ago I wanted to report bugs wrt notebooks but the bug reporting flow asked me to turn off extensions, and after turning off extensions notebooks no longer work, so I didn’t even know where to report the bugs.

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

#37
post #36

Earlier quoted context omitted.

Fyi VS Code is working on[1] native first-class notebook support, which should make the experience of using a notebook much better. Notebooks right now stretch the bounds what extensions can do, particularly in that they can't use the VS Code's own text editing services, so things like vi mode aren't inherited. (Disclaimer: I work on VS Code, but am not working on notebooks) 1. https://github.com/microsoft/vscode/iss…

Cool. A while ago I wanted to report bugs wrt notebooks but the bug reporting flow asked me to turn off extensions, and after turning off extensions notebooks no longer work, so I didn’t even know where to report the bugs.

Jupyter Notebooks today are handled by the Python extension, which is a separate codebase and team from VS Code. You should file issues there: https://github.com/Microsoft/vscode-python

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

#39
I see this, and I cannot help but think, hey, one step closer to achieving the plain-text goodness magic of the R Notebook. But maybe I'm being too sassy. Its just that every time I pick up Jupyter I think, what is this clumsy thing? I know people love it, but that's how I feel. I wish pycharm had the in-line capabilities of the R Notebook, because I really like pycharm.
Post reply on HN