Latest / Talk Python To Me / #268: Analyzing dozens of notebook environments
Transcript
- 0:00Are you using interactive notebooks for your data exploration or your day-to-day programming?
- 0:04What environments do you use?
- 0:06Was it Jupyter and now you've made your way over to JupyterLab?
- 0:08That's a great choice, but did you know there are more environments out there to choose from and to compare?
- 0:13Have you heard of Callisto or Iodide?
- 0:15How about CoCalc or PolyNote?
- 0:17Those are just the tip of the iceberg.
- 0:19That's why I'm happy to have Sam Lau and Philip Guo here to share their research,
- 0:24comparing and categorizing over 60 notebook environments.
- 0:27This is Talk Python To Me, episode 268, recorded June 11th, 2020.
- 0:32Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
- 0:52This is your host, Michael Kennedy.
- 0:53Follow me on Twitter where I'm @mkennedy.
- 0:56Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter via at Talk Python.
- 1:02This episode is brought to you by Linode and Sentry.
- 1:05Please check out what they're offering during their segments.
- 1:07It really helps support the show.
- 1:09Sam and Philip, welcome to Talk Python To Me.
- 1:12Pleasure to be here.
- 1:12Same here.
- 1:13Yeah, nice to have you on the show, Sam.
- 1:15Philip, welcome back.
- 1:16You've been on the show a few times.
- 1:18You were one of the very first guests way back when, diving into the CPython source code internals.
- 1:23And then we've talked about a bunch of fun topics, you know, coding in your golden years and maintaining open source projects individually and things like that.
- 1:32It's been a lot of fun to have you on the show and nice to have you back.
- 1:34Yeah, it's great to be back.
- 1:35And yeah, that was my first ever podcast with you.
- 1:38That was, I think, almost five years ago.
- 1:40It's good to be back as a podcast veteran now.
- 1:43That's right.
- 1:44You know the whole deal.
- 1:44And Sam, welcome to the show.
- 1:46Before we get to the main topic, I always like to set the stage for where the guests are coming from.
- 1:52So when somebody says, you know, like, I think you should really do this, like, they might say that because they're a biologist using Python, not a person running Facebook or the other way around, right?
- 2:02So maybe just tell us really quickly about your background and how you got into Python.
- 2:06My background in Python came from, actually, back in high school, I ran into the first wave of, like, massive open online courses.
- 2:15Right.
- 2:17Right.
- 2:18And so, like, at my school, there wasn't much emphasis on programming much at all.
- 2:23And so when I ran into, when I found out about those courses, I got really into it and decided to major in computer science at UC Berkeley and then ended up doing, ended up starting this PhD at UCSD with Philip studying cognitive science.
- 2:36Cognitive science is really interesting.
- 2:38I've talked to a few folks from there.
- 2:40There's a lot of interesting computational CS type problems happening in cognitive science.
- 2:46Yeah.
- 2:46And data science as well.
- 2:47Absolutely.
- 2:48I worked for a while at a company that was basically a spinoff from a research lab that was a bunch of cognitive science PhDs.
- 2:55And we did all sorts of cool stuff with eye tracking and programming.
- 2:58And, man, it's just a lot of fun.
- 2:59I really enjoyed my time in that space.
- 3:01Yeah.
- 3:01People here are, cognitive science is so broad that you have people here using programming for all sorts of tasks.
- 3:07Like, we have people here training deep neural networks, but also people studying fMRI signals and processing those and working with neuroimaging.
- 3:18And so you just get a really diverse, broad range of perspectives and uses for Python.
- 3:23Yeah.
- 3:23It's interesting, too, because I feel like there's still a lot of open questions.
- 3:26Yeah.
- 3:27There's a lot we don't know.
- 3:28And it feels like the more we know, the more we know about what we don't know.
- 3:31Yeah, exactly.
- 3:33Every answer opens up to more questions.
- 3:36That's right.
- 3:36Exactly.
- 3:37All right.
- 3:37Well, we're going to talk today about the research that two of you have done in the space of notebooks, as in computational notebooks, Jupyter notebooks, that type of thing.
- 3:48And it turns out, actually, there's more than just IPython and Jupyter, right?
- 3:53Quite a few more.
- 3:54Yeah.
- 3:55So in our paper, we talk about a total of 60 different notebook systems that we put together and try to draw out some patterns from.
- 4:03Yeah, it's really interesting.
- 4:04I mean, people, I think Jupyter, IPython, when it was first started, became Jupyter, really changed the way people thought about programming.
- 4:12I mean, there were tools like this.
- 4:13Maybe you guys can throw out some that felt kind of like that.
- 4:17So when I say that, the one that comes most to mind is, I think, Mathematica or Maple, right?
- 4:24They're really beautifully visual, but then they also had computation, but they also had like output, you know, MATLAB, but MATLAB's not quite as pretty, for whatever reason, more utilitarian, I guess.
- 4:36And when you thought about programming, that was, you know, maybe if you're trying to emulate that, it would be a script, and then it would like output some stuff, or it would pop up a window, it'd save like a JPEG or something.
- 4:46But the notebooks really brought those two worlds together.
- 4:49Say, look, you can write code in a, like a pro programming language in a way that you really would use like libraries and stuff that are not just baked into these tools.
- 4:57But then they have this kind of interactive world.
- 5:00I think it's really interesting to see all these derivative concepts, right?
- 5:04We've got Jupyter that had its way of doing things, but there's challenges there, and there's a lot of variation.
- 5:10Like, were you surprised to find this many different systems around?
- 5:13I certainly was.
- 5:14I think I came into this project thinking, oh, it's probably just Jupyter plus like maybe three or four other systems.
- 5:21And I think the deeper we went, the more we were like, whoa.
- 5:25People are really taking Jupyter and changing it, adding new things to it, making it fit their use case more effectively.
- 5:36And there's a lot of, it turns out that there's a lot of different groups studying Jupyter and notebook systems in general and trying to figure out how they can make it better for themselves.
- 5:45Yeah, I think I'd just add to that, to what Sam said, was that, you know, we started this project.
- 5:50So this is, this paper is co-authored by Sam, one of my other PhD students, Androsos, one of my undergrad students, Julia Markle, and myself.
- 5:59And we basically just kind of split up the work and just went to find a lot of these notebook systems.
- 6:04And the motivation for this was that, you know, in the academic literature, in the kind of academic world of studying programming tools, in the past few years, there's been a lot of people studying how people use notebooks.
- 6:15I believe Adam Rule was on your podcast, Michael, was Adam?
- 6:19It sounds familiar.
- 6:21Yeah, he was about the Jupyter, the, you know, analyzing the million Jupyter notebooks.
- 6:25Yes, that's right.
- 6:26Yeah, that's right.
- 6:27Yeah.
- 6:27So there's a bunch of studies around Jupyter notebooks and how people use them for science and stuff, and then people developing new prototypes.
- 6:34And at the same time, there's a bunch of industry people, you know, every startup company is like, we're going to do a notebook, we're going to do this other notebook, this other notebook.
- 6:40So it became like this wild west.
- 6:41That's right. Google CoLab, DataLore, Azure notebooks, all those, yeah.
- 6:44Yeah, so it became like this wild west, and we felt it was around time for this sort of what we call a survey paper or a meta-analysis, right?
- 6:51It's like, this paper is not doing original research in that we're not making a new notebook, but we are collecting together dozens of these notebooks from both academic prototypes and also industry products and trying to, like,
- 7:04analyze them and see, you know, how does this space fit together?
- 7:06So I got a few of my students together, and we kind of brainstormed and looked for a lot of notebooks and stuff.
- 7:12And then Sam, who is the first author on this, kind of, you know, did a lot of the leadership on this work.
- 7:17So I'll let him talk more about the details, because I forgot all the details, so I just delegate them.
- 7:22Yeah, sure.
- 7:22Yeah, and your primary research is in human-computer interaction?
- 7:26Right, right.
- 7:27So my primary research area that my students are in is called HCI, or human-computer interaction.
- 7:31And the kind of industry term for this is, you know, people know it as UX design, right?
- 7:36User experience design, user interface design.
- 7:39And, you know, HCI, or human-computer interaction, is sort of the academic term for the research that goes into how do you make better user experiences for, you know, different kinds of users.
- 7:49In this case, it's for scientific programmers and data scientists.
- 7:52Yeah.
- 7:53Okay.
- 7:54Now, I think probably we should start this conversation with a definition, because I kind of opened it saying, well, Jupyter is the prototypical thing of what a notebook is.
- 8:05And it's kind of the natural progression of something like Mathematica.
- 8:09But what would you all define a notebook system to be?
- 8:14So, like, how do other things that are, you know, not exactly that fit into this world?
- 8:19In this paper, we define a computational notebook as a system that supports literate programming, where you can blend a text-based programming language with program outputs in a single document.
- 8:32Right.
- 8:32And this is not a super new idea, right?
- 8:34This, I mean, Donald Newt is like in the 80s or something talked about this idea, right?
- 8:38Yeah.
- 8:38And actually, I think the entire tech program, like LaTEC, the tech that Donald Newt made, was a literate program to begin with.
- 8:45He was like the, I would say, like most prominent proponent of literate programming.
- 8:50Okay.
- 8:50So, notebooks are these embodiments of this literate programming idea.
- 8:54Basically, I guess I'm hearing that it's the ability to blend together the presentation of, like, prose almost, and computation and visualization around that.
- 9:07Yeah, yeah.
- 9:08And it kind of shifted the dynamic of how we view a program.
- 9:12Instead of having a program be instructions for a computer, it allowed us to see programs as kind of like the outputs themselves, as a thing that you would show to other people in the end.
- 9:22Yeah, because traditionally, it would be, here's the graph.
- 9:25Exactly.
- 9:26We ran the analysis, and this is the output.
- 9:28Here's the description of the output, maybe a description of the algorithm, and here's the output.
- 9:33And, you know, there's been a big push in the scientific space for reproducibility.
- 9:37And I think also just in the data science space for explorability, right?
- 9:42Like, I've got data.
- 9:43I don't really know what it is.
- 9:44I need to just get in there and play with it before I turn the algorithms loose on it.
- 9:48And that's kind of what's happening here, right?
- 9:50Yeah, definitely.
- 9:51I would say many of the projects that we looked at in this paper were birthed out of this, directly out of, like, the reproducibility issue, where some person might write a script to generate a graph somewhere, but then lose it.
- 10:04And then all you have now is, like, a graph in the end.
- 10:06If you had a notebook, the pitches, if you had a notebook, you wouldn't need to have a separate graph, like JPEG, and then a separate program to run it.
- 10:14You could just have it in one place.
- 10:16Right, right, right.
- 10:17How often does version control in the science space or the sort of beginner developer space look like a bunch of zip files where they're named the thing and then the date or the thing of the date and then, like, two and then three?
- 10:30Oh, yeah, exactly.
- 10:31Something like that.
- 10:32It's like zero five underscore final final V3, you know?
- 10:35Exactly.
- 10:37Final edited.
- 10:38That's not amazing.
- 10:39So having something in here that sort of brings a little more formality and brings, I guess, the paper and the presentation and the script or code that ran it, like, into one thing that's versioned continuously seems a little bit better.
- 10:52Yeah, and actually, there are the basic way to version control a Jupyter notebook is to put it in a version control system like Git.
- 11:00But oftentimes, it's not good enough for actual scientists who have, like, the notebook files themselves, but also their data and also the libraries that the notebook use to generate the outputs.
- 11:11And so there's a group of projects that we surveyed that not only version a notebook, but also in version a notebook and the dependencies.
- 11:17Okay.
- 11:18Yeah, very nice.
- 11:19One of the challenges, however, I think it's ironic, like, it brings stuff together here to make the code and the analysis and the presentation all as one.
- 11:28But it actually, Jupyter notebooks are not very easy to version.
- 11:30Quite hard, actually.
- 11:32Yeah.
- 11:32Yeah, like, if they store the last run of the output, and if that is dynamic in the sense that it's, like, not every time you run it, you get the same output.
- 11:40That can be a, I mean, even if it changes, right?
- 11:43Even if it is that case, it's still hard.
- 11:44But if it's, like, changes every time you run it because it pulls something from the internet that varies or whatever, it's basically always a merge conflict.
- 11:51So there's tools like NB strip out, which are nice, that are, like, pre-commit hooks that'll let you do that and other ones.
- 11:57But still, it's, I think it's, these notebooks, they come both with, like, a new power and accessibility, but also their own challenges.
- 12:05Yeah, exactly.
- 12:06Yeah.
- 12:06So in your paper, one of the things you all talked about is you said around notebooks, they have these several themes.
- 12:12They have end-user programming, exploratory programming, live programming, and literate computing.
- 12:19So what do you mean by, like, live programming?
- 12:23I understand end-user programming, which is pretty cool.
- 12:25Observatory makes sense.
- 12:27But what's the live here?
- 12:28So, yeah, so there are a few kinds of definitions of live programming.
- 12:31One definition comes from kind of the creative space.
- 12:34So there are these people who are graphic artists or musicians who actually literally, you know, they're streaming on Twitch or they're doing these, you know, pre-COVID, I guess.
- 12:42They're doing these live performances on stage where they're using some kind of graphical software to, you know, Max MSP or whatever to put together live music performances or graphical art.
- 12:52Another form of live programming that I think what we mean in this paper is more like a programming environment that updates live, right?
- 12:59So as you're typing the code, it's actually just constantly running it and generating output.
- 13:03So some of the notebook systems we've looked at allows you to kind of do this live programming where as you start typing, it might autocomplete.
- 13:10It might start generating graphs for you just to kind of cut down on this edit run loop and such.
- 13:16Right, right.
- 13:17It's not this I'm going to edit when it's time to hit run, I run.
- 13:20Or, you know, maybe in some languages there's a compile, then a link, then a run, and there's a big delay.
- 13:25Would something like some of the features in the editors, like PyCharm and probably VS Code, I don't know what plugin you need for it, but where it's like continuously running unit tests just as you type?
- 13:35Yeah, I mean, that's a form of liveness, right?
- 13:38The kind of, you know, whatever.
- 13:39And even like, you know, even the squiggly lines, right?
- 13:42The IntelliSense and the, you know, linting and those things.
- 13:45You know, anything that kind of cut down on the, you know, the friction of having to write a bunch of code.
- 13:50Because especially for beginners, right?
- 13:51So for beginners and for people who might be scientists and people who may not be as programming experienced, you know, one thing you often see beginners do is they write a lot of code, right?
- 14:00They write a lot of code and they sit and they hit run.
- 14:02They're like, why doesn't it work, right?
- 14:03Whereas more experienced programmers kind of know to write a line, check it, print something out, make sure it works, and then write the next line, write the next section and such.
- 14:11Yeah, it's easy to do a bunch of work and then have it, especially when you're new, and have it not come out the way you like.
- 14:16And you're like, well, now it's broken.
- 14:18Oh, no.
- 14:18What am I going to do, right?
- 14:20It's small bites, of course, small steps.
- 14:22This portion of Talk Python To Me is brought to you by Linode.
- 14:28Whether you're working on a personal project or managing your enterprise's infrastructure, Linode has the pricing, support, and scale that you need to take your project to the next level.
- 14:37With 11 data centers worldwide, including their newest data center in Sydney, Australia, enterprise-grade hardware, S3-compatible storage, and the next-generation network,
- 14:48Linode delivers the performance that you expect at a price that you don't.
- 14:51Get started on Linode today with a $20 credit, and you get access to native SSD storage, a 40-gigabit network, industry-leading processors, their revamped cloud manager at cloud.linode.com, root access to your server, along with their newest API, and a Python CLI.
- 15:08Just visit talkpython.fm when creating a new Linode account, and you'll automatically get $20 credit for your next project.
- 15:16Oh, and one last thing.
- 15:17They're hiring.
- 15:18Go to linode.com slash careers to find out more.
- 15:21Let them know that we sent you.
- 15:25When you had live here, and you talked about the live, sort of interactive, almost onstage type of stuff, I was thinking of FoxDot and the live, like, musical composition with Python.
- 15:36Have either of you guys seen that?
- 15:38No, I haven't seen this.
- 15:38I have not.
- 15:39I think it's called FoxDot.
- 15:40I'll put a link of a presentation.
- 15:42So there's this thing called FoxDot, which is Python-based.
- 15:45People can go up there, and they basically create little, like, symphonies.
- 15:48Oh, that is awesome.
- 15:50And with Python, and it's super interesting.
- 15:52Anyway, I was going to ask your thoughts on that as a sort of HCI person.
- 15:56Yeah, yeah.
- 15:57I'll get it next time.
- 15:58Yeah, I grabbed a, yeah, I'm just looking at the page now.
- 16:01But yeah, that's a whole other world.
- 16:02I mean, it's an awesome world.
- 16:03I mean, this whole world of just live performance and, you know, live streaming and stuff is fascinating.
- 16:08You know, maybe the next Twitch stars are going to be data scientists, right, who are, you know, live streaming their exploratory analysis.
- 16:14There are some data scientists I've seen who do these live streams or do these, you know, recorded sessions.
- 16:19Like, let me just play with this data or do this Kaggle thing and just watch me play with it, which is really cool.
- 16:24That's really, I think you're right.
- 16:26I think it's super interesting.
- 16:27I feel like a lot of algorithms and libraries and just software products, I guess you'd call them.
- 16:34It could be very stale, you know, much like math or science.
- 16:38Like, here's the final result.
- 16:39Here's the algorithm or the formula.
- 16:41But that doesn't give you an appreciation of, like, seeing the, how do I, like, bumble around and, like, discover and think and try and explore and then come up with an answer.
- 16:51I think that would be really interesting for data science and, like, Kaggle competitions and stuff.
- 16:55Yeah.
- 16:55And I think that segues to our notebook work, too, because I feel like a lot of these notebooks, maybe Sam, I'm going to talk more on this later, is that, like, a lot of these sorts of interfaces could support this sort of liveness and this sort of iteration and keeping different versions around and seeing how you, you know, bumble your way toward a final result.
- 17:11Yeah, yeah.
- 17:11Maybe the next big particle physics discovery Nobel Prize will be live streamed.
- 17:16All right.
- 17:16So, Sam, let's get to the analysis.
- 17:19So, you said there were a bunch of different environments that you studied and you broke them into three categories, the academic world, the product world, and the R&D world.
- 17:31Maybe give us a sense of what's in each one.
- 17:34I don't know if we want to go through all of them, but read off maybe, like, five from each of those that you feel like is representative of that area, just to give people a sense of what's all out there.
- 17:42Yeah.
- 17:43So, probably start with the industry world because that world is probably the most familiar to us and maybe to your listeners as well.
- 17:51So, in the product world, we kind of have Jupyter Notebook and we also have, like, Google Colab, which is Google's version of Jupyter Notebook, as well as Azure Notebooks, which is kind of like this up-and-coming notebook system for JavaScript.
- 18:15Okay. Oh, right, right. Yeah. There is this move to try to make a JavaScript equivalent, basically, of what Python has, right? I mean, it's pretty natural to run JavaScript, but the trick is to find the libraries, right?
- 18:28Exactly. Yeah.
- 18:29And maybe integers.
- 18:30Yeah.
- 18:31No integers in JavaScript can make that a little hard, but still, very cool.
- 18:36All right. And then, next category is academic notebook projects. And these projects typically come in the form of, like, papers. So, people will prototype some interaction and then submit a paper in a human-computer interaction conference.
- 18:53And these papers typically have, like, they take a base notebook system and extend it in one particular way. For example, the Callisto system takes Jupyter Notebook and adds in, like, some live collaboration tools, like a chat window, as well as, I think, being able to see other people's cursors and where they are on the screen.
- 19:12A little bit like a Google Doc-ification of Jupyter.
- 19:15Yeah, yeah. That's what they're going for. We have tools like Rex, which is a tool specifically for, like, data cleaning. So, the idea there is that you would, you could display a data frame in your notebook and then, by example, show Python, in a sense, like, what you want the data to look like after data cleaning. And it can try to infer the Python code that would generate that, that would change the data in the way that you want.
- 19:41Oh, that's pretty cool. And so, it uses a bit of machine learning or something.
- 19:45Yeah, it uses what's called program synthesis. Yeah, that actually was a project led by Ian, who was my other PhD student, who was a co-author on this paper. He did this at a Microsoft research internship. So, they have this program synthesis technology. They have this, you know, engine that basically synthesizes pieces of code. And they applied this technology to notebooks. So, what you can actually do is you can, you know, in a data table, you can say, here are some examples of the way I want to clean the data. And then it'll infer. I don't think it actually is machine learning because it's not database. It's kind of rules-based.
- 20:15Right, right, right, right.
- 20:45So, you kind of have, like, these experimental, but also, like, you look at it and you're like, well, that could be useful in a real system.
- 20:53Yeah, yeah, yeah, I could see that for sure. You maybe just drop a marker, like, hey, I'm going to go explore this. I might want to, like, a save point type of thing. Maybe you want to get back here.
- 21:02Exactly.
- 21:03And then, right, it'll just sort of, that's, like, behind the scenes. We're going to create a Git branch and start doing stuff for you, right? Like, that'd be really nice for people who are, they don't know how to, like, deal with Git branches or want to deal with it and stuff like that.
- 21:14Yeah, that's exactly the use case that they were going for. It's for this very exploratory, early stage, like, data exploration. Yeah.
- 21:21Yeah. Yeah. Okay, cool. The one in the product space that seems to be closest to that is Gigantum. I had those guys on the show and there's a little bit of, like, auto-versioning collaboration stuff in that world.
- 21:34Yeah, yeah. We looked at Gigantum in this paper and I think we did mark it down as being relatively similar to that.
- 21:40Yeah, yeah, cool. All right, the third category was experimental and R&D.
- 21:43Yeah. So experimental R&D is, in a sense, very much like the academic projects in that they are, they're trying to test out new interactions or new features that might not, like, don't have immediate, like, industry use cases or maybe, like, business propositions.
- 22:00And so we have tools like Carbide is an interesting one. Carbide actually allows you to, it creates widgets for your Python variables in line with your Python code.
- 22:12And then it allows you to, like, use sliders to change your variables on the spot.
- 22:17Okay.
- 22:18And it's, like, way out there. It's really interesting. But you can, it actually infers, like, what values your Python variables should take on to produce an output.
- 22:25So if you use a widget to say, like, oh, I want Y to be, like, 32, then if Y depends on X, then it'll also update X at the same time.
- 22:35So it does, like, it's weird. It does look like it's really, like, intriguing, like, program synthesis or, like, program, like, inference, like, behind the scenes to get your program to look right.
- 22:44Right, to look at the dependencies and figure out what it has to rerun.
- 22:46Yeah, yeah.
- 22:47Yeah, that's really cool. It sounds a little bit like the interactive widgets in Jupyter that you can have, you know, you can sort of put some sliders and adjust some things.
- 22:55But I don't believe the Jupyter one has a lot of pendency type of stuff on down the line, right? It's just like this one cell as you slide the widget recomputes.
- 23:03Yeah, yeah. Like, Carbide is like those Jupyter widgets, but super next level. The widgets can change the code itself.
- 23:09Okay, that's pretty wild.
- 23:10Yeah. We have a few industry projects here as well. We have projects from, like, Netflix and Stripe, where they take notebooks, but use notebooks as, like, kind of, like, recurring jobs instead of just one-off, like, exploratory scripts, where they use notebooks as these jobs.
- 23:29And so they can re- the notebook might automatically rerun, like, once a day to perform some data operation.
- 23:36They're kind of, like, broadening the scope of what notebooks can be used for in a large-scale setting.
- 23:40Yeah, you know, the stuff that Netflix was doing with, like, Paper Mill was super interesting.
- 23:45How they're using it to automate a bunch of stuff and sort of schedule a bunch of things to work, but also the fact that if it fails, the notebook has the output of the failure.
- 23:56So basically, you can, you know, save the notebook in that state and just go look at it and see what went wrong.
- 24:02Rather than there's a log message that says something went wrong, like, there's the whole sequence with the history of the notebook output, which is pretty awesome.
- 24:09Yeah. I think the Paper Mill stuff, I mean, they have a blog post about it, but we link to all of this in the paper.
- 24:13So if you, you know, link to our paper, we have all the URLs.
- 24:15I mean, I thought that was interesting.
- 24:17I mean, we didn't really capture this in the- in our space because, you know, most of it is for data scientists.
- 24:22But the Paper Mill project is interesting because it's using notebooks for, like, DevOps and for, you know, production deployment work, right?
- 24:28It's like really using the notebooks as a kind of a DevOps-y sort of tool rather than a direct data science tool.
- 24:34So I thought that was a really interesting and out-of-the-box use case.
- 24:37It's like instead of running cron jobs and seeing, like, gigantic log files on your terminal or grepping through text files,
- 24:44you can just, you know, reconstruct it in a notebook and actually use a notebook to debug your production software, which is cool.
- 24:50Yeah. And the essence of that, I think, was one of the things you do with Paper Mill, if I have it remembered correctly,
- 24:56is the notebooks can take inputs and they can generate outputs.
- 24:59They're, like, sort of become functions in the traditional black box sense of it.
- 25:03Yeah.
- 25:04Yeah. That's pretty neat.
- 25:05Another one I see that you have in there is NB Dev.
- 25:08NB Dev is a really interesting project.
- 25:10I just, we talked about that, Brian Nock and I did a couple episodes ago on Python Bytes.
- 25:15And I was like, oh, well, this might be kind of interesting.
- 25:18And I looked and I'm like, wow, this is something really quite special.
- 25:21It does a lot of neat things over there.
- 25:24Right. So if I'm remembering correctly, NB Dev allows you to take a notebook and, like, deploy it as a Python library.
- 25:32Yes, exactly. Yeah. You can basically turn it into a package.
- 25:35Right. And it can have the test, like, built into it.
- 25:38And, yeah, it's, again, a really interesting example of, like, notebooks are kind of being reused in all sorts of ways that we would see traditional Python scripts being reused.
- 25:47So in this case, instead of writing a set of Python files to become a Python package, you could write a notebook instead.
- 25:54And that could be, like, your package.
- 25:56Yeah. I'll give you the quick rundown for people who are listening and might be interested just off their little highlights.
- 26:01So you can export the functionality of a notebook to a library.
- 26:04They have a CLI commands you can use to interact with NB Dev.
- 26:08Export to HTML builds documentation for your library.
- 26:11Sync brings the Python.
- 26:13So you can edit the Python code and then bring it back into your library.
- 26:17You can put the tests in there and run them in CI.
- 26:20There's just a button that also has this, like, NB strip out concept as well for checking stuff in.
- 26:24So, yeah, that's, I mean, there's a bunch of exploration and innovation happening here.
- 26:29Yeah, it's really interesting.
- 26:30One other interesting project in the experimental section is, like, Iodide.
- 26:34Iodide is, Iodide is, like, super experimental.
- 26:37But they compiled Python and some of its data science libraries into WebAssembly.
- 26:44And then because of that, you can run, you can write Python in the browser.
- 26:49And it doesn't require a separate Python process to run that.
- 26:53Instead, it runs completely within the browser because your browser is interpreting the WebAssembly version of, like, the Python interpreter.
- 27:00And, like, I think they have, like, NumPy and, like, Matplotlib support in there, too.
- 27:05Yeah, they've recompiled many of the core, what would be C-based Python libraries as well, right?
- 27:11Like you said, like, NumPy and maybe Matplotlib.
- 27:13I can't remember.
- 27:14But some of those types of libraries.
- 27:15Right.
- 27:15It's really, it took a while for me to wrap my mind around it.
- 27:19But I was really amazed when I first saw that.
- 27:21I think WebAssembly has some real interesting possibilities to bring a lot of this stuff together.
- 27:25You know, it's one of the things that's interesting about some of the stuff you were covering in these different projects here is just what it means to run the notebook, right?
- 27:34Sometimes that means a Docker image is spun up and configured exactly for you in some environment or even, like, with Gigantum on your local machine.
- 27:42With Google CoLab, there's, like, a way to say, run this on a GPU, by the way.
- 27:47Yeah.
- 27:47Just to get a GPU to run it on.
- 27:49And Iodide runs in the browser through WebAssembly.
- 27:53There's just, there's a bunch of options here that are pretty cool.
- 27:56Yeah.
- 27:56Kind of to Michael's point, it's like, you know, we've just informally kind of starting this project.
- 28:01We've kind of heard about all these.
- 28:02It's felt like the Wild West, right?
- 28:04It's like, oh, you can run the notebooks locally.
- 28:05You can run some JavaScript.
- 28:07Observable ones run the browser.
- 28:08And, like, you know, Iodide, Pyodide compiles.
- 28:10The WebAssembly runs the browser.
- 28:12And then you need some other ones in the cloud.
- 28:14And then some of them have this live editing.
- 28:16Some of them don't.
- 28:16So that's why kind of motivation for putting together this paper was, you know, how do we just categorize all this in the most kind of concise way we can?
- 28:25And, I mean, we're going to talk about more of this detail, but we have one category about runtime environment, right?
- 28:29So we categorize, here's the four types of main types of runtime environments people have and other things.
- 28:34So the kind of main contribution of this paper was really people have all these intuitions.
- 28:38They've heard about these notebooks doing all these different things.
- 28:40Let's just try to plop them all together in a map, in a sense, right?
- 28:44Like, where does everything lie on this wild, this high-dimensional space?
- 28:47Yeah, it's highly dimensional.
- 28:49We're going to talk about the dimensions in a minute.
- 28:51It's more than three dimensions.
- 28:52This portion of Talk Python To Me is brought to you by Sentry.
- 28:58How would you like to remove a little stress from your life?
- 29:00Do you worry that users may be having difficulties or are encountering errors with your app right now?
- 29:06Would you even know it until they send that support email?
- 29:09How much better would it be to have the error details immediately sent to you, including the call stack and values of local variables, as well as the active user stored in the report?
- 29:20With Sentry, this is not only possible, it's simple and free.
- 29:23In fact, we use Sentry on all the Talk Python web properties.
- 29:26We've actually fixed a bug triggered by our user and had the upgrade ready to roll out as we got the support email.
- 29:33That was a great email to write back.
- 29:35We saw your error and have already rolled out the fix.
- 29:37Imagine their surprise.
- 29:38Surprise and delight your users today.
- 29:41Create your free account at talkpython.fm/sentry and track up to 5,000 errors a month across multiple projects for free.
- 29:49And if you use the code Talk Python, all one word, it's good for two free months of Sentry's team plan, which will give you up to 20 times as many monthly events in some other features.
- 30:00So create that free account today.
- 30:06One thing I do want to talk about maybe first is just like some of the challenges of notebooks and then the paradox of choice.
- 30:12So first of all, I think this comes from the paper, but also some of the feelings I had.
- 30:17So you talked about some of the challenges, Sam, being stale data, out of order execution, abundance of code, and then the inability for composition, things that Paper Mill, for example, is trying to solve.
- 30:29Do you want to speak to some of the challenges you saw out in this space?
- 30:32Well, one of the first challenges that a user of Drupal notebooks encounters is typically the out-of-order execution problem, where because you can run cells in any order you want, what might happen is you run some cells, and then you delete some cells, and then you write more cells, and you run those in some out-of-order way.
- 30:51And what happens is, well, one problem is that sometimes your variables just get changed, and you don't know where a change came from because your code might be gone.
- 30:59Right. You might even delete the cell that defined them.
- 31:01Yeah, yeah.
- 31:02But the kernel's still running, so they're still in memory. For now, it's going to be okay.
- 31:06Exactly, exactly. It happens really, really often, in my experience, when we teach students how to use Drupal notebooks for the first time.
- 31:13They hit some random keyboard shortcut, and their cell's gone. And it looks like the code's running fine, but then when they try to turn in their code, everything kind of goes up in flames.
- 31:22Yeah. Well, but it's so much the power of Jupyter as well, right? Like, there's some reports and stuff I have for my business behind the scenes, where there's like a 30-second bunch of reading data, correlating data, and then you want to graph it and slice it and analyze it.
- 31:40And the ability to just go, rerun the cell that sorts it this way and shows that aspect, it runs instantly, right? It just goes and goes and goes. And it's so powerful to not have to rerun that code to be able to change your analysis or how you're exploring it, right?
- 31:56Yeah, exactly. That was the selling point of Jupyter. That's why I've got everyone hooked on Jupyter to begin with.
- 32:00Yeah.
- 32:00It was like that ability to really quickly.
- 32:01Yeah, you do the expensive part. Exactly. Exactly.
- 32:04But it's like the world's worst go-to and then some, you know?
- 32:09Sure. It's like the human-powered go-to, right? Like, you're self-like running the cells and go-to statements yourself.
- 32:16Exactly. Like, with a real go-to, it might be really hard to understand, but you can literally go through the code and see it.
- 32:23Yeah, it's at least deterministic.
- 32:24Yeah, it's at least deterministic, right? But yeah, it's not even with Notebook. So that's a challenge.
- 32:29Yeah, exactly.
- 32:29Because to me, that's the biggest challenge. Yeah, it's this sort of out-of-order stuff. But it's so hard to say, like, well, let's just not do that because it's also the superpower.
- 32:37Right, right. One of the dimensions in this space, I don't know if we're getting there quite yet, but one of the dimensions in this space specifically addresses this because a number of projects that we see from academia and from industry try to, like, address this specific in-order, out-of-order execution issue.
- 32:53Projects like Papermode, which we briefly talked about before, address it in a different way by trying to just, like, make sure that whenever a Notebook is run, it only runs from top to bottom like a computer would, rather than how a human might execute it.
- 33:06So there's different angles on how to get around an out-of-order execution thing. But as you mentioned, it's like the main benefit and also the main weakness of these Notebook systems.
- 33:16Yeah. Did you guys study Streamlit?
- 33:19Streamlit?
- 33:20Yeah.
- 33:21So Streamlit has a really interesting way of solving that in that they basically use Funktool's LRUCache.
- 33:27They don't exactly use that, but they more or less, the concept is the same.
- 33:31And they've got these different functions that more or less act like cells.
- 33:35And when you rerun it, if you give it the same inputs, it uses the cached version.
- 33:38But if the inputs happen to change, then it'll give you a different output.
- 33:42So it sort of keeps that, you know, don't recompute the stuff I already know aspect.
- 33:47Right, right.
- 33:48So Streamlit has an interesting execution model that I think we also noticed in some other systems where it looks to you as a user that whenever you make a change, your Notebook gets rerun from top to bottom every time.
- 34:01But then behind the scenes, it does some smart caching and computing to avoid the work.
- 34:07So you kind of get the benefit of rerunning a script every time without the drawback of having to like wait a long time for some expensive operation to recompute.
- 34:16Yeah.
- 34:16Yeah.
- 34:17Interesting.
- 34:17This is a big challenge to put all these things together.
- 34:21I mentioned The Paradox of Choice, which is a fantastic book if people haven't read it.
- 34:25But I feel like one of the challenges that things you all may experience is if you look at all these different things, you're like, oh, Rex does this amazing thing.
- 34:33Callisto does that.
- 34:34And Streamlit does this other thing.
- 34:36And then Jupyter has this amazing aspect.
- 34:38Not any single one of these has all the good things you want.
- 34:42But any choice down one path will make you feel like, well, I don't get the machine learning like auto cleanup in this one.
- 34:50And I don't get the, you know, the cursors.
- 34:52Like, do you feel like there's a bit of a, I don't know, fear of missing or feeling of missing out as you like have to go down?
- 34:59You got to use one.
- 35:00You can't use them all.
- 35:01Oh, yeah, for sure.
- 35:02Nowadays, when I use Jupyter, I mean, Jupyter is a system I still use.
- 35:06But now that I know about all these other systems, oftentimes when I use Jupyter now, I'm like, dang, if only I had, you know, Next Journal.
- 35:13If only I had like Databricks right now.
- 35:15Yeah.
- 35:16But then you'd want Jupyter to lab back for something else, right?
- 35:18I mean, it's like, there's a lot of different things going on here.
- 35:21It's a lot of flowers blooming, I would say, I guess.
- 35:23Right, right.
- 35:24So we talked a little bit at the end of the paper in the kind of discussion part about, you know, what if you did this kitchen sink, right?
- 35:30What if you just threw everything together?
- 35:32What if someone made a notebook that has everything?
- 35:34And, you know, one, it's an enormous software engineering challenge, right?
- 35:38Nobody would want to take on that challenge of maintaining 500 different sorts of features.
- 35:43And the other one is that it just may make the interface really complicated, right?
- 35:46It's not like, if you can choose, imagine, like, you can choose different kinds of execution orders or choose a reactive versus an in-order one and you choose all the stuff, like, it would just be really, really hard for people to set up.
- 35:58So, you know, some of these notebook systems, you know, say Jupyter or some of the other ones, I think they've been successful because they've, I would say, I don't want to say straightforward, but their feature set is limited, right?
- 36:08Like that, you know, it's, even though Jupyter has this out-of-order issue, it's like, okay, what you see is what you get as long as you execute in that order.
- 36:16Yeah.
- 36:16And some of the real power is you can have semi-structured, reusable tiny bits in, say, cells when you're just a biologist or an economist and you don't have to become a computer scientist person to, like, learn Haskell to take advantage of this thing.
- 36:33Like, it's incredibly, yeah, it's incredibly accessible to just jump in and write a few lines of imperative code and then get some really awesome output.
- 36:42And so, yeah, I feel like if it became too advanced, right, you're like, well, do you want the reactive model, the asynchronous model?
- 36:50You're like, I don't know what this means.
- 36:52I just want a graph, right?
- 36:53Yeah, because, I mean, one of the challenges with, say, Observable, right?
- 36:56I mean, Observable has this really elegant reactive thing where this stuff auto-updates, and they have a lot of examples, right, on their website.
- 37:03But I still think it's going to be hard for regular people, regular programmers to pick up because it looks kind of like JavaScript.
- 37:09But then when you write it, it's like it has all these, like, little extensions to JavaScript that you need to wrap your head around.
- 37:15So, you know, it's the age-old thing of, you know, more powerful programming languages environments are just going to be higher barrier to learn, right?
- 37:22So it's very hard in practice.
- 37:24Yeah, yeah.
- 37:24So let's talk about the dimensions.
- 37:26Sam, you put together 10 different dimensions on how you sort of evaluate these things and, you know, a spectrum along them.
- 37:34For example, like data sources, you have local files, cloud storage, large data, streaming data.
- 37:39Want to run us through this?
- 37:41Sure.
- 37:42We can start with, like, the highest level breakdown.
- 37:45We organize the design space dimensions here around the steps in the workflow of a data scientist.
- 37:51So as a data scientist, we imagine that you might start a project by importing your data and then writing and editing your code and your prose around that code.
- 38:02And then you would want to run that code.
- 38:04And then finally, you'd want to publish your notebook in some way.
- 38:07So it's like the input, editing, and output steps for a data scientist.
- 38:12And those are, like, the workflow steps.
- 38:16And the 10 dimensions that we pulled out were data sources, as you mentioned, and things like versioning and collaboration, as well as execution models and execution liveness.
- 38:29And for publishing a notebook, we talked about, like, you might want a notebook as a static HTML page or maybe as a software package, as we alluded to earlier.
- 38:38There is a lot to consider here.
- 38:39Let's just maybe grab a couple and to give people a sense, then they can go look at the paper.
- 38:45You've got a big full page graph chart type of thing.
- 38:48Yep.
- 38:49Chart, I guess.
- 38:50For example, I mentioned data sources, right?
- 38:52We've got local files.
- 38:53And you say, okay, this is access local file system.
- 38:56And you always give an example of a system that implements that.
- 38:59Like, so RStudio, for example.
- 39:01Right, right.
- 39:02What else is on that access there?
- 39:03Yeah.
- 39:04So we have local files, which means that the system basically only, like, natively supports opening files that are stored locally on the same computer.
- 39:12Some notebook systems also allow you to read in cloud files, like files on their servers as though they were local.
- 39:20This is what Google Colab does.
- 39:23It allows you to read in files from Google Drive as if they were stored locally alongside a notebook.
- 39:29We have some systems that have some special handling for large data sets, like data sets that don't fit in a computer's memory, like Databricks, uses Spark to handle that.
- 39:38Right.
- 39:38And we also have some systems that support streaming data.
- 39:41So, like, you might hook up your notebook to some, like, web socket on the internet.
- 39:47And as new data comes in, your notebook will automatically rerun and update to reflect the latest versions of those data.
- 39:52Oh, like if you want to set up a dashboard and as things behind the scenes change, like, the notebook is always sort of up to date with the state of the world.
- 40:02Polling almost, but better.
- 40:03Yeah, exactly.
- 40:04So you can kind of see from the way you described that, that every single, like, dimension here has some use case.
- 40:11And the use case is kind of motivated by some real world, like, somebody sat down and was like, man, I don't like rerunning my notebook to update my dashboard every time.
- 40:19I just wish I had some way to, like, have it automatically, like, streaming the data and update itself.
- 40:23Yeah.
- 40:23Yeah, for sure.
- 40:25So let's go just through two more and then I'll let people go check out the details for the rest.
- 40:29So how about execution order?
- 40:31Yeah, so execution order goes directly to the in order, out of order problem that we were talking about earlier, where the Drupal notebooks allow users to run cells in any order they choose.
- 40:42So I can jump around cells freely.
- 40:44Other systems like Observable require a certain order of cells.
- 40:50So what Observable does is it takes a cell, looks at all the dependencies, like, the variable dependencies of that cell, and then forces a notebook to run in the topically sorted order of cells, right?
- 41:02Depending on, like, what cells to run should depend on other cells.
- 41:06We also have systems like Streamlit, which force, like, this in order execution model that we discussed earlier, where it looks to the user, like, the cell, like, the notebook always runs from top to bottom every time.
- 41:17So those are the three main variations we found of ordering execution.
- 41:22Yeah, interesting.
- 41:23Let's go to the very last part, the end of this lifecycle, if you will, and talk about notebook outputs.
- 41:29Yeah, so notebook outputs, we found the most common use case, I think, reflected across all of our systems was taking a notebook and publishing it as a static report, so to speak.
- 41:39So it's essentially like taking a notebook and converting it to HTML and emailing the HTML file or putting it up as a web page somewhere.
- 41:47The next step up would be, like, a dashboard where you don't have, where you don't show viewers the code that you might, like, where you might require to produce to charts or graphs.
- 41:58You just show the charts or graphs, like, themselves.
- 42:01Right.
- 42:01Okay.
- 42:02And then finally, within that space, we have, like, what we call software artifacts, which encapsulate the idea of you can use notebooks as cron jobs, or you can use notebooks as software packages.
- 42:13Right, right, like NB dev creating something you could put on PyPI.
- 42:17Yeah, exactly.
- 42:18Exactly.
- 42:18Yeah.
- 42:19Yeah.
- 42:19I really think it's cool that you broke it down like this, but then each one has an example type of thing.
- 42:28So you're like, okay, well, how does, say, Gigantum do it?
- 42:30Or how does Streamlit do this thing?
- 42:32Or Observable?
- 42:33And so on.
- 42:34Yeah, I think actually seeing all this stuff together might inspire features to start cross-pollinating.
- 42:40Hopefully not every single feature, right?
- 42:42That would be too much, but still.
- 42:44The kitchen sink.
- 42:44Yeah.
- 42:45It seems powerful.
- 42:45Kitchen sink notebook.
- 42:46Yeah.
- 42:48Yeah.
- 42:49I mean, maybe kitchen sink is available on PyPI.
- 42:52Like, you could just go for that.
- 42:53Yeah, yeah.
- 42:53Pick install kitchen sink.
- 42:54Yeah.
- 42:54Exactly.
- 42:55Gives you half the kitchen sink.
- 42:57Takes half an hour.
- 42:58Yeah.
- 42:58Kitchen sink.
- 42:59Wait five minutes.
- 43:00Awesome.
- 43:01All right.
- 43:02Well, this is a really interesting view.
- 43:04I guess, you know, maybe let's kind of close out the conversation around this stuff by asking,
- 43:08I'll let you both each way in on this.
- 43:10What surprised you?
- 43:12Like, as you went through this, what did you expect and what was different than that?
- 43:16What surprised you as you went through this?
- 43:18I mean, first thing that surprised me is how many there were, but what else?
- 43:21For me, I think it was this tension between we hear about the problems of notebooks quite often.
- 43:27And yet we, from this analysis, we don't often see those desires reflected in actual products.
- 43:33So the in order, out of order execution model, for example, the vast majority of the systems we looked at only allowed any order execution where the user defines execution.
- 43:43Collaboration between users and notebook authors is relatively common.
- 43:49But in a company, you'd rarely find someone working on notebook all by their loans themselves.
- 43:53But at the same time, we see very few systems that support like the sort of real-time collaboration that Google Docs has made popular.
- 44:00Right.
- 44:00And it seems so, so easily on the cusp of that because it's already in the browser.
- 44:06Often it's already hosted.
- 44:08Right?
- 44:09Right.
- 44:09Right.
- 44:10Exactly.
- 44:10So it kind of reveals, I think as a whole, the analysis reveals that there's still room for improvement for a lot of these products.
- 44:18Yeah.
- 44:19Yeah.
- 44:19Good.
- 44:20Yeah.
- 44:20And I guess, I don't know if it was a surprise as much as, you know, something that, you know, we mentioned toward the end of the paper was that, you know, on the, you know, Sam kind of mentioned the product side of, you know, practically speaking, things are pretty tied to Jupyter-like things because people are used to that.
- 44:34And a lot of products are Jupyter extensions or Jupyter hosted on Azure, Jupyter hosted on AWS, Jupyter hosted on Google Cloud.
- 44:41And so my kind of focus is thinking about the academic side, think about the research papers that people have been prototyping for this.
- 44:48And, you know, I don't know if it was a surprise, but it's something that was kind of a call to action we had at the end of the paper is that, you know, I felt personally that the academic work was not sufficiently weird, maybe.
- 44:58Right.
- 44:58So it's like you want, you kind of, you, you know, one of the roles of academic research and prototypes is you want to push the bounds and try stuff that's very different.
- 45:06Right.
- 45:06So imagine experimental programming language or experimental toolkits.
- 45:09You know, the point isn't to be practical.
- 45:11The point is to stretch the limits of what we know.
- 45:14So because I think notebook research is still pretty early, it's all these systems in academia have been done probably within the last four or five years.
- 45:22It makes sense that the first wave is fairly kind of, you know, making the extensions that people expect, right?
- 45:28Versioning, in order execution, collaboration and stuff.
- 45:31So I think that what would excite me more to see in the coming years is just to see the academic projects or the R&D projects becoming more weird, right?
- 45:39So one of the things that we pitched at the end is just thinking about multi-device, different kinds of off-desktop devices, right?
- 45:46I mean, already we're computing with phones and smartwatches and augmented reality and displays, but we're still just hunched over in front of our laptop, typing in this, literally just typing in a text box in the web browser, right?
- 45:57Like that's all the notebooks are.
- 45:58They're just little text boxes in web browsers.
- 46:00So I think we can really expand our imagination thinking, you know, way beyond.
- 46:04That would excite me a lot more.
- 46:06Yeah.
- 46:07Very interesting.
- 46:08Yeah.
- 46:08And to echo that point, what we drew out of the notebook systems was like this data science workflow.
- 46:14But the reason why we drew out the data science workflow is because I think every single system that we've evaluated here was designed for data scientists for the most part.
- 46:24And so with data scientists as the audience of choice, I think they're necessarily like, it comes with like a limitation on what we can imagine notebook be used for.
- 46:35So in the paper, we talk about broadening notebook use cases for other types of users, like perhaps instructors for perhaps like maybe like artists, let's say.
- 46:45And each of those audiences has probably an entirely different set of desires and things they want to accomplish with programming.
- 46:53And I think with that comes like a whole nother set of trade-offs and perhaps design dimensions for notebook systems.
- 46:58That's a good point.
- 46:59Yeah.
- 46:59Like DJs, musicians, orchestras.
- 47:03Like what could you do?
- 47:04Like what kind of world would you build if you were trying to, you know, coordinate that kind of stuff?
- 47:08Philip, you brought up our phones, which are pretty incredible these days.
- 47:13Did you guys look at Carnet?
- 47:15I mean, it's not really something that needs separate analysis because it's just basically Jupyter, but Carnet, C-A-R-N-E-T-S, which is a open source thing on at least a free thing.
- 47:28I'm pretty sure it's open source for Jupyter running natively on iOS.
- 47:31Oh, interesting.
- 47:32I haven't looked at that.
- 47:34Yeah, it's pretty new.
- 47:35I just learned about it a few months ago.
- 47:37Oh, Stan, that's on GitHub.
- 47:38Yeah.
- 47:39We should add that to our analysis if we had time.
- 47:43That's pretty cool.
- 47:44It is, but I mean, it's not really fundamentally different, but it's interesting that it has NumPy.
- 47:49Right.
- 47:50It's just on the platform.
- 47:51Yeah.
- 47:51And a lot of those libraries like natively executed on iOS, not like an interface to some cloud thing, but like legitimately there, you know?
- 47:58Yeah.
- 47:59I mean, already people are talking about, you know, on our mobile phones, right?
- 48:02That, you know, for machine learning, right?
- 48:04You download these pre-trained models so then you can just do inference on your phone without going to the cloud, right?
- 48:09So both for privacy, right?
- 48:10If you want to do image recognition, both for privacy and for bandwidth.
- 48:13You can do all this computation on your phone locally.
- 48:16So you could imagine, you know, what would it mean if you could do data science out in the world, right?
- 48:20You have your smartwatch, you have your phone.
- 48:22You could just, you know, do your analysis, your Google Glass or whatever.
- 48:25There's this kind of sci-fi future.
- 48:27Yeah.
- 48:28I guess like, you know, the thought that we have as kind of human computer interaction or HCI researchers is, you know, what would the future of computing look like, right?
- 48:35Right now, it still looks like people hunched over on their laptops, typing in text boxes, right?
- 48:40Like, you want to go beyond that somehow.
- 48:42Still waiting to just plug an interface right into the neck, right?
- 48:45No more typing or massing.
- 48:47Projects onto your retina.
- 48:49You can have Jupyter in your eyes.
- 48:51Exactly.
- 48:52Sign me up.
- 48:53You'll be the first best subject.
- 48:55Yeah.
- 48:56Maybe not the first, but early adopter.
- 49:00Let's put me in that category.
- 49:01All right, you guys.
- 49:02This was super interesting.
- 49:03And it definitely opened my eyes to some things that are going on out there that I had no idea about.
- 49:08So super cool research.
- 49:09Thanks.
- 49:10It was really fun for us to talk about it.
- 49:11Yeah, for sure.
- 49:12Now, before you get out of here, I'm going to ask you the two questions that go at the end of the show all the time.
- 49:17And I'll, Philip, I'll pick on you since you're a veteran.
- 49:19If you're going to write some Python code, what editor do you use?
- 49:23I still use Vim because I haven't learned anything new.
- 49:26So I still use Vim with whatever defaults.
- 49:28Right on.
- 49:29All right.
- 49:30And then notable PyPI package, something that you've used that is interesting.
- 49:34I'll do a plug for Sam's actually.
- 49:36So Sam, for his master's thesis at Berkeley, he made this package called MB Interact, which is related to Jupyter Notebooks.
- 49:42It's called MB Interact.
- 49:44And you can pip install it.
- 49:45So I'll let Sam talk more about that.
- 49:46That's a lead into Sam's stuff.
- 49:49Thanks.
- 49:50Yeah, yeah.
- 49:50Cool.
- 49:51All right.
- 49:51Sam, if you're going to write some Python code editor?
- 49:53Yeah.
- 49:53So I use VS Code.
- 49:54But I've hopped from Sublime to Emacs to Vim and then not to VS Code.
- 49:59So now I'm a happy VS Code user.
- 50:02All right.
- 50:02Cool.
- 50:03Do you do any bindings?
- 50:04Like you set up Vim bindings or Emacs bindings in there or something?
- 50:07I set up Vim bindings.
- 50:08But if the VS Code team is listening, there are some problems I have with the Vim bindings in VS Code that I'd love to talk about.
- 50:14Oh, we're calling them out.
- 50:14This is the call-out section.
- 50:16This is where we start the beefs.
- 50:18The call-out section at the end of the episode.
- 50:20That's right.
- 50:20It's the underhanded compliment.
- 50:23Not exactly.
- 50:24But it's like, I love it, but beautiful.
- 50:26No, VS Code is a good one.
- 50:28All right.
- 50:28You want to tell us about MB Interact?
- 50:29Sure.
- 50:30MB Interact, it lets you take a Jupyter Notebook with some widgets.
- 50:35And normally those widgets don't work outside of the notebook environment.
- 50:38Like if you convert the notebook to a web page, to an HTML page by default, the widgets will just break because you don't have a Python service running underneath the notebook.
- 50:46But MB Interact allows, it kind of like takes your HTML page and hooks it up to the binder service from the Jupyter team so that you can have a, you can have like this HTML page with interactive widgets, but it doesn't require you to have notebook, a notebook server running locally.
- 51:00So you can kind of like share those things.
- 51:02You can kind of share your interactive notebooks more readily.
- 51:05That's the idea.
- 51:06I see.
- 51:06You don't have to set up a proper Jupyter server with all the execution and stuff.
- 51:10Yeah.
- 51:10You're going to send someone a link to a web page and then they can run your interactive widgets.
- 51:14That's the idea.
- 51:15Okay.
- 51:15Yeah.
- 51:16Yeah.
- 51:16Ah, excellent.
- 51:17As for like personal use, I like the TQDM package.
- 51:20It gives you like a progress bar when you run, when you run the four loops.
- 51:23Really handy.
- 51:24Yeah.
- 51:24Yeah.
- 51:25That's really cool.
- 51:25There's a couple of interesting progress bars that you can use, but it's those little touches,
- 51:31you know, color, progress bars, maybe a few emojis.
- 51:35It just makes it feel so much nicer to work in a CLI app.
- 51:38Yeah.
- 51:38Our next paper is analyzing 60 progress bar libraries.
- 51:41Yeah.
- 51:4160, 60 progress bar libraries.
- 51:44And emojis.
- 51:44What emojis they use.
- 51:46And emojis.
- 51:46Yeah.
- 51:47Perfect.
- 51:47Perfect.
- 51:48All right.
- 51:49Well, you guys, this is really fun.
- 51:50People want to know more about your research, your paper.
- 51:52What do they do?
- 51:53How do they find it?
- 51:54I mean, I'll put a link in the show notes, but what else?
- 51:56Yeah.
- 51:56They can just go to the links.
- 51:57Michael, I sent you a link in the chat about MB Interact.
- 52:00And then we sent you the paper links and such.
- 52:03We can put both of our homepages on there and such.
- 52:06Sam, any other plugs?
- 52:07Yeah.
- 52:08I think you remind me that I haven't put up the paper online.
- 52:13I don't know if you have the paper online anywhere.
- 52:14Yeah.
- 52:15I have it on my page.
- 52:16Yeah.
- 52:16Oh, you do.
- 52:16Okay.
- 52:17So we can maybe link to the paper from Philip's page.
- 52:19Yep.
- 52:19Sounds good.
- 52:20Well, I'll definitely do that.
- 52:21All right, you guys.
- 52:22Thank you so much for being on the show.
- 52:23It's been really interesting.
- 52:24And yeah, there's a lot of notebook exploration and flowers blooming.
- 52:30So thanks for putting it all together into like one analysis here.
- 52:34Yeah.
- 52:34Really big thanks to you, Michael, for having us on.
- 52:37And it's been really fun to talk about all the flowers, all the fields of flowers.
- 52:42Likewise.
- 52:43Thank you so much, Michael.
- 52:44Have a good day.
- 52:45See you later.
- 52:45Bye.
- 52:46This has been another episode of Talk Python To Me.
- 52:49Our guests on this episode were Sam Lau and Philip Guo.
- 52:53And it's been brought to you by Linode and Sentry.
- 52:55Start your next Python project on Linode's state-of-the-art cloud service.
- 53:00Just visit talkpython.fm/Linode.
- 53:03L-I-N-O-D-E.
- 53:04You'll automatically get a $20 credit when you create a new account.
- 53:07Take some stress out of your life.
- 53:10Get notified immediately about errors in your web applications with Sentry.
- 53:15Just visit talkpython.fm/sentry and get started for free.
- 53:19Want to level up your Python?
- 53:21If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
- 53:26Or if you're looking for something more advanced, check out our new async course that digs into
- 53:31all the different types of async programming you can do in Python.
- 53:34And of course, if you're interested in more than one of these, be sure to check out our
- 53:38Everything Bundle.
- 53:39It's like a subscription that never expires.
- 53:41Be sure to subscribe to the show.
- 53:43Open your favorite podcatcher and search for Python.
- 53:45We should be right at the top.
- 53:46You can also find the iTunes feed at /itunes, the Google Play feed at /play,
- 53:51and the direct RSS feed at /rss on talkpython.fm.
- 53:55This is your host, Michael Kennedy.
- 53:57Thanks so much for listening.
- 53:59I really appreciate it.
- 54:00Now get out there and write some Python code.
- 54:02I'll see you next time.