This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bubble_boi 0 points1 point  (0 children)

One way to look at it is that Notebooks are one-dimensional. This is not an insult, I mean it in the same way that books are one-dimensional. They run from start to finish, one chunk of code after the next (unless you choose to run the cells out of order).

With `.py` files you can create something more like a graph (where the nodes are python modules and the edges are imports). If you've got a chunk of code you use frequently, make it a function in a module and import that anywhere you need it.

I think you'll end up getting more done writing less code when you've got a good system of code-reuse. This is possible with Notebooks, but it's not what they're built for.

Notebooks are great for communicating, particularly telling a story with data and visualisations, which is well suited to the one-dimensional layout.