Checking Out Visual Studio Notebooks

Joe Mayo
9 min readAug 4, 2022

Why Notebooks?

To a software application developer with a modern IDE like Visual Studio, the notion of coding in a Jupyter Notebook can be strange. From another perspective, for a data scientist who needs to do step-by-step experimentation with data wrangling and machine learning models with notebooks might be encumbered by the idioms of build, run, and debug operations in an IDE.

Essentially, we should use the right tool for the right job — so let’s examine what the motivation for coding in a notebook might be. The experimentation point of view is pretty interesting, especially if learning a new library or tool. Think how convenient it might be to quickly iterate on a few snippets of code with quick feedback, like REPL. Lets say your experimentation was pretty cool and you wanted to share it. Wouldn’t it be nice to write formatted Markdown along with the code to explain what you learned? How about the ability to quickly display the output in not only code, but nice tabular views, and graphs? You can do all these things with notebooks. Who knows — you could want to do data science with C#, which might not be that far fetched.

Now that we’ve discussed why someone might use a notebook, lets examine how they work.

Understanding Cells

A notebook is a file that has a set of cells, where each cell has either Markdown or code. Essentially, it’s a vertical story of the journey you took to create something, mixing written description…

--

--

Joe Mayo
Joe Mayo

Written by Joe Mayo

Author, Instructor, & Independent Consultant. Author of C# Cookbook: — http://bit.ly/CSharpCookbook — @OReillyMedia #ai #csharp #Web3