The article really makes me think either I or the author have a terrible misunderstanding about what notebooks are or how to use them.
Notebooks Are McDonalds of Code
131–140 of 153 posts
Re: Notebooks Are McDonalds of Code
#132Notebooks are primarily a _teaching_ tool, not code or an experimentation interface. I know that's not how they're used, but it's really bizarre to me that people use them for exploratory data analysis. They're great for teaching and for _documenting_ the results of exploration, but fairly bad for any type of interactive data exploration, let alone actually writing code. Frankly, notebooks are pretty terrible for exp…
The issue with CLI is it's crap for editing the code. It's rare that your data analysis will just be one-liners, it'll be some mess of steps and you want to go edit one in the middle (but not re-run the whole script). That's the first thing that the notebooks give you that you don't tend to get elsewhere. The second thing is the presentation of the plots: it's really handy to have multiple interactive plots laid out…
And that's why I use elpy to execute codeblocks marked by comments in IPython. VSCode supports this workflow out of the box (but you don't get the matplotlib windows out of the box ;)) - although it is very, very liberal in using screenspace...
> One big thing that any replacement will need is the easy ability for the code to actually be running on a remote machine
VSCode remote (proprietary sadly). Also tramp + SSH-X-forwarding likely beats whatever ergonomics jupyterlab offers.
Re: Notebooks Are McDonalds of Code
#133Re: Notebooks Are McDonalds of Code
#134I sat there reading through this thing, staring at my, spiral bound, paper notebook being utterly confused at what in the hell he was talking about.
I took a random comment, here, saying it for me to realize what was going on.
Re: Notebooks Are McDonalds of Code
#135Notebooks are primarily a _teaching_ tool, not code or an experimentation interface. I know that's not how they're used, but it's really bizarre to me that people use them for exploratory data analysis. They're great for teaching and for _documenting_ the results of exploration, but fairly bad for any type of interactive data exploration, let alone actually writing code. Frankly, notebooks are pretty terrible for exp…
Not sure if this is sarcastic or not... I've taught and worked with some of the biggest companies in the world. They were using Jupyter and sound EDA to great effect.
It's not that they're not a good tool, it's that they're the wrong tool for a lot of what they're used for. They're an excellent teaching and documentation tool. However, they're remarkably bad for actually doing any type of analysis or exploration. They're a great way of presenting your analysis after you complete it, but they're bad for actually doing that analysis. Write analysis code and data exploration code using the same tools you would for production code. There's nothing wrong with an edit + run + explore loop. Do that with a standard REPL like ipython + your preferred editor.
But there's a lot wrong with trying to use a notebook to write and execute code, as it: 1) encourages writing code that won't actually run later (dependent on non-linear code execution and unsaved changes made to earlier cells), and 2) is a poor environment for writing code compared to more full featured editors or IDEs, and 3) discourages interactivity and data exploration due to being browser-based (poor performance compared to running directly limits interactivity during data exploration).
Your data analysis work needs to actually run independently later. Notebooks rarely do unless they're re-made from scratch. At that point, you're better off working in a more full-featured environment for the exploration phase and then using the notebook as later documentation / communication.
Re: Notebooks Are McDonalds of Code
#136Notebooks are primarily a _teaching_ tool, not code or an experimentation interface. I know that's not how they're used, but it's really bizarre to me that people use them for exploratory data analysis. They're great for teaching and for _documenting_ the results of exploration, but fairly bad for any type of interactive data exploration, let alone actually writing code. Frankly, notebooks are pretty terrible for exp…
The issue with CLI is it's crap for editing the code. It's rare that your data analysis will just be one-liners, it'll be some mess of steps and you want to go edit one in the middle (but not re-run the whole script). That's the first thing that the notebooks give you that you don't tend to get elsewhere. The second thing is the presentation of the plots: it's really handy to have multiple interactive plots laid out…
Jumping into the middle of a script and editing is often a bit dangerous. You usually wind up with something that can't be reproduced, as it depends on modifying state in a way that wasn't recorded. You do often need some sort of caching during exploration, for sure (it's not really feasible to wait an hour every time you want to tweak a visualization), but it's often better to break pipelines up a bit and do disk I/O rather than leaning on cells in a notebook.
I do agree on the remote client part, though. Browser-based interactivity often is a good solution for a dev instance + a local thin client. It's slower than native for a local solution, though.
Re: Notebooks Are McDonalds of Code
#137Earlier quoted context omitted.
In general anything written by nonprofessional programmers in pursuit of some other goal is terrible code by professional programmer standards. On the other hand, it accomplishes a goal other than getting a programmer paid. So in one important sense is objectively better than probably 80% of the code I've seen people paid to write, no matter how nicely it was constructed.
This is the crux of a lot of the anti-notebook rhetoric. I spend a good deal of time covertly teaching software engineering best practices to folks who claim they don't want to be "software engineers", yet they are in front of Jupyter most days.
Re: Notebooks Are McDonalds of Code
#138Some of the worst code I've seen in my life lives in Jupyter notebooks. But that's fine, it's meant to be throwaway code. The problem is a lot of places/people do not use it as such .
Idk how you'd use one for non-throwaway code. Not like a webserver can run a routine in a notebook.
Re: Notebooks Are McDonalds of Code
#139The article should start with more context, what is a notebook ? I know what it is, but the author is particularly bad at introducing his article.
Re: Notebooks Are McDonalds of Code
#140Earlier quoted context omitted.
Not sure if this is sarcastic or not... I've taught and worked with some of the biggest companies in the world. They were using Jupyter and sound EDA to great effect.
So have I (not FAANG, though). I've been working in scientific python for over 20 years and long before notebooks came to the python world. (Yes, pre-numpy) And I've seen notebooks abused far more than used well. The same general thing was heavily abused in Matlab/etc too. It's not only Jupyter and it's not new. It's not that they're not a good tool, it's that they're the wrong tool for a lot of what they're used for…