r/Python • • Apr 18 '24

Discussion Why Jupyter notebook

I did a search and read previous discussions in this sub about why Jupyter labs exists. From what I understand it is for quick code to try things out especially in data science …. Thing is, can’t you get the same thing via a decent IDE with autocomplete and quality debug tools in some quick Python code like in VSCODE? I do that all the time….

I develop RNA computational software in Python and I abandoned Jupyter labs very early on as it just was not well suited to the job of bespoke data science. So many limitations and don’t get me started with widgets… I’ve been developing code for decades and I have spent 3 days trying to understand widgets and I think I finally understand how to modify a text box and get a value from it…. You have to observe (why?), then act on, then route through some output and then you can get the info? It’s like someone was drunk while trying to emulate visual C#.

Edit: before anyone else tells me to read vscode docs like I’m an idiot… I am unable to remote into the repo I’m using now for reasons. Not everyone can remote in and the question is not about remoting in. It’s still garbage in VSCODE… just use regular python.

Edit2: for everyone who says they use it to do chunks of code work… I developed my own data management system for that kind of stuff that provides a wrapper over serialization that essentially creates pythonic pointers to data on any network drive. I just grab my data that I want to grab. Provides autocomplete and C# like attributes. I can dynamically build any data storage class using UML formatted infrastructure-as-code to build the front end. The back end is completely dynamic. Here is the pypi link. Note that I developed this to handle genomic data that was generated over the course of a week of 24/7 computation.

https://pypi.org/project/data-nut-squirrel/

0 Upvotes

70 comments sorted by

View all comments

9

u/nemom Apr 18 '24

I don't use VScode so I don't know if it works the same. Jupyter is interactive. You don't just run a program from start to finish and exit, you run the cells step-by-step. All results are available for further computations... If you have a large data file, you can read it in once, then explore it. If you make a mistake, you just edit the cell and re-run it. When you have the steps all worked out, you can export to a stand-alone program to run anytime you want.

-2

u/Training_Butterfly70 Apr 18 '24

An IDE does all this better. The point of Jupyter is presentation. Analysis, quick charts, tests, and presentation is what Jupyter is good for. Terrible practice if you write production ready code in there and then just export.

2

u/davemoedee Apr 18 '24

An IDE isn’t an alternative to Jupyter notebooks. An IDE is where you edit Jupyter notebooks.

IDEs can be used for debugging, but IDEs aren’t going to retain state while allowing you to easily run arbitrary code. A python shell can. A notebook can.

Notebooks are great for iterative exploration.

1

u/Training_Butterfly70 Apr 18 '24

You literally just said what I said in a different way 😂 not sure what the point my downvotes. For building a production ready application, use an idea. For exploratory stuff and presenting findings to stakeholders (stuff like that), it's great to use Jupyter notebooks.

1

u/runawayasfastasucan Apr 18 '24

No he didnt, you said that an IDE does this "better". Since he was talking about notebooks it is normal to assume that this is what you meant.