Jupyter Notebook | The Interactive Coding Application
Published | Last Update
Are notebooks worth your damn time?
384 views, 0 RAMs, and 0 comments
What is Project Jupyter?
Project Jupyter is a non-profit organization that is dedicated to developing open-source software and supporting interactive data science and computing through open standards. Jupyter is a spin-off of the command shell IPython, both developed by the physicist/software developer Fernando Pérez.
In 2015, Pérez announced that IPython would stick around as a Python shell and a kernel for Jupyter, while the IPython notebook and other features would be relegated to Jupyter. Pérez said specifically that the many language-agnostic aspects could not appropriately be called IPython and needed a new name. The name “Jupyter” is a combination of the three primary programming language supported by the project: Julia, Python, and R. However, the project supports over 40 different programming languages in all.
At this point, Jupyter supports several services, including Jupyter Notebook (formerly IPython Notebook), Jupyter Hub, and JupyterLab (the next-generation UI successor to Jupyter Notebook).
What is the Jupyter Notebook Good For?
Jupyter Notebook is a free and open-source web application that is used to create, share, and interact with notebook documents. These documents use a “.ipynb” file extension by default but can be easily converted to a variety of open standard file formats. Similarly, Jupyter Notebook automatically uses the IPython kernel, but can be connected to other compatible kernels that allow for programming in (currently 49) different languages.
According to the Jupyter website:
Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.
Breaking it down, here are the basic functions of Jupyter Notebook documents that make all of the above possible:
- Notebook documents can run live code.
- Documents canembed visualizations, such as tables, charts, and videos.
- Documents can display rich text.
All of these elements are displayed inline with each other, allowing for many benefits:
- Notebook documents are perfect for testing small snippets or blocks of code and getting immediate output of the code in the same window.
- Because all explanatory text and visualizations are displayed inline alongside live code, documents are both visually appealing and informative.
- Notebooks can be shared, and are a good way of collaborating on complex projects, especially for communicating ideas. It is easy for others to directly interact with your results.
This video does a good job of showing how this format can be useful from a visual perspective:
And here is a nice introductory video that gives you a better look at the user interface and the basics of actually using Jupyter Notebook:
Can Jupyter Notebooks Replace Real Text Editors?
This leaves us with the question of whether or not Jupyter Notebook can be used as a substitute for a text editor or IDE, and if not, what worthwhile utility it holds on its own.
Although many people find that Jupyter Notebooks are a great tool for analysis, exploration, and prototyping, they are not ideal for building large programs or applications, and certainly not a suitable replacement for writing code in a text editor, IDE, Python shell, and so on.
Here are some disadvantages of with Jupyter Notebook:
- In Jupyter, code is run one codeblock at a time. This is by design, as it allows you to be very particular about what sections of code you are running, but it also means that cells can be run in different orders which may result in code being changed or deleted. This results in a “hidden state” in which old output is saved but not necessarily displayed in a way you can see, and variables may be defined without you realizing it, meaning that any results you get are not reproducible (unless you run all code snippets in the exact same order again. To get around this you need to “restart and run all” frequently.
- Notebooks can encourage bad habits and sloppy coding. Granted, they are supposed to be used as a notebook, something that you jot down ideas in and write up properly in a real editor later. While this is very useful, using notebooks as a crutch may prove detrimental to your skills.
- Notebooks can be a confusing tool for people new to programming (Re: hidden state). And again, they should learn good code-writing practice before growing to rely on notebooks.
- Notebooks are great for sharing ideas with collaborators, but they are terrible as a primary platform of compiling code from different contributors. Notebooks can be imported into other notebooks, but it is a dubious affair that tends to make things even messier and probably break what you’re working on.
If you want to hear limitations of notebooks from people who presumably way know more about Jupyter than I do, check out the following resources:
- Pitfalls of Jupyter Notebooks
- Why I don’t like Jupyter Notebooks
- I Don’t Like Notebooks (presentation)
The Final Word
While the previous section may seem fairly damning, Jupyter Notebooks are still incredibly useful and have a ton of merits. What’s important is to recognize their limitations and use them for their intended purpose.
Notebooks are in no way a suitable replacement for a text editor but can be a useful supplement for exploratory analysis. In the end, the main thing that matters is that you are comfortable with your workflow and don’t sacrifice good code-writing practice for convenience.
Nice Jupyter Notebook Resources
- Jupyter Notebook GitHub Repository
- Fernando Pérez Official Website
- Estimating Number of Jupyter Notebooks on Github
- Codeacademy - How to Use Jupyter Notebook Article and Video
More Articles About Open-Source Software:
- 6 Open-Source Alternatives to Proprietary Software: Self-Hosted Applications
- 7 MORE Open-Source Alternatives to Proprietary Software: Desktop Applications
- What is Mastodon? | The Open Source Social Media Network
- What is Commento? | The Open Source Disqus Alternative
- What is PeerTube? | Introduction to the Free and Open Source Video Platform
- Introduction to Dissenter | The Internet-Wide Commenting Platform
- [Infographic] The Beginner's Vim Cheat Sheet
- 5 Tasks You Didn't Know You Could do With Vim
- Top 5 Gedit Tricks, or Some Shit
- How to block certain websites on your computer
- Scriptable Headless Browsers 101: PhantomJS vs. Headless Chrome/Chromium vs. Headless Firefox
- The Virgin CSV vs. the Chad TSV
- Remember Oregon Trail? | A Brief History of the Most Popular Educational Video Game of All Time
- Whatever Happened to Microsoft Silverlight? | Press F to Pay Respects
- Introduction to Inkscape | How to Make Low-Effort Memes and Impress Your Friends
- What is Rollback Rx Pro? | An Instant Time Machine For Your Computer
- Jupyter Notebook | The Interactive Coding Application
- [Infographic] The Beginner's Vim Cheat Sheet
- The Complete Guide to Discord Text Formatting, Syntax Highlighting, and Tricks for Adding Colors
Post a New Comment
Do you like having a good time?
Register an Account
Read Quality Articles
Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.
Argue with People on the Internet
Use your account to explain why people are wrong on the Internet forum.
Vandalize the Wiki
Or don't. I'm not your dad.
Ask and/or Answer Questions
If someone asks a terrible question, post a LMGTFY link.
Make Some Money
Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.