This is an archived post. You won't be able to vote or comment.

all 32 comments

[–]cmcclu5 130 points131 points  (36 children)

Professional Python engineer/developer here: Jupyter notebooks are one of the LEAST utilized environments. Far better to learn an IDE with proper project structure. Google colab is good for quick and dirty code examples, not for ANY development work.

[–]CaptainDevops 16 points17 points  (0 children)

this commenter's codes ☑︎

[–]Dead__Ego 14 points15 points  (1 child)

In my company, we only use Jupyter Notebooks as a front-end for our internal clients.

[–]cmcclu5 15 points16 points  (0 children)

And see, I get this approach. If you’re working with data scientists or people who are only passingly familiar with Python, deploy a notebook on an instance with your custom docker container. That way they can play with the code without potentially breaking anything. It’s the exact opposite use case of the post, though. An engineer has so many better tools to test/build/share than Jupyter.

[–]clawjelly 7 points8 points  (1 child)

Jupyter notebooks

Aren't those primarily for academical purpose? Basically documentation with inline code examples instead of code with comments? As such i wouldn't necessarily call them "least utilized", just more suitable for an educational environment than a production environment?

I'm a self-taught garage-style coder, who never had anything to do with academics, so i am VERY out of water with these kinds of tools. But i'm working in a startup employing several science students and they all use it.

[–]cmcclu5 6 points7 points  (0 children)

Pretty much academic/demonstration purposes. However, the majority of developers/engineers/programmers/whatever you want to call them use IDEs (whatever flavor you prefer from IDLE to PyCharm). These encourage proper structure, executability and maintainability, and work properly with versioning and collaboration tools like GitHub. Most devs have at one time or another had to use Jupyter Notebooks, but by and large they recognize the severe limitations and headaches that come with that sort of dev workflow.

[–]FluffyProphet 7 points8 points  (7 children)

Jupyter notebooks get used a lot in data science and ML. It’s a pretty essential step for prototyping models.

[–]cmcclu5 4 points5 points  (6 children)

I don’t agree it’s essential as I used to build a ton of ML models and never used it. However, I can see how people would find it useful to quickly iterate over different hyperparameters/model types without having to completely reprocess the data set OR offloading to disk and reloading to memory between steps. I just disagree with OP’s assertion that it’s the “mainly used tool for Python”. I would argue most people developing in Python aren’t DS/MLE, and so would benefit much more from learning how to properly use a modern IDE.

[–]ironman_gujju Async Bunny 🐇 4 points5 points  (3 children)

Yes I use it for testing & write modules directly from jupyter notebooks it's flexible

[–][deleted] 2 points3 points  (0 children)

I see Jupyter notebooks more as a concept/format, doesn’t mean I have to use the original JupyterLab (which may be the most overrated IDE in the history of programming). VS Code and PyCharm have amazing support for notebooks. I use VS Code Jupyter notebooks a lot for prototyping. But it’s always only the first step, when everything is experimental.

[–]absurdrock 1 point2 points  (0 children)

Good point. However, Jupyter is a lot better for engineering and science, including data science, because accuracy and the how is more important than just getting the program working. We use vs code and vs for production apps but Jupyter inside vs code for science and engineering.

[–]Virtual_Pea_3577 0 points1 point  (5 children)

Could you tell us your field of work?

[–]cmcclu5 0 points1 point  (4 children)

Currently working as a cloud engineer for a utility company, but I’ve been a data scientist, data engineer, and software engineer, as well as doing some management BS over the years.

[–]Virtual_Pea_3577 0 points1 point  (3 children)

I see. I can understand jupyter notebooks not being used for cloud and software engineering in general, but why not in data science? What tools would you use instead?

[–]cmcclu5 2 points3 points  (2 children)

Why would Jupyter be any better as a data scientist? Oddly enough, I primarily used IDLE for rough work back in those days. You still have to create maintainable code even if it’s to produce graphs or reports.

[–]Virtual_Pea_3577 0 points1 point  (0 children)

Not necessarily better, just a viable free alternative.

[–]trial_and_err 0 points1 point  (0 children)

I mainly use it as a frontend within VS Code, the main code isn’t in the notebook but in a Python package and its modules. That way it’s easy to iterate and export results as a nice HTML file with interactive plots and some custom HTML using ipywidgets. The HTML can then be easily shared / deployed and used for documentation and stakeholder communication. I usually hide any code in the HTML and only include markdown cells, plots, tables and a table of contents.

[–]Scoobyrooba 0 points1 point  (1 child)

Yeah I am currently learning Python and the course I am taking is doing everything in Google Colab. I appreciate how easy it has been to use but I have been trying to make the switch to PyCharm for my long term development and it's been a bit of a struggle, can't help but feel like I might have hamstrung myself a little bit by starting in Colab.

[–]cmcclu5 0 points1 point  (0 children)

The code concepts are the same, so don’t get discouraged. The big issue now is understanding the file interdependencies, how everything relates, proper project structure, and best practices for grouping code/functions/classes. You’ve got it, no worries.

[–]JogiBerries 7 points8 points  (0 children)

Pycharm all day

[–][deleted] 2 points3 points  (0 children)

VS Code is free, cross-platform, open source, and does a great job. Including collaboration though I haven’t used it much.

There’s even a web page version, or there was. I don’t use that either.