Live data from Hacker News

What’s wrong with computational notebooks?

web.eecs.utk.edu

141–150 of 223 posts

Re: What’s wrong with computational notebooks?

#141
post #26

Earlier quoted context omitted.

My problem with notebooks is that I feel like the natural mental model for them is a spreadsheet mental model, not a REPL mental model. Under that assumption, changing a calculation in the middle means that all of the cells that depend on that calculation would be updated, but instead you need to go and manually re-run the cells after it that depend on that calculation (or re-run the entire notebook) to see the effec…

I keep seeing the complaint about state and I am getting sick of it. JUST HIT "RESTART KERNEL AND RERUN ALL CELLS," HOW HARD CAN IT BE?

Why are you even using notebooks at all then?

Re: What’s wrong with computational notebooks?

#142
Direct link to the preprint: http://web.eecs.utk.edu/~azh/pubs/Chattopadhyay2020CHI_Noteb...

Interesting study, I like the mixed-method approach. A quick glance at the industry of the participants suggests that there might be a bias towards structural data (which I think is actually acceptable as that makes up a huge chunk of the non-academic ML-Notebook work) Edit: The authors acknowledge this in the "Limitations".

Re: What’s wrong with computational notebooks?

#143
post #41

This is a great list, and totally matches my experience. I also agree this is solvable with tooling. A) VS Code / IDE needs to be the primary editor B) Results are not stored with source C) Export (build) allows packaging for whatever platform. Python notebooks especially also use some crazy mutable APIs. In general notebooks align with other code written by people who aren’t usually software engineers building produ…

Logging, monitoring, security, versioning, etc. These are things that most often get ignored due to ignorance or inexperience, but are required for production grade software.

Re: What’s wrong with computational notebooks?

#144
I think it's easy to do notebooks wrong, but possible to do them right. I try and do quick prototyping in notebook cells before moving it off to a separate .py file, and avoid keeping any code that does anything other than visualisation or parameter setting inside a cell long-term. That way, if you need to run something "in production" (whatever that means in your context), you don't end up having to pick apart and re-write your code -- you just import the .py file you wrote along the way.

For me, notebooks are a super handy way of visualising and sharing results during meetings, and it's difficult to imagine a more convenient alternative.

Re: What’s wrong with computational notebooks?

#145

I love jupyter notebooks. Without them, I wouldn’t have been half as productive as I was during my PhD. Here’s a post I wrote just a few weeks ago describing some of the conventions that I established for myself over the course of 5 years: https://jessimekirk.com/blog/notebook_rules/ I suspect that a lot of the conventions I describe help mitigate problems described here, some of which should be strictly or optionall…

Thanks for this! Didn't know about the watermark extension, that looks useful.

I just started working with the Guix kernel for more easily reproducible and reusable notebooks. I suppose that's an alternative to using a conda environment.

See here for an example: https://gist.github.com/jboynyc/5d0319f33e71427aa42a98c1a3a9...

Re: What’s wrong with computational notebooks?

#146
post #107

Earlier quoted context omitted.

I keep seeing the complaint about state and I am getting sick of it. JUST HIT "RESTART KERNEL AND RERUN ALL CELLS," HOW HARD CAN IT BE?

If you have a few long data loading and preprocessing steps it's a pain to wait for them to run again, people try to avoid it. When something odd begins to happen, they don't immediately consider the possibility that it's not their bug and waste time trying to 'debug' the problem instead of just rerunning the notebook.

Would it be a solution to store intermediate computations to an in-memory or disk database like Redis, SQLite? It is a matter of few minutes to run a docker instance and write simple read / write + serialize Python util functions?

Re: What’s wrong with computational notebooks?

#147

Co-author of the study here. Let me know if you have any questions or how you overcome some of the problems we identified!

Why did you not include Org Mode among the Computational Notebooks that you surveyed?

We use it exclusively for our Data Science and find that it ameliorates all of the pain points you highlight in your article.

https://orgmode.org/

Re: What’s wrong with computational notebooks?

#148
post #13

I think Atom’s hydrogen and VSCode’s python are best-in-class Jupyter clients that achieve everything Jupyter Lab set out to do with more and better features. I develop scripts that function top to bottom with a notebook side-by-side that on a keyboard stroke executes code blocks from my script in the notebook.

For those that do not know it, vscode is great for Jupyter Notebooks.

https://code.visualstudio.com/docs/python/jupyter-support

Re: What’s wrong with computational notebooks?

#149
post #97
post #92

Earlier quoted context omitted.

That only works after the code in the module is largely "frozen". It doesn't work well if you're experimenting with ideas inside the module. OTOH, if the algorithm is largely frozen, and you're trying to experiment with its performance on a bunch of examples, the workflow of putting the algorithm in a module and using a notebook to interface with data and visualize results is quite useful. That is basically what I me…

Why doesn't work with experimenting with the module? In jupyter, if you're using auto reload then the module will refresh every time you use it.

I guess the objection is that if you what you are experimenting is inside a module, you've moved the "active" code out of the notebook, and then given up the interactiveness.

Re: What’s wrong with computational notebooks?

#150
post #139

Earlier quoted context omitted.

Maybe because of the negative sentiment/bad taste statements like "What's wrong with..." leave. It could say "What can be improved with ... in 2020" instead. Probably not intention of the author but it comes as non-constructive crtiticism/"not recommended to use" a bit too much. Some observations seem to not be directly related to notebooks per se. Other feel like could be made as just entries in a FAQ/best practices…

"What's wrong with ..." for me literally means "What should be done about ..." or "How to make ... better". I found your defense, which basically just says "It wasn't better before - so, no critique allowed?", considerably less valuable than the article.

IMHO "What's wrong with ..." in colloquial use usually means "Here's a bunch of reasons why you shouldn't use ...".
Post reply on HN