by tchaffee · 6y ago · 0 comments
Really? I seem to shoot myself in the foot a lot with jupyter notebook. I can't count the number of times my snippet was not working and it was because I was reusing some variable name from some other cell that no longer exists. The amount of bugs I get in a notebook is ridiculous. Of course, I'm probably using it wrong
Jupyter notebooks are painful to read, the allow you to do silly stuff all too easily, they’re nightmarish to debug, don’t play well with git, and almost every. Single. One. I’ve ever seen my teammates write eschewed almost every software engineering principle possible.
You’re not using them wrong, they shepard you to working very “fast and loose” and that’s a knife edge that you have to hope gets you to your destination before everything falls apart at the seams.
I agree, and this is why I built -
- ReviewNB - Code review tool for Jupyter notebooks(think rich diffs and commenting on notebook cells)
- GitPlus - A JupyterLab extension to push commits & create GitHub pull requests from JupyterLab.
That’s my issue with Jupyter notebooks, between them and Python they implicitly encourage you to take all kinds of shortcuts and hacks.
Yes, it’s on my teammates for writing poor code, but it’s on those tools for encouraging that behaviour. It’s like the C vs Rust debate right: yes people should write secure code, and free their memory properly and not write code that has data races in it, but in the majority of cases, they don’t.
a) ugly, unlabelled plots
b) including tons of uninteresting code that labels the axes (etc)
c) putting the plotting code into a separate module.
There are some extensions that do help with this, but extensions also kinda defeat the whole purpose of a notebook.
There are a ton of tools trying to fill this void, and they usually provide things like the comparison of different metrics between models versions, which git doesn't provide.