Coding (and Coloring) the Universe

By Kimberly K. Arcand, Chandra X-ray Center/Smithsonian Astrophysical Observatory

Untitled 4
Micro to macro 
Illustration: NASA/CXC/K.Divona

When people ask me what I do for work, I often say that I’m a storyteller. It’s not that I stand on a stage with a microphone and narrate long tales to a rapt audience.

My stories are told differently, not through voice or music, but through lines of code and technical applications. They are stories, of science.

As an undergraduate, I began my career in molecular biology, looking at the tiny organisms that can transmit Lyme disease to humans aboard the Ixodes Scapularis (a.k.a., the Deer tick). But by the time I graduated, I was moving on to learn about another type of science: that of computers.

I didn’t quite realize this as a fresh-out-of-college graduate, but coding is mostly about telling stories. Like many good stories you want to begin at the beginning. The main characters need to be carefully crafted, follow a compelling plot, and arrive at some conclusion, whether a happy ending or not. To make this happen, you use vocabulary and the rules of grammar to change and edit how your story is told.

The difference between more traditional storytelling and that in computer science is that you must use a language foreign to many. Instead of French, German or Arabic, you speak one of the languages of coding, weaving together multiple plot lines: in this case, those of the computer, the code’s functions, and the end user. Your language might be C++, Perl, Java or SQL.

This is what I’ve done in my career, albeit covering quite different topics than what I started looking at under a microscope. For the past two decades, I have worked for NASA’s Chandra X-ray Observatory. This telescope in space looks at some of the most violent and energetic phenomena in the Universe – from black holes to exploded stars.

NASA’s Chandra X-ray Observatory 
Illustration: NASA/CXC/SAO
NASA’s Chandra X-ray Observatory 
Illustration: NASA/CXC/SAO

I work as the Visualization Lead for Chandra and am responsible for a talented team of people who take the data – the information -from this multi-billion-dollar observatory and translate it into products that people from any background can access and use.

In this role, I have attended countless technology and science conferences, speaking engagements and events. Often I would present talks and work with classes of students, and groups for kids.

As has been noted by many, I was surprised and disappointed to find that there seemed to be fewer technical women in or entering the field of computer science than I had seen even when I was an undergraduate back in the 90’s. Surveys from the Computing Research Association reported that less than 12% of bachelor degrees in computer science were awarded women between 2010-11.

There are now many excellent programs out there to address the gender gap in coding, such as Girls Who Code, Women Who Code, Girl Develop It, etc., along with many other groups that address STEM (science, technology, engineering and math) as a whole. I felt like I had an obligation to formulate activities that could work separately or with such groups with like-minded colleagues of my own.

This became possible when my group joined forces with Google and the American Astronomical Society (AAS) to create a coding exercise for kids to learn about RGB (red, green and blue) color on the computer based on the open-source Pencil Code platform.

We created the “Recoloring the Universe” activity, one of those missing links I had been looking for. It offered a real-world example, a way to show — and not just tell — about the type of work you can do in computer science (and astronomy). And the content connects so well with similar processes done in other scientific fields from molecular biology to medicine, that it’s primed for expansion.

By combining the how-to of coding with the discoveries of astronomy, we’ve developed a program that can tap into the best of both worlds. With this activity, we can enable others to tell a story about something in the Universe. The aim is to help show that computing does not end with computers, but extends much further into real world applications.

Since we’ve developed the “Recoloring the Universe” Pencil code project, we’ve presented it to many dozens of schools and groups, with perhaps half of the groups with a near majority of girls in the audience. I don’t expect each one of them to become coders or astronomers, but I hope that some of them will see that they can be if they choose to do so.