3 ms·
My company has a lot of Clojure code but also supports users in R and Python, many of whom code notebook-first. One of the big differences that I have always ob
by thom 7y ago
My company has a lot of Clojure code but also supports users in R and Python, many of whom code notebook-first. One of the big differences that I have always observed is that Clojure (and other lisps possibly moreso) allow you to use the REPL alongside a living app and codebase. You can interactively develop small chunks of functionality and then integrate them into the whole.
Notebooks, however, impose this sort of top-down mental model that in my experience (supporting moving models to production, working with code form academia etc) very rarely leaves you a clear path to a maintainable codebase. Things like nbdev[0] might help a bit with deployment and refactoring, but it still feels like a completely different approach. Fundamentally a lot of people create notebooks as self-contained analysis that runs from top to bottom, first obtaining and preparing data, then trying to model the question at hand, and finally presenting results. The model is generally averse to ever scrolling back up. This doesn't feel at all like REPL-based development, where you're experimenting on one small part of a wider web of code, but the REPL history itself is much more transient and throwaway. There certainly can be a core loop in analysis where you're inspecting data, learning the patterns and distributions etc, but that generally yields insights, not code.
I assume that this isn't universally true, and many use R/Python REPLs to support more of a code-first approach, but I haven't observed that to be common.
0: https://github.com/fastai/nbdev https://github.com/fastai/nbdev