Live data from Hacker News

What’s wrong with computational notebooks?

web.eecs.utk.edu

121–130 of 223 posts

Re: What’s wrong with computational notebooks?

#121
post #44

I have been heads down in jupyter for the past couple of weeks and I finally realized I just DO NOT LIKE IT AT ALL ! Cracks started appearing and then suddenly there was an avalanche of disappointment. The first crack -- it's almost impossible to build a nice presentation in Jupyter, because you always have to show your code and its stderr. I imported all the TeX goodness, and it looked pretty nice, but I couldn't sh…

>it's almost impossible to build a nice presentation in Jupyter, because you always have to show your code and its stderr.

You should be able to see a blue vertical bar to the left of every code cell. Click that bar to collapse the cell. You can do this for both the code and the output. I know this works for Jupyter Lab, but I don't know about legacy notebooks.

Re: What’s wrong with computational notebooks?

#122

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

I think adding feedback for marking cells as dependant on each other might be a good idea.

I'd also love code completion in notebooks.

I think the cleaning and code reuse problems can easily be mitigated by putting functions into libraries and using auto reload.

My normal workflow is hack something in a notebook until it runs, then refactor and put in a library I import with auto reload. I work on production ML and I use this for both software development and research.

Re: What’s wrong with computational notebooks?

#123

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

I think adding feedback for marking cells as dependant on each other might be a good idea. I'd also love code completion in notebooks. I think the cleaning and code reuse problems can easily be mitigated by putting functions into libraries and using auto reload. My normal workflow is hack something in a notebook until it runs, then refactor and put in a library I import with auto reload. I work on production ML and I…

And when initially prototyping new code I'd also normally have both code editor and notebook up at the same time.

Re: What’s wrong with computational notebooks?

#125

As a computer scientist/software engineer, please allow me the question: Why would I prefer a notebook over e.g. equivalent python script(s) in a git? I first saw jupyter notebooks when my sister (physicist, non-programmer) used it for analyzing economical data with pandas. Run-time for the full data set was half a day (and IMHO for that analysis SQL would have been better suited). I understand that as a non-programm…

The main reason is that one has to fiddle with the code a lot and re-running the whole thing is much too slow.

A common example is that a huge text file containing experimental data gets parsed in the beginning. Then you have to explore the data step-by-step using all kinds of visualization and analysis such as Fourier transforms, curve fitting, etc.

If you simply put everything into one giant python script, for every step you have to re-run the entire thing which takes forever. Of course you can speed things up by writing intermediate results to disk, but this adds tons of boilerplate code and is quite error prone.

One alternative would be to write individual scripts for each step and read them into an interactive REPL shell. However, then you still have to somehow record the proper execution order if you ever want to repeat the analysis.

Re: What’s wrong with computational notebooks?

#126
Notebooks are bad and unreliable. You are repeating your code all the time, you are limited to work with smaller datasets. If you are into visual data analysis use Orange or other similar data mining tools. We allow usage of notebooks only for presentation purposes.

Re: What’s wrong with computational notebooks?

#127

I interned @ Google AI last summer; used notebooks nearly everyday. Estimated productivity gain is 3-5x. Biggest tip I have is to turn auto reload on, then write the bulk of your code as modular functions and call functions within your notebooks. Keeps the notebook tidy and it’s easier to push your code this way. It’s also easier for sharing since most people viewing your notebooks (mentors, people outside your team)…

Beware perceived gains that (1) benefit you at the detriment of others or (2) have hidden costs exposed at a later stage.

Re: What’s wrong with computational notebooks?

#128

I interned @ Google AI last summer; used notebooks nearly everyday. Estimated productivity gain is 3-5x. Biggest tip I have is to turn auto reload on, then write the bulk of your code as modular functions and call functions within your notebooks. Keeps the notebook tidy and it’s easier to push your code this way. It’s also easier for sharing since most people viewing your notebooks (mentors, people outside your team)…

Yes, notebooks are good for studying.

Re: What’s wrong with computational notebooks?

#129
post #96

Earlier quoted context omitted.

> Co-author of the study here. Let me know if you have any questions or how you overcome some of the problems we identified! It's not clear who the audience is. It sounds like most people who complain about them are software people and not researchers/scientists. For someone like me, who once did computational research using MATLAB, and later analyzed data for my job, Jupyter is not worse, and is in most ways superio…

Why so defensive?

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 section of documentation.

Kudos for looking at real people's work and surveying it.

I wonder how much workflow could be improved if researchers would be temporarily paired with developers - who are generally better at modularising and removing friction in their work.

Personally I believe that a bit of clean-code discipline and following known best practices could solve couple of those pain points.

It's also true some could be improved by rethinking how notebooks work; ie. being able to specify input/output of notebook so it can be used as a library; detaching runtime data from the code so it plays better with version control/publishing; maybe even more radical ideas like adding visual/flow view that helps with linking elements; adding built-in excel-like sheets that can be queried/manipulated could also be interesting; built-in, first class support for relational database (sqlite) could also be a big win.

There are many interesting developments happening in this space and there seem to be some unexplored ideas waiting to be tested out.

Re: What’s wrong with computational notebooks?

#130
post #109

Earlier quoted context omitted.

> With a notebook, you get the chance to load the data, view it, clean it where needed, view it again, analyze it, model it and do anything else you need to it. In a good data-oriented IDE like RStudio you get to do all of those things and write code which can be saved as plain text and can be version controlled well under git which you can't do well with Jupyter. R folks have to be the best indicator in this case be…

Yes! Rstudio is the one thing I miss most when doing datascience in python. Notebooks give me some of the interactivity but the experience degrades significantly. The spyder IDE seem like an okayish replacement but some of the library I use expect you to have html display (within a notebook) to give you full functionalities which is not yet available in spyder.

Have you tried Orange. It has scripting capabilities.
Post reply on HN