Developing with Notebooks
not related to computer laptops(although you can run a Notebook system in a laptop)
Paulo VillegasTEFCON, 2016
Contents
The explanationA description/justification/exposition of Notebooks
The examplesWalkthrough & execution over a few notebook examples
The proposalInitial sketch of how to improve knowledge sharing by using Notebooks
Context
Literate programming
an approach to programming in which a program is given as an explanation of the program logic in a natural language interspersed with snippets of macros and traditional source code, from which a compilable source code can be generated
Example: wcni.c
Reproducible research
data analyses, and more generally, scientific claims, are published with their data and software code so that others may verify the findings and build upon them.
Interactive code development
IDEs with 'shell-like' interfaces for interactively running the code and getting the results
Examples: RStudio, Matlab/Octave GUIs
REPL
Uses
- instantaneous prototyping
- mathematical calculation (scientific analysis)
- interactive software maintenance
- benchmarking
- algorithm exploration
- learning a language
What is a notebook?
Two things at the same time:
A REPL to evaluate code in a given programming language
An editor to create a storyline with reproducible code
The outcome is a rich document (text, graphics, formatting) that can be executed
Notebook history
- The concept exists since the 80s. Arguably started with Mathematica
- More recently, the rise of IPython as environment for scientific computation has caused a notebook fever
Origin and structure
- a split from IPython 4.0 onwards
- a server exposing notebook functionality as a Web application (allowing document edition and code execution via a Web browser)
- pluggable kernels for different programming languages
Sharing
-
As notebookfor interaction and easy reproduction and play around
-
A formatted version (e.g.) PDFfor easier portability (nbconvert)
- Online
- a rendered & saved notebook can be directly visualized
- also: Notebook viewer
- also: GitHub automatically renders uploaded notebooks (see gallery)
(asuming a local notebook server is running on port 8008)
The proposal
An envisioned workflow
Developing with Notebooks
not related to computer laptops(although you can run a Notebook system in a laptop)
Paulo Villegas
TEFCON, 2016