#059 - Jupyter Notebooks vs. Scripts: Which? Why? When?
Bridging the Gap Between Iteration and Automation in Structural Engineering
There are typically two schools of thought when it comes to doing engineering work in Python. And like many things in today’s society, these viewpoints can be extremely polarizing. So, let us continue this grand tradition of absolutism, plug our fingers firmly in our ears, and explore both extremes, if only to gain a broader view of the pros and cons of each.
Both approaches, Jupyter Notebooks and scripts, are useful, provided they are applied in the right circumstances. But to summarize the debate in the simplest possible terms:
Jupyter Notebooks excel when the problem is exploratory, the data evolving, and the process iterative—almost like a documented record of thought. If you’re testing assumptions, visualizing data, or trying to understand a design space, Notebooks allow you to experiment freely while keeping a running log of insights. Read more about the nuts and bolts of jupyter notebooks here:
Python Scripts, on the other hand, shine when the problem is well-defined, the workflow repeatable, and the inputs structured. If you know exactly what needs to be done and want efficiency, automation, and maintainability, scripts are the way to go. They’re ideal for tasks like gluing processes together, automating reports, or integrating multiple software tools into a single workflow.
Keep reading with a 7-day free trial
Subscribe to Flocode: Engineering Insights 🌊 to keep reading this post and get 7 days of free access to the full post archives.