5 ms·
What's the correlation between people who don't use debuggers and people who use notebooks? I can't imagine writing code without a visual debugger, one at a lev
by qumpis 3y ago
What's the correlation between people who don't use debuggers and people who use notebooks? I can't imagine writing code without a visual debugger, one at a level of pycharm. I think people who use notebooks must either be very active how they write code (don't misremeber variables, complexity of arrays, dicts etc) or have other means of debugging (print? Jupyterlab debugger? pbd?).
I love notebooks for their ability to preload chunks of code/data and have the ability to explore without delay. But having to put mental strain in keeping track of objects is too much for me. Vscode and pycharm have made strides in unifying the experience but it's still very much sub par, at least in my experience. Matlab-like style of executing code with possibility of reusing same debugger solution was perfect.
- jrvarela56 3y agoNot sure if correlated. In Ruby I do a mix of REPL/console, tests and step-through debugging. When using Python, I always use a notebook as a scratchpad - to me it's a REPL but easier to keep tidy. The notebook can be good docs of how things work too, a complement to tests-as-docs as it's easy to show in different (real) contexts. I sorely miss being able to do this when working on frontend, have tried setting up node console to import files but React just makes it very easy to couple everything. This leaves me with tests as the easiest way to code outside of a view (which has too much friction for playing around). Hot reloading is great but iterating logic in isolation is way harder without a REPL.
- appleiigs 3y agoI'd use Ruby more if it would work better in a notebook environment. It appears that iruby is in maintenance mode and falling behind Julia in usability.
- anentropic 3y agoI don't use notebooks much, but pdb is available in them
- pilotneko 3y agoPersonally, I use notebooks to do exploratory data analysis and to get model training configured. Any large-scale model training event is converted to a script, and nothing production-facing is in a notebook.
- qbasic_forever 3y agoJupyter lab has a debugger for python: https://jupyterlab.readthedocs.io/en/stable/user/debugger.html https://jupyterlab.readthedocs.io/en/stable/user/debugger.ht... Most people write notebooks that are ephemeral and meant for ad-hoc analysis. If a value needs to be inspected it can just be printed in a cell, or even better a fancy widget or graph can display it. You don't need breakpoints as much since you can just choose what cells to execute, or create a throw away cell to grab some values. Once you need to turn an analysis into a business process or repeatable task it makes sense to move it into a proper python module and use any IDE, debugger, etc.
- 0cf8612b2e1e 3y agoNow that VSCode has a notebook mode, you can execute a cell in debug mode and it will trigger break points you created in the referenced package, giving you the full debugger experience. I really like it, but do not know how it compares to pycharm. I just recently settled on doing this workflow (start notebook to test some new code) and find it to be super productive.