JupyterLab
jupyterlab.readthedocs.io
jupyterlab.readthedocs.io
As someone who switched from Notebooks to script style coding for all of my data science, I couldn't a) agree more with most of his points and b) be happier that I made the switch.
Whenever I've had to use notebooks, if I make a change, I just run it top-to-bottom as if it were a script, and try to push as much of the important code as possible into a packaged library. And all of this experience has been with JupyterLab, which doesn't seem to address any of the concerns in this slideshow.
The simple fact that I can't F12 to go to the definition of a function makes doing anything serious with notebooks a chore compared to a real IDE. Missing static analysis, indentation control with tab, and moving lines with shift-up/down, and quick refactor tools are also nuisances that leave no reason to use notebooks over a real editor like PyCharm.
Netflix begs to differ: https://medium.com/netflix-techblog/notebook-innovation-591e...
That slide #143 though is perfect. I'll have to send this around.
alternately, think about who you are writing code _for_. If it's for yourself or other people, mixing code, graphics and text is a really good idea. If you are writing code for computers you will prefer other workflows. Complaining that a workflow that is useful for one community doesn't work for your community is pointless - try going 1 or 2 levels up in your abstractions.
worst problem: social one, people justifying idiotic principles (incoherent state because it's not software engineering)..
that said notebooks are probably way better than previous state.. people were writing god knows what with unreasonable state pushed onto the FS and whatever
did notebooks improved since ?
But I don't have a satisfactory solution to handle the problem where Step A takes a few minutes or longer to complete and so I don't want to keep re-running it while coding Step B. I resort to copy-and-pasting Part B into ipython which amounts to being a poor-man's notebook. Obviously the "correct" answer is to write out the results of A to disk but this is can be a lot of a pain while you're developing! (Eg: loading an excel sheet in pandas is slow, while the equivalent tab-separated sheet is very fast, but I don't really want to have a separate step pre-processing all excel sheets into tsv files.) Also, pandas to_csv/read_csv functions aren't even inverses of each other (they lose the index) so writing to desk requires extra steps. (And from_csv is deprecated.)
What I'd rather have is "half" a notebook where I can checkpoint a computation part way through and restart from there. But only ever proceed linearly through the code to avoid notebook out-of-order confusion.
While it has my pain points (it shouldn't be the only environment!), show me a better alternative to interactive data exploration and sharing it?
* Always run notebooks from the top
* Split non-trivial reusable code to modules
* Only use Jupyter for examples with pretty pictures
That said, Jupyterlab has growing pains. Things like ipywidgets that used to Just Work now Just Don't -- if you want to use widgets as seen in the screenshots, you have to separately install npm, learn to grok the jupyterlab extension manager, and surf the version compatibility matrix between the backend ipywidgets you have installed and the frontend ipywidgets you have installed. Sigh. I'm sure it'll iron out in time, but every time I see the screenshot with widgets in it I have to clear my throat.
Actually, I hate python now because of this. I would kill for a proper tool for implementing requirements.txt like package.json(yarn) or pom.xml(maven) that worked on jupyter by defining a base image similar to docker. Pip+virtualenv just seems like a half-attempt
It's not got support for simple code/header folding yet. That's an issue.
I can't help but feel that a visualization window + a cacheResult(data, fileName) function would be superior to what Jupyter can ever hope to be
The interface also reminds me of RStudio somehow.
My own preference is to only use notebooks as an exploratory tool, debugging tool, or to make presentations. For any longer code or serious project that I'll write I'll stick to my traditional editor (emacs/vim/etc.). Call me old-fashioned?