Live data from Hacker News

JupyterCon: I don't like Notebooks [slides]

docs.google.com

71–80 of 112 posts

Re: JupyterCon: I don't like Notebooks [slides]

#71

Earlier quoted context omitted.

I've worked with a few people who are software engineers -> data scientists. They were great at bringing good coding / database practices into the team. That said, their lack of formal statistics training was definitely a problem from time to time, and they seemed to show as much disregard for it as data scientists have for engineering practices (at least the ones talked about on this thread). This can be equally dam…

Dealing with code (including tests and versioning) is on the same level as knowing the basic math notation. Should be embarrassing to not to apply the practices. The only problem is that these good coding practices aren't that exact, and tend to go on and on all the way to infinity.

I agree, many (most?) data scientists spend most of their time coding, it's ridiculous how little time they're willing to hone this skill.

Data science practices are similarly inexact - a lot of good decision making comes from experience, knowing when to apply each tool to a specific problem, when to just throw in a hack etc.

Re: JupyterCon: I don't like Notebooks [slides]

#72
post #32

I absolutely love Jupyter as a computer science student who uses it a lot to fiddle with new concepts, create visualizations, or write markdown reports with annotated code. I do agree with some points, though. The problems with state felt sort of overstated (heehee), but it obviously is an issue. I always wonder why the menu option Kernel -> Restart & Run All is not a first class citizen, with a big red button at the…

> I also wish the notebooks diffed better when it comes to SCM, without all the JSON artifacts. This is one of my biggest qualms as well. I built a DevOps tool [1] that uses Notebooks & not being able to diff and review Notebooks was a pain. I have decided to solve it with a GitHub marketplace app. Wrote more about it here: https://medium.freecodecamp.org/how-to-handle-version-contro... [1] https://nurtch.com

Might want to use the full url [0] when sharing your work - the one you linked gives me problems with the ssl cert.

[0] https://www.nurtch.com/

Re: JupyterCon: I don't like Notebooks [slides]

#73

I seriously cannot agree more. Jupyter notebooks were fun to use for a bit, then I hit the inevitable wall of "ok, now let's turn this into a real, properly built script, but now everything is breaking for inexplicable reasons". Notebooks are fine for early stage experimenting, but if you've got to the point where you start up you are relying on a notebook for anything, or your workflow consists of "start up notebook…

I don't even like it for initial experimentation and exploration. Much prefer the command line repl (the jupyter/ipython one). Faster feedback and easier navigation then you can just export the history when you're ready to capture and make permanent some workflow. It still requires going through and picking out the important bits, but reading the history like a story of commands is generally enough to pick out the important parts.

The only thing I would use notebooks for is demonstration / teaching.

Re: JupyterCon: I don't like Notebooks [slides]

#75
This was great, bravo! While I am not necessarily the audience intended. I've been following some Notebook development. I have always thought of it as convoluted and pedantic. I don't mean to distract from some very solid and well intentioned work. Just that it added a layer of complexity and turned out not to be as portable as advertised.

Re: JupyterCon: I don't like Notebooks [slides]

#77
Notebooks may be suitable for scratching things, but not much else. The problems noted by the OP are very serious, specially in the scientific world, where many do not have proper software engineering skills. The real issue is that newcomers do not know better, and so they don't realize the damage they're inflicting upon themselves and others before it's too late (irreproducible code, hidden states, dep. management, etc).

Even the fast.ai library, which is a wonder, has broken notebooks. For those who try to follow the course at home, trying to run the notebooks is frustrating, as things are out of order and so errors pop up all the time. Jeremy is a wonderful teacher, but compare following a Fast.ai course video, which uses notebooks, to following a python video from, e.g., Raymond Hettinger [2], which uses sphinx and a shell. While the documentation style and ugly shell don't look nearly as cool, they are so much clearer and better structured.

Notebooks become popular because they fill one gap that was left uncovered. As the scientific community moves away from Matlab into Python and R, reading code - pushed, amongst others, by the popularity of Github - becomes a day-to-day activity. Matlab scripts were easily explorable because users would load them, set breakpoints here and there, and look at results interactively - exactly what notebooks aim to provide. The difference is that what used to be breakpoints now become cells, comments now turn into Markdown and figures are inlined to add an extra layer of convenience. Yet all the awful problems of sloppy Matlab development are now masked, marketed as something fancy and start to pollute the Python dev. environment. Reproducibility and testing are gone, dependency management (which is not required for Matlab) breaks down completely, documentation is non-existent, and sharing becomes heavily constrained.

Notebooks may be suitable for scratching things, but not much else, at least nothing serious. Hopefully the slideshow above gets the attention it deserves. And in all cases, kudos for the Jupyter dev team for fighting the good fight, even with the drawbacks of their experiment.

[1] http://course.fast.ai/lessons/lesson3.html [2] https://www.youtube.com/watch?v=9zinZmE3Ogk

Re: JupyterCon: I don't like Notebooks [slides]

#78
post #47
post #39

Earlier quoted context omitted.

If I want to get a laugh I go to stand up comedy show, theater, cinema,... not to a developers conference.

Well, others don't compartmentalize things so tightly. Most would welcome one or more jokes in a developer speech. So much so, that it's common advice for any kind of public speaking and presentation to add a few jokes to lighten the mood (you can find thousands of articles, books, and public speaking training sessions advising about this). Some of the best technical speakers add humor in their presentations (often l…

[deleted]

Re: JupyterCon: I don't like Notebooks [slides]

#79
RMarkdown have all the advantages of notebook and without most of its problems.

- code and document mixed. You have full markdown syntax, chunks, titles, table of contents. You can also convert RMarkdown into a script with comment if you need.

- To render a RMarkdown, it will run in a separate environment, start from scratch. It's assumed you should make it reproducible, this is good for report/sharing.

- I also use RMarkdown to write code, and run code/code chunks interactively in a session. I can write plan, notes, references, TODO in document, test code in chunks, execute code chunks in any order. Basically you just code and document. In the end you can turn it into a report, or refactor the tested code into functions and scripts. I kept the original RMarkdown as design document, which have all the original notes and previous version of code.

- It's plain text so version control is fully supported.

RMarkdown started to support python, but it may be preliminary for now.

Re: JupyterCon: I don't like Notebooks [slides]

#80
post #60

I have tought Python with notebooks to scientists and we always emphasize the pipeline: Play with your code in the notebook, when you know what the right way to split it is, turn cells into functions. When you have a decent body of functions turn them into a module. Notebooks excel as ad hoc interfaces to libraries and modules. They don't replace them. I'm not sure the problems with scientists' code are enabled by no…

This seems like a decent progression for easing beginners into the basics of good programming practices.

It's certainly not a Jupyter problem per se. I went through a similar progression when I learned BASIC in high school, in 1981. Projects grow to a size where they become unmanageable without some structure.

In my view, the importance of documentation is huge. I've been programming for a long time. I don't write software. I use programming as a problem solving tool. Jupyter has made a profound difference in my ability to pick up work that I did a month ago, or years ago, and figure out what I did, mistakes and all. For me it's more about reproducible problem solving than software development.

Post reply on HN