Interactive notebooks: Sharing the code
Flying high above the Pacific Ocean, Titus Brown is taking a deep dive into his students' research code. The long journey from Michigan State University in East Lansing to a conference in Melbourne, Australia, provides the perfect chance for the bioinformatician to scrutinize his lab's new algorithm for removing errors from RNA sequencing data.
Three years ago, Brown might have waited until he was back in his office [..] But these days, Brown can work with his lab from afar using a free, open-source software package called IPython, which helps researchers to keep a detailed lab notebook for their computational work.
Brown's students write explanatory text and intersperse it with raw code and the charts and figures that their algorithms generate. Sitting in the aeroplane with an IPython notebook downloaded to his laptop, Brown can interact with the work. He tweaks and re-runs the code, which executes directly in the document he is reading — allowing him to see instantly whether his changes are improving the algorithm.
--
IPython Notebooks finally make "smart documents" possible, a much promised but underdelivered technology -- until now. Notebooks contain text, multimedia, graphs, as well as executable code (that can also produce graphs). Programs inside the document are executed through a kernel, which actually can be called from anywhere. For example I personally developed an extension to my favorite editor Emacs that calls the same kernel, captures its output, and displays the results in a TeX document (buffer). So I can write "smart TeX documents", building on my existing environment, with running code and results inside it. All this tech is open-source so people like me can interface with / extend it in any way we want (granted, technically code in binary form is enough for interfacing, but seeing the internals of the library was essential for the interface I developed).
IPython notebooks are a great step in the direction of reproducible science.