Newswise — For decades, fierce debates have raged over the benefits of different programming languages over others: Java vs. C++; Python vs. Ruby; Flask vs. Django. While often waged with religious fervor by computer scientists and programmers, these debates tend to rely on anecdotal evidence, with very little rigorous comparison of programming approaches or the larger question of how software may augment human thinking.

With a $750,000 grant from the Alfred P. Sloan Foundation, researchers from the University of Chicago’s Knowledge Lab and the University of Wisconsin-Madison Department of Psychology will tackle these much-disputed questions, focusing on how different programming tools work with our minds to shape the scientific process.

“The idea is to examine the way in which computer languages can both expand and limit how individual and collective minds work,” said James Evans, director of the Knowledge Lab, professor of sociology at UChicago and Computation Institute senior fellow. “We’re trying to figure out how human minds respond to different functions and different domains, both in programming languages and in popular data science environments.”

The idea that learning and using certain computer languages can influence how people solve problems resonates with the famous Sapir–Whorf hypothesis, which holds that spoken languages differ in psychologically important ways, such that learning the grammar and vocabulary of a language can nudge thinking into certain directions. The idea was once a taboo subject in psychology and linguistics, but hundreds of studies have now revealed links between human language, cognition and perception.

But while it is difficult or impossible to establish equivalence between natural languages, most computer languages are “Turing complete” — anything that can be expressed in one computer language can be expressed in another. The existence of hundreds of formally equivalent programming languages makes it all the more interesting to investigate differences in how they support problem-solving and imagination.

“People who in one breath argue that it doesn’t matter which language one uses because they are equivalent, in the next breath sing praises of their favorite language because it is more ‘natural’ than the competition,” said Gary Lupyan, an associate professor of psychology at University of Wisconsin-Madison and a co-investigator on the grant.

The team will start by studying code from online repositories, such as Github and BitBucket, as well as analyzing questions and responses posted on StackExchange. This massive dataset will be used to reconstruct a “natural history” of programming languages, tracing how often each is used and for what purposes. Researchers will also measure characteristics for each language, such as efficiency (how quickly it can be used to solve a problem), creativity (how many paths tend toward the same solution) and collaboration (how well the language can be collectively used by a group of programmers instead of a lone coder).

Based on these observations, the researchers plan to use coding competition sites such as Code Golf and TopCoder to compare how different language communities solve the same challenge, as well as experiments in a controlled programming “sandbox” where coders only have access to specific functions and operators.

Research conclusions could inform the design of new programming languages, coding environments and coding styles, and improve understanding of the role of programming and software in science.

More generally, Evans said, the project will not only provide valuable information about what languages or features people should choose in particular contexts, but also insight on how human minds use software “prosthetics” to pursue knowledge.

“By understanding and testing these languages, we can figure out what kinds of features end up shaping the way in which people and groups actually think with these mind tools. Then we can also do the converse and figure out how people and groups think,” Evans said. “I hope we learn some practical and fundamental things about the nature and limits of human intelligence.”

###

The Computation Institute (CI), a joint initiative of the University of Chicago and Argonne National Laboratory, is an intellectual nexus for scientists and scholars pursuing multi-disciplinary research and a resource center for developing and applying innovative computational approaches. Founded in 1999, it is home to over 100 faculty, fellows, and staff researching complex, system-level problems in such areas as biomedicine, energy and climate, astronomy and astrophysics, computational economics, social sciences and molecular engineering. CI is home to diverse projects including the Center for Robust Decision Making on Climate and Energy Policy, Knowledge Lab, The Urban Center for Computation and Data and the Center for Data Science and Public Policy.