|
|
Log in / Subscribe / Register

Jupyter: notebooks for education and collaboration

Jupyter: notebooks for education and collaboration

Posted Feb 8, 2018 19:32 UTC (Thu) by marcel.oliver (subscriber, #5441)
Parent article: Jupyter: notebooks for education and collaboration

First: yes, the notebook is a great tool, especially the markdown-formatted text between cells. I have used it, mostly happily, for presentations and teaching. However, there are a few warts, some are a matter of principle, some specific to the implementation, that one needs to be aware of.

  • ipynbs are difficult to keep under version control. There are some hacks to ease the problem, but it's probably never going to be so easy and natural as compared to plain .py files.
  • ipynbs have implicit state. I have run into funny errors when debugging students' code in a lab that where ultimately due to the student having defined something unexpected and then deleted the offending code. So kernel restarts are a regular debugging necessity, but then it's important to keep the order of cells clean to be be able to "run all", which too often fails so that it's hard to get back to the point where the problem occurred. It also happens too frequently that the notebook output looks OK, but when the Teaching Assistant does a "run all" on a fresh kernel to verify the work, it fails and nobody has any idea of how to get it back. For this reason I have disallowed project submissions as ipynbs in "serious" scientific computing classes. (That said, it's very useful still in situations with students without strong programming skills.)
  • Last time I looked, plots could not be resized interactively, which is a major drawback as compared to the Mathematica notebook. There are other limitations, too, but this one feels the most limiting in actual use.
  • Jupyter does not support mouse-button copy-paste, which I personally find extremely annoying (but students and colleagues who grow up on other operating systems don't seem to mind...).
  • And last, startup profiles where removed from both ipython and jupyter, which is also annoying as I would like to setup shell aliases or script files to start a fully operational 'pylab' or 'sympy' session from the shell. So the inability to set up these and possibly more sophisticated session types automatically seems to take some of the advantage of the interactive nature of the notebook away.
But overall, I do find Jupyter very useful. Some of these issues come down to choosing the right tool for the job and others will hopefully be addressed in future Jupyter development.


to post comments

Jupyter: notebooks for education and collaboration

Posted Feb 9, 2018 21:15 UTC (Fri) by efiring (guest, #4543) [Link]

Regarding your third item: If you use "%matplotlib notebook" instead of "%matplotlib inline" your embedded plots will be fully interactive--you can resize, zoom, etc.--until you close the figure either programmatically or via the "stop interaction" button in the upper right-hand corner. Alternatively, you can use "%matplotlib qt" (for example, assuming you have PyQt5 installed) to generate each plot in its own independent window, outside the browser. This provides more speed and flexibility while developing the notebook, but saving the plots as embedded in the notebook or in an export requires restarting the kernel and re-running with "notebook" or "inline" in place of "qt" in that initial "magic" directive.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds