PAOC Spotlights

A Labor of Love

Thu January 17th, 2019
Kelsey Tsipis | Program in Atmospheres, Oceans and Climate

As a nascent graduate student at the University of Waterloo, Ali Ramadhan worked on a project playfully called “molecular movies.” The work involved shooting lasers at molecules to record how they exploded. Ramadhan’s task was to program simulations that predicted where the molecular shards would land post-explosion, which would then offer clues into the timeline of the chemical reaction.

After toiling over his code, Ramadhan found he needed help programming the complex velocities and trajectories of the explosions. To hone his programing skills, Ramadhan checked out textbooks, but soon found the long blocks of text too dense and unsmiling.

“I feel like learning programing from a textbook doesn’t work for me,” said Ramadhan. “I learn by doing, so I didn’t find the textbooks super useful. I find it more useful to learn something bit by bit.”

He thought of Project Euler, a website that helped Ramadhan master challenging mathematical concepts during undergrad with free, interactive problem sets. The concept behind Project Euler is inductive learning, wherein as users solve problems they build up mastery of concepts that can be used to solve other problems—similar to how video game players “level up” as they advance through a game.

Unfortunately, Ramadhan struggled to find a similar resource specifically geared towards scientists. A website with the right mix of accessibility and complexity could teach students both science and programming in a more intriguing manner than a textbook, he thought.

Ramadhan’s molecular movies never did get filmed. (Turns out, his lab didn’t have sensitive enough instruments.) But the idea for a resource to help teach programming through science would stick with him through graduate school.

When Ali moved to Cambridge, MA, to start his PhD in the Marshall Lab, the idea came with him.

This month the idea finally came to fruition as Ali launched Project Lovelace, a peculiar website that aims to help scientists hone their programming chops and, in its own modest way, bridge the gap between scientists’ and the public’s understanding of climate modeling.

A Labor of Love

Project Lovelace is the culmination of many rainy weekends and holiday breaks that Ramadhan spent coding with his brother. Much like the nature of scientific research itself, over many months, they made tiny, repetitive steps of progress on building the website. Ramadhan would write the problem sets, while his younger brother, Baz, at the time was an undergraduate computer science major, was in charge of the back end. “He’s a wizard programmer,” says Ali.

Ramadhan, who has a physics and climate science background, wanted to be sure the problem sets catered to students with a wide range of interests. “I wasn’t one of those kids who looked at the ocean when they were six and needed to understand the tides,” says Ali. “I kind of lucked into this field. So I wanted the site to be as assessible as possible.”

The problem sets reflect his own, diverse interests, with problems involving rocket science, El Niño intensities, and habitable exoplanets. The problems are designed to be simple enough for the novice scientist but sufficiently complicated enough to require some thought.

They took inspiration from Project Euler, which ranks the problems by the number of people who have solved them, the more difficult the problem the less people who have successfully solved it. But they also added their own twist. With a clean, recipe-like design, each problem offers a time estimate, difficulty level, maximum runtime, maximum memory usage, and function signature. Users are also allowed to submit their answers in one of three programming languages.

Ramadhan named the site in homage to Ada Lovelace, a gifted mathematician who famously wrote the first computer program in 1843—a century before the dawn of the computer age. The name cleverly echoes the title of its inspiration; Project Euler is named after Swiss mathematician Leonhard Euler. One of the more difficult problems on the site, problem 12, involves recreating Lovelace’s calculations of Bernoulli numbers using a recursive algorithm, and even features a picture of her notes.

Screen Shot 2019-01-17 at 5.20.15 PM.png (Full)

Taking it Live

Last week, Project Lovelace went live. The website’s tagline is to “learn science and programming through problem solving.” Each problem teaches the curious student a bit of science, like how to simulate a guitar, splice DNA, or predict the weather, and requires them to code a solution.

Since the launch, Ali and his brother have been in maintenance mode, writing new problems and fixing bugs in their sparse free time. But they have also received some well-deserved validation for their immense efforts. They posted the site on Reddit and got a lot of helpful feedback. They also heard from people willing to help out writing problem sets or creating visualizations. “Getting that feedback was a huge motivation boost for us to keep going,” said Ramadhan.

Taking the effort to its logical end, Ramadhan imagines a future in which the website helps illuminate the behind-the-scenes work of climate modeling in order to make the efforts more accessible and understandable to the general public. Knowing how these things are being built and what kind of work is going into them is the ultimate bridge between science and the public.  

For now, however, he just hopes that there are people out there like himself, unwilling to surrender to the lifeless slog of learning via uninspired textbooks, or the next Ada Lovelace, who is already tinkering with basic math operations, who now have an intrinsically amusing way to learn to code.