4 ms·
This is sort of like how I develop using Jupyter notebooks. Write code in the notebook until I get a function / component correct. Copy it into a module. Restar
by snicker7 6y ago
This is sort of like how I develop using Jupyter notebooks. Write code in the notebook until I get a function / component correct. Copy it into a module. Restart the kernel and import the module. Rinse and repeat.
- nerdponx 6y agoYup, a notebook is a REPL with better scrollback + the ability to take notes alongside your code.
- smabie 6y agoExcept unlike a REPL, all your code is still there so that you eventually find yourself in an unreproducible state that on the surface looks reproducible. Referencing variables that don't exist in the notebook (only to be caught when run by someone else), cells that need to be executed out of order, etc. The problems go on and on. People sometimes go days or weeks without restarting their notebook and the amount of "shadow" state is remarkable. I think notebooks are useful (though only for exploratory analysis), but there has to be a better way.
- EForEndeavour 6y agoPart of the problem is discipline and avoiding anti-patterns. It's unfortunate that Jupyter encourages this kind of inconsistency to creep in, leaving it up to the analyst to maintain top-to-bottom "runnability".
- nerdponx 6y agoYou can go for days and weeks without restarting your REPL. It's literally the same problem.