Collins '17 and Dennis '18 Create New Programming Language
As many who have tried computer coding know, the introductory languages used in the field can often be difficult to approach and unintuitive. It is with this in mind that Eric Collins ’17 and Alex Dennis ’18 and under the advisement of Associate Professor of Computer Science Alistair Campbell, are this summer creating a new programming language called CSPy geared specifically toward beginners.
In creating a new language tailored to the needs of novice coders, Collins said that they hope to make the process of learning how to program not only easier, but also safer, and more purposefully educational. “The current language being used in our introductory courses is Python,” he explained. “And while some aspects of the language make it fast to learn and program in, it was not designed for beginners and has aspects which can be very confusing to those with little experience.”
One example of this, he said, is Python's typing system. In most programming languages, all values have a type (such as integer, list of items, truth value, etc), and while this is true in Python, variables are not restricted when it comes to what types of values may be assigned to them, and the type of a variable's value may change over the course of the program.
“This means that the programmer must be careful with what they do with their variables,” Collins claimed. “For example, introductory students often accidentally try to do something with two incompatible items, such as adding x and y, where x=2 and y=true.” In CSPy, to contrast, the type of a given variable must be declared before use, and all values assigned to that variable must be of that type. Collins and Dennis also added an additional safety net to alert the user in the case of a mistake, such as the example above, before their code is even run. “Now, instead of spending hours poring over code to figure out why it isn't working, the user will know right away where the problem lies.”
Collins said that while this project has been challenging, he was drawn to the topic for its sense of scale and its relation to his professional aspirations. “This research interests me because it is on a much larger scale than anything I've done in my academic work thus far, and it feels a lot more meaningful.” “It is also providing me with insight into how programming languages work under the hood, and has given me a deeper appreciation for the work and thought that goes into the tools I'll be using for the rest of my life,” he added.
While Collins had relatively little knowledge concerning compilers, or the programs that convert programming languages into code, prior to this research, the topic had interested him for several semesters, and he has plans to pursue a course on compilers during the coming Fall 2015 semester. “On a broader scale,” he added “I have an interest in back-end development, professionally, of which this project is a large part.”
Collins said he has found the work rewarding and relevant to his academic development. With the creation of CPSy, he has left the potential for years of impact upon new and veteran coders alike.