When you’ve taken considered one of our information science programs, you’ve in all probability seen Jupyter Notebooks, the industry-standard workspaces for creating information science code and visualizations. Jupyter Notebooks are constructed proper into classes in a lot of our programs and paths — like Getting Began with Python for Knowledge Science and Introduction to Huge Knowledge with PySpark — so you will get hands-on reasonable expertise working with the instruments that skilled Knowledge Scientists use within the wild.
Nick Duckwiler, a Software program Engineer II at Codecademy, led the tech group that was tasked with integrating Jupyter Notebooks into the educational atmosphere, (the interactive platform that you simply see whenever you’re taking our programs or paths). It was a novel problem with layers of steps that took a yr to finish from kickoff to launch. “There was kind of a blueprint for a way to do that, however numerous it we had to determine ourselves,” Nick says.
Right here’s an inside take a look at how Codecademy engineers constructed Jupyter Notebooks into our programs and paths, the hurdles they confronted within the course of, and the teachings they realized from constructing this function.
The challenge: Get Jupyter Notebooks within the Codecademy studying atmosphere.
Usually, the Jupyter Pocket book internet app runs domestically or on a cloud supplier, “which is tough by itself,” Nick says. The group had so as to add Jupyter Notebooks as a part within the studying atmosphere, hook it as much as our different functionalities, and talk with the Jupyter Pocket book server, in order that learners might write, save, and consider code all whereas taking a course.
There have been three initiatives nestled inside this bigger task:
- Allow Jupyter notebooks to run on our back-end infrastructure
- Be sure that the entrance finish of the product appears to be like presentable
- Add a performance so learners can check their code and floor an answer
Study one thing new totally free
Investigation and roadmapping
“There was an preliminary step to only examine that this was doable on the again finish, as a result of a Jupyter Pocket book runs in our containers. It took three or 4 months of labor to analyze that. Early on, it took me some time to know actually what Jupyter Notebooks is and what it means whenever you run Jupyter Notebooks.
Throughout our sprints, we do these items known as spikes, the place one or two engineers will discover how exhausting one thing is, if one thing is feasible, or how a lot work it’ll require if we do it. You simply type of poke across the code considering, What do we have to get this going? Often, that leads to some proof of idea.
Then we make a challenge plan for all of the work that must be carried out. Every challenge has a technical lead, an engineer who takes the consumer necessities or the designs and figures out the way it will get carried out. We additionally often have assist from a Challenge Supervisor to determine what must be prioritized first and who must be engaged on what. Quite a lot of planning occurs in Jira, the place we are going to make epics or sagas, that are giant collections of tickets. Then we break it down into smaller bits till there are particular tickets that an engineer can decide up and do inside a couple of days.”
Implementation
“I had an enormous Notion doc that I’d write down all my findings in, and they’d ultimately end in a PR, which is a few quantity of code that I used to be going to alter that may get reviewed by another person and shipped. The entrance finish of our programs and paths is constructed with TypeScript utilizing React, Redux, and Subsequent.js frameworks. After which the back-end companies which might be associated to this challenge are written in Golang.

A typical day concerned numerous coding, researching, and looking out on the Jupyter docs. I’d work on it for some time, after which if I acquired caught, I’d ask one other engineer who has extra expertise with totally different components of the codebase for assist. Quite a lot of engineering is simply fixing complications.”
Troubleshooting
“One thing that was tremendous irritating on this challenge was proxying, which is mainly forwarding requests between two companies and authenticating them. It was a complete new infrastructure idea that I had by no means handled earlier than.
When a learner logs on to Codecademy and is in a course or path, they’re linked to a container, which is sort of a mini digital laptop. The container has to undergo a service that authenticates that consumer and assigns them a set of computing assets. After which these computing assets have their very own kind of agent that manages these assets and makes positive that you simply don’t run something dangerous. And if you’re utilizing it for greater than an hour, it provides you a brand new container.
Quite a lot of engineering is simply fixing complications.
Nick Duckwiler
Codecademy Software program Engineer II
There was simply a lot we would have liked to do to ensure all these requests are allowed, and that every service acknowledges the supply of the request, and responds in type. Issues randomly fail, or requests will come again with an uncommon response that doesn’t make sense. It’s very troublesome to debug, and it actually was annoying till I understood it.
It helps to have a great group of individuals which might be actually supportive and wish to assist. That basically carries me numerous instances once I’m so pissed off that I wish to break my laptop. The great factor is that different engineers have all been by any such factor, in order that they know the way it’s. The extra little wins you get, the longer you possibly can go with out one, as a result of you realize there’s one other one on the finish.”
Ship
“The primary time seeing Jupyter Notebooks totally run in our studying atmosphere and having it appear to be what I wished it to appear to be was tremendous rewarding. I bear in mind standing up with my arms within the air — it was so thrilling. It took a lot effort, and also you begin to doubt whether or not it should even work, since you simply hold hitting one other roadblock. You then suppose, that is going to repair the roadblock, and it really works for some time, after which another person breaks it.

For my group, the principle metrics we measure for achievement are supply of the product and the developer expertise. So if different individuals are utilizing this code or utilizing this new function, how simple is it for them to work with it? There are additionally extra technical metrics with extra formal monitoring, similar to Largest Contentful Paint, latency between requests, or if there are dropped connections. We additionally pay attention for suggestions from buyer help. The Curriculum group was actually joyful, they usually’re our essential kind of ‘shopper’ as a result of they’re utilizing Jupyter Notebooks on a regular basis and designing the expertise.”
Retrospective
“I really feel like each time I tackle a brand new challenge that I don’t completely perceive, I study a lot new stuff. With engineering, there are infinite rabbit holes that you would be able to go down and down till you get to, like, how circuits work. This challenge compelled me to study what the heck is happening behind the educational atmosphere.
This challenge was unfold throughout a number of groups and phases. Mariel Frank, Software program Engineer II, was tremendous instrumental and did a ton of labor on this, in addition to Senior Software program Engineer Tim Jenkins. Ian Munro, a Senior Software program Engineer, helped out quite a bit. Leon Pham, a Workers Engineer on the Infrastructure group, helped me with the proxy specifically. After which we had two Product Managers, Dónal Ó Dubhthaigh, and Daniel Munter.”