MITB Banner

Godfather of IDEs: Jupyter Notebook

Jupyter Notebook is more than just a fancy REPL with good UX

Share

Listen to this story

Jupyter Notebook is one of the most popular open-source IDEs available in the market, mainly because of its ability to create and share documents that contain live code, equations, visualisations and narrative texts. Due to its flexibility and interactiveness, it has exploded in popularity among data scientists as well. 

It continues to be one of the best IDEs available and has only grown since it got spawned out of Python in 2014, creating a huge fan-following in the developer community. And while a segment of the developer community vows in the name of Jupyter Notebook, some are also of the opinion that it makes it harder for data scientists to collaborate while coding. When typing a code in cells instead of functions, classes, or objects, users end up with a duplicate code, which becomes confusing and difficult to maintain in Jupyter.

As per a Reddit user, “Notebooks are more or less a fancy REPL with good UX.” But are they? There are a lot of things that Jupyter Notebook can do that sometimes get lost in the wide sea of tools that developers happen to have. Jupyter Notebook, according to Dipam Masani, is a true literate programming environment. 

Hail nbdev

The notebook-driven development platform ‘nbdev’ embraces literal programming while letting developers develop and publish the Python package right from Jupyter Notebook. The platform gives developers access to live objects at all times, which makes debugging and refactoring codes simpler. 

Literate programming is a technique that combines a programming language with a language for writing documentation, which in turn, makes programs reliable, portable, and maintainable while being enjoyable to write. As per Masani, “In this style of programming, you move away from writing computer programs in the manner and order imposed by the computer, and instead enable programmers to develop programs in the order demanded by the logic and flow of their thoughts.”

It also happens to generate documentation that it publishes on GitHub pages; the developers can also write tests and set up CI with GitHub actions. 

Jupyter Book – the best in the market?

Many developers prefer Bookdown as their go-to package to write interactive documents/books etc, but now, building publications-quality books and documents with Jupyter Notebook is another intriguing feature of the platform. The basic concept is to begin by creating the notebook and end it by publishing as a website or exporting as a PDF file.

Users can add sophisticated, publication-quality markup to their documents by using the MyST Markdown language, which is used in Markdown and notebook documents. Additionally, it leverages the MyST-NB package to parse and read-in notebooks so they are integrated into the book. The Sphinx documentation engine is used by the Jupyter book to create outputs from the information in your book.

Additionally, for stunning HTML output, it makes use of a slightly modified version of the PyData Sphinx theme; while to add new functionality, it makes use of a selection of Sphinx plugins and utilities.

The nbconvert and Jupyter Kernel Gateway

For data scientists, the ‘nbconvert’ is a useful tool to have in the toolbox because it makes it simple to convert Jupyter Notebooks to Python scripts from the command line. The application also enables the programmer to convert the Jupyter Notebook into open-source file types like .html and .pdf files.

Mainly, the nbconvert tool allows the developer to convert a Jupyter notebook document file into another static format, including HTML, LaTeX, PDF, Markdown, reStructuredText etc, while also adding productivity to the workflow when used to execute notebooks programmatically. 

While the Jupyter Kernel Gateway is a web server that provides headless access to Jupyter kernels, kernels are autonomous, language-specific processes that communicate with the Jupyter Applications and their user interfaces while running independently. The Jupyter Kernel Gateway communicates with the kernels remotely, through REST calls and Websockets rather than ZeroMQ messages. 

It has a tonne of functionality, including notebook-http mode, Jupyter-websocket mode, and many others. A Jupyter Notebook server-compatible API for obtaining kernels and corresponding with them through Websockets is made available by Jupyter-websocket mode. While the notebook-http mode assigns HTTP requests to notebook cells.

Furthermore, it has the option to plug in third-party personalities to enable alternative kernel communication techniques and pre-populate kernel memory from a notebook. Additionally, it may set CORS headers for serving browser-based clients and set a shared authentication token, requiring it from clients. Also, the platform offers a choice to restrict the amount of kernel instances that a gateway server will run.

Share
Picture of Lokesh Choudhary

Lokesh Choudhary

Tech-savvy storyteller with a knack for uncovering AI's hidden gems and dodging its potential pitfalls. 'Navigating the world of tech', one story at a time. You can reach me at: lokesh.choudhary@analyticsindiamag.com.
Related Posts

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

Upcoming Large format Conference

May 30 and 31, 2024 | 📍 Bangalore, India

Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.

AI Forum for India

Our Discord Community for AI Ecosystem, In collaboration with NVIDIA. 

Flagship Events

Rising 2024 | DE&I in Tech Summit

April 4 and 5, 2024 | 📍 Hilton Convention Center, Manyata Tech Park, Bangalore

MachineCon GCC Summit 2024

June 28 2024 | 📍Bangalore, India

MachineCon USA 2024

26 July 2024 | 583 Park Avenue, New York

Cypher India 2024

September 25-27, 2024 | 📍Bangalore, India

Cypher USA 2024

Nov 21-22 2024 | 📍Santa Clara Convention Center, California, USA

Data Engineering Summit 2024

May 30 and 31, 2024 | 📍 Bangalore, India