6 ms·
I really wish the data science/algo community weren't going in the direction of Jupyter/Notebooks. It's an atrocious experience from a development standpoint, s
by qsort 6y ago
I really wish the data science/algo community weren't going in the direction of Jupyter/Notebooks.
It's an atrocious experience from a development standpoint, several steps backwards from even just editing code in Windows notepad.
With that said, this project looks amazing. Interactive/interpreted C/C++ would be great to have even outside of data science applications.
- stingraycharles 6y agoI think the whole selling point of notebooks is their literate style, and it being a kind of collaborative, shareable scratch pad. I’ve done so many demos and pitches of ideas with notebooks, it’s a super useful tool for story telling and reproducible tutorials. Having said this, for anything that goes even slightly in the direction of production (like some kind of model training and/or processing pipelines), you should absolutely not use it.
- qsort 6y ago> I think the whole selling point of notebooks is their literate style... I get this angle and I agree to an extent, demos/throwaway code is where they really shine, but I don't entirely buy the "literate" aspect (disclosure: I assist in some DS tasks but I'm mostly a developer, so that might skew my perspective). Knuth's WEB, love it or hate it, was at least arbitrarily and easily composable, notebooks on the other hand have hidden state and plenty of footguns even for those who are already familiar with the language. It's basically impossible to compose notebooks in any meaningful way. I think you could make the idea work (or at least work better) with a purely functional language, say Haskell, instead of Python. Purely functional semantics are more amenable to natural interpretations closer to the Notebook format than an OOP.
- stingraycharles 6y agoJust a random example I encountered the other day, take a look at this: https://github.com/huggingface/transformers/blob/master/notebooks/02-transformers.ipynb https://github.com/huggingface/transformers/blob/master/note... It’s a tutorial on how to use some NLP ML library. It’s a pretty excellent example of where this format shines, imho, and as you can see it’s absolutely literate. Btw I also identify as primarily a developer, but over the past few years been confronted with these notebooks more and more and I’ve learned to appreciate their use over time. But as with all good things, they’re sometimes overused.
- cashsterling 6y agoThis is one of the selling points of Pluto.jl for Julia... less hidden state for interactive coding. https://github.com/fonsp/Pluto.jl https://github.com/fonsp/Pluto.jl
- krapht 6y agoThe one thing about Pluto that turned me off is that when you export to PDF it puts an advertisement in the header and footer for Pluto. It was embarrassing to send my work to non-technical people.
- nerdponx 6y agoThe whole accusation of hidden state makes no sense to me. Jupyter Notebook has "restart & run all" button. It's no different from keeping a REPL open all day. If you don't restart your REPL before re-running your program, you have at least as much of a hidden state problem as any notebook. And don't get me started on spreadsheets. Composability... eh. You can run a Python notebook from the command line just like a Python source file. You can even run one notebook from another, or "compile" the notebook to Python source and import from it. But that somewhat of an "off-label" use to me. The idea is not to be a general-purpose literate programming tool, although it turns out to be pretty close to one. It's a notebook, like a lab notebook. You do stuff and take notes on that stuff, and it keeps the results of what you did + your notes all together in one file that can be rendered to HTML or PDF. That's fucking fantastic IMO. Once you're at the point where you're trying to compose a lot of notebooks you should strongly consider opening an IDE and developing a project-local library instead. Or at least using some kind of task runner / data flow engine thing. I hate to be the "no true Scotsman" guy about notebooks, but all of this anti-notebook invective just doesn't make sense to me. Go ahead and write all you want about how notebooks are not an IDE replacement - that's fine, and nobody (at least nobody that I respect) ever claimed they were.
- kbelder 6y agoIt reminds me a bit of programmers who condemn any large Excel sheet, saying that it should be moved into a database. What it usually means is that they don't understand the problems it's solving.
- vmchale 6y ago> I really wish the data science/algo community weren't going in the direction of Jupyter/Notebooks. It's an atrocious experience from a development standpoint I see why scientists use it, but it lacks any FFI!
- kortex 6y agoJust use python libraries, wrappers,gRPC, or thrift.
- befeltingu 6y agoI have to disagree with your assessment of notebooks. I use them mostly for exploratory data analysis. It’s great for being able to view multiple graphs at the same time, tweak some parameters and see what changes. Then of course being able to easily share your findings. I agree as a development environment it has a lot of drawbacks. Hard to debug and global variables galore. I don’t view them as an end to end solution but as one step in the workflow
- abnry 6y agoDon't forget also documenting your findings. Without a notebook, results end up divorced from code stuffed into a folder with weird names. To properly document you have to write something in latex or word or markdown, but with a notebook you can keep code, graphs, and notes all together.
- nerdponx 6y agoseveral steps backwards from even just editing code in Windows notepad. Maybe for you. For myself (a professional data scientist) and every other professional data scientist I have worked with, notebooks are useful and better than Windows Notepad, otherwise we would all be using Windows Notepad. This is such a strongly worded post that I have to wonder what exactly you are trying to do with notebooks, that makes it not just suboptimal but atrocious. Because it sounds like you're using it for something other than its intended purpose, in which case of course it's atrocious, because you're using a tool for something other than what it was designed to do. If you think of a notebook like a tool for literate programming, then sure, I can see why you might have issues with them. They don't integrate well with text editors, other tooling such as test runners, or even the Python import system. I would strongly recommend against writing a library in Jupyter. I would strongly recommend against writing low-level CUDA code in a Python notebook. I would weakly recommend against writing production ETL pipelines in a notebook (although if your ETL pipeline is just untested spaghetti code, you might as well do it in a notebook). Notebooks are not competing with IDEs, text editors, or any other dev tooling. Notebooks are an alternative to REPLs. If you use a notebook like a super-powered REPL, you are going to get a lot out of it. I can't think of a single complaint about a notebook that can't also be leveled at an "Editor+REPL" type of workflow, and I can think of many problems with the Editor+REPL setup that are solved by notebooks. If you prefer using Spyder and RStudio with the console and plot window, that's great. I honestly do too. There is a lot to dislike about Jupyter Notebook and Jupyter Lab specifically. But notebooks in general, and Jupyter specifically, are still the most efficient tool I've found for doing something, keeping track of / taking notes on what I did, and displaying the results in a way that I and my colleagues can easily understand what I did. There are also other notebook formats such as RMarkdown and Pluto, both of which have much nicer plain-text representations than Jupyter Notebook. I'm a big fan of those, too. But there are tradeoffs in every design and I'm not about to malign the Jupyter project (or its ancestor IPython) for its choice to use JSON.
- monkeybutton 6y agoWorking on an analytics team myself, I strongly agree with everything in your reply. I just want to nitpick one bit: >weakly recommend against writing production ETL pipelines in a notebook I find prototyping and developing ETL code in notebooks to be the most efficient. Especially when dealing with new and unfamiliar data sources. The interactivity and feedback loop makes defining what an ETL process should be doing a lot easier. That said, once it's working, everything should get moved out into a module with tests.
- ljosifov 6y agoHa-ha-ha :-) - too late! Every generation will make their own "Worse is better" mistake. Have faith (and patience), what works and is good, will (eventually) be re-discovered.
- UncleOxidant 6y agoI don't like Jupyter notebooks either. Recently tried Pluto notebooks and they're way better. Pluto is reactive, you can change a value of a variable in a cell, for example, and the change will propagate to all cells that depend on that value. In the end you can save the code and run it normally outside of a notebook. For now these are Julia based, but Julia's a pretty nice alternative for data science at this point - much faster then Python, higher level (more python like) than C++. https://github.com/fonsp/Pluto.jl https://github.com/fonsp/Pluto.jl
- ballp 6y agoI always viewed Jupyter/Notebooks as a sort of powerpoint, where quite simple content is presented in a flashy manner. That explains their popularity.
- mhh__ 6y agoHmm. On the one hand I sort of agree but I think giving people a roughly structured play pen isn't always bad. Based on my experiences as a Physics student, It encourages bad code (DRY, etc.), but considering academics often have no real training as programmers as opposed to computer-practitioners, I guess it's better than them dumping raw c into a file and never touching it again?
- cozzyd 6y agoThe high energy physics community has been using interpreted C++ REPLs for over 20 years now :) (first with CINT, now with cling).
- armanboyaci 6y agoI strongly recommend Jeremy Howard's (founder of fast.ai) recent talk - "I Like Notebooks" (https://youtu.be/9Q6sLbz37gk https://youtu.be/9Q6sLbz37gk). He addresses some of the concerns/critiques about jupyter notebooks.
- ma2rten 6y agoYou apparently seem to misunderstand what notebooks are good for. They are not only better than notepad, they are better than any IDE or vim/emacs for data exploration, data visualization and machine learning model development.
- mumblemumble 6y ago> I really wish the data science/algo community weren't going in the direction of Jupyter/Notebooks. It's an atrocious experience from a development standpoint It is. I still use them regularly. I also avoid them like the plague regularly. It all depends on whether I happen to be wearing my Type A Data Scientist hat or my Type B Data Scientist hat at the moment.
- aashu_dwivedi 6y agoWhat are type A and Type B?
- mumblemumble 6y agohttps://medium.com/@jamesdensmore/there-are-two-types-of-data-scientists-and-two-types-of-problems-to-solve-a149a0148e64 https://medium.com/@jamesdensmore/there-are-two-types-of-dat...
- heresie-dabord 6y agoJupyter is a Rube-Goldbergian nightmare. Python is a memory hog. There are better solutions, to be sure. A simple REPL is all that's needed to both do A-type and B-type data exploration. (I won't use the term "data scientist", it's an exaggeration in most cases.) Python has a REPL, R has a REPL, Perl has PDL and both a simple REPL (https://github.com/viviparous/preplish https://github.com/viviparous/preplish) and a more complex one (https://metacpan.org/pod/Reply https://metacpan.org/pod/Reply). Jupyter should not be used as an IDE because it is the wrong tool for development. A-type data explorers just want a painless UI and may not care much about the horrible agglutination of incomplete/slow/broken solutions that Jupyter represents.
- sr7q 6y agoI want to write an article about "test-driven EDA." I used to do EDA in REPLs when I was more in a more research-focused scientist, but I've made a transition over to the engineering side the last few years. What made the transition natural for me is that I never shirked on reproducibility when doing EDA. I've seen other scientists, once they have something, "toss it over" and get the entire thing rewritten-- this isn't really scientists owning their work. Now-a-days, I do test-driven EDA, i.e. via using pytest. Write the test first that describes what you're "exploring for", and the code to document how you got it. As a bonus, an engineer can rewrite it since you've done them a favor and written tests they can validate.