256 Kilobytes

Jupyter Notebook | The Interactive Coding Application

Articles in Computer Software | By Louis J. V. Cicalese

Published | Last Update

Are notebooks worth your damn time?

578 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:

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

More Articles About Open-Source Software:

Download more RAM. 🐏 ⨉ 0Posted by Louis J. V. Cicalese 1 year ago

Edit History

• [2019-05-09 18:46 PDT] Louis J. V. Cicalese (1 year ago)
• [2019-05-09 18:46 PDT] Louis J. V. Cicalese (1 year ago)
🕓 Posted at 09 May, 2019 18:46 PM PDT

Profile Photo - Louis J. V. CicaleseLouis J. V. CicaleseAuthor

Post a New Comment

Do you like having a good time?

Register an Account

You can also login to an existing account or reset your password. All use of this site is subject to the terms of service and privacy policy.

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.

View Articles →

Argue with People on the Internet

Use your account to explain why people are wrong on the Internet forum.

View Forum →

Vandalize the Wiki

Or don't. I'm not your dad.

View Wiki →

Ask and/or Answer Questions

If someone asks a terrible question, post a LMGTFY link.

View Answers →

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.

Register an Account