4 ms·
I teach a lot using Jupyter. It is certainly possible to use SWE worst practices in Jupyter easily. I am often in front of folks who "aren't computer programme
by __mharrison__ 2y ago
I teach a lot using Jupyter. It is certainly possible to use SWE worst practices in Jupyter easily.
I am often in front of folks who "aren't computer programmers" but need to use Python tools to be successful. One of my covert goals is to teach SWE best practices inside of notebooks. It requires a little more typing but eases the use of notebooks, refactoring, testing, moving to scripts, and using tooling like Papermill.
- akshayka 2y agoHave you considered using marimo notebooks? https://github.com/marimo-team/marimo https://github.com/marimo-team/marimo marimo notebooks are stored as pure Python (executable as scripts, versionable with git), and they largely eliminate the hidden state problem that affects Jupyter notebooks -- delete a variable and it's automatically removed from program memory, run a cell and all other cells that use its variables are marked as stale. marimo notebooks are also readily parametrized with CLI arguments, so you can do: python notebook.py -- -foo 1 -bar 2 ... Disclosure: I'm a marimo developer.
- ThouYS 2y agothanks mate, exactly what I've been looking for
- cycomanic 2y agoThere is also jupytext which converts Jupyter notebooks on the fly to a number of different formats (Markdown, python,...). It's at the core of the Jupyterbook project IIRC and IMO the best method to use Jupyter with git.
- __mharrison__ 2y agoI use Jupytext (and my own conversion utilities) all the time. I write my books inside of Jupyter these days.
- sa1 2y agoYou should make a new post about the new sandbox feature.
- wodenokoto 2y agoIt’s basically Pluto notebooks for Python?