3 ms·
For those Python programmers out there, if you don't mind sharing your experiences, do you spend any time at all on the REPL? If so, what fraction of the time,
by ezequiel-garzon 3y ago
For those Python programmers out there, if you don't mind sharing your experiences, do you spend any time at all on the REPL? If so, what fraction of the time, approximately? Using IPython, JupyterLab, or something else? Or do you just run it directly from an VS Code or PyCharm? Anything you may want to add about your routine would be appreciated.
Oh, if you (experienced programmer or not) happen to know about a good site or YouTube channel to see Python programmers in action (as opposed to tutorials), please share.
Thanks in advance, and apologies for the digression.
- shmoogy 3y agoWork with a ton of ETL and web APIs, and build internal tools. Almost everything new starts off in a notebook and then either moves to a standalone .py, ends up in aws lambda (typically Zappa flask projects), or in an airflow dag. Almost never ever use the REPL.
- SushiHippie 3y agoI'm probably not the average python programmer. But I normally just create two terminals (I have a tiling window manager) and in one I open a python file under /tmp/ write my code and execute it in the other terminal. I would probably use a REPL if it was integrated in my favorite editor ( https://helix-editor.com https://helix-editor.com ). But everything else I tried was to "clunky" for me. Though I work with data scientists, and they love to do everything inside jupyterlab.
- benrutter 3y agoA its spooky reading someone with basically the exact same workflow as me! I use helix in the terminal, regularly opening up a split pane in tmux to either breakpoint in, or test out bits of code interactively. I'm not quite as organized as having two regular panes- I'll close and open them pretty quickly. Often just to try some toy example of reorganising a duct or something before writing it out into code.
- SushiHippie 3y agoHaha great to hear I'm not the only one! I just miss the speed of Helix when using Jupyterlab et al, so I just do it this way Yeah I'm definitely not that organized, I also don't keep both open all the time, my fingers are sometimes to quick and close one of the terminals without me thinking about it. But I kept it simple in my example, so others could get the idea, as this is basically the "concept" behind my workflow.
- rand_r 3y agoI use “breakpoint()” a lot for debugging. It’s by far my #1 tool for figuring out why something isn’t working. Recommend you learn how to use it.
- Antitoxic6185 3y agoThank you so much. Your comment helped me a lot. I wish a lot more people knew about this.
- morkalork 3y agoI use Jupyter and vscode together. I'll be write new snippets of code in Jupyter then move it into .py stand-alone files when I'm happy it. I'll use vscode to work on already established code. The extension for auto reloading in Jupyter is super helpful. Notebooks are just plain awesome. Whenever I use a new api or service, I'll make a notebook with cells showing how to call/run each operation and commit as a sort of executable documentation.
- akasakahakada 3y agoREPL 0% JupyterLab 80% Pycharm 20% The reason is that Jupyter environment is lightyears more powerful than REPL. Feels like REPL is for those who don't code / only those who don't code would use REPL. I don't even use that after the first day.
- bravetraveler 3y agoI'm nowhere near a programmer, but I use 'ipython' quite a bit for prototyping. Particularly in cases where I'm trying to figure out how I want to modify some object. I dabble largely due to Ansible and system administration purposes. IDEs and the like aren't a thing for me; neovim/LSP instead.
- memco 3y agoI usually develop locally with the vscode debugger. On staging servers I often do remote vscode sessions also. On production I often use the REPL since I don’t want to install additional tools, but still need to inspect the state of a pipeline in a more step-by-step fashion.
- EasyMark 3y agofor python: 90/100 times, I just run the code/tests/debugger, 8/100 times I'll pull out the code and step through it with my own inputs, 2/100 use a repl and break on areas of interest to debug because the debugger just isn't cooperating. It's just too easy to use the debugger in something like vscode to run a module, especially in python since you can just right click run any old module a lot of the time just make a __main__ and feed some parameters, step through it, unlike with a static language.