Programming languages are the base for all software, and developers need to use them to create the products that we all use. However, when the research community thinks about creating new features for programming languages, we often care a lot about its technical challenges but not enough about the developers that will have to use the language.
In this work, we try to combine both sides by proposing a Usability-Oriented Design of Liquid Types for Java, and published the work at the 45th IEEE/ACM International Conference on Software Engineering – ICSE 2023 (Core A*) – which occurred last month, May 14-20, in Melbourne, Australia.
The paper is co-authored by three LASIGE researchers, Catarina Gamboa, 2nd year PhD student, Paulo Santos, 3rd year PhD student, and Alcides Fonseca, Integrated Researcher, in collaboration with Christopher Timperley from Carnegie Mellon University.
Developers want to detect bugs as early in the development process as possible since the costs increase with the incremental development of features, and if they are only found in production they can have catastrophic consequences. Type systems have been a popular way to find many classes of bugs, in these cases if we assign a string variable to an integer, we will get immediate feedback of a bug in the system. With Liquid Types, we can extend the verification to catch more classes of bugs, now saying that an integer has to have a value between 0 and 100 if it represents a percentage. However, previous implementations of Liquid Types have not used human-centered design methods which may be a possible explanation for the lack of their adoption.
This paper presents our efforts to create a design of Liquid Types for Java that takes into consideration the developers that will use the system. Therefore, we conducted a developer survey to design the syntax of LiquidJava, our prototype, and evaluated it with a usability study where 30 Java developers used LiquidJava.
The results show that LiquidJava helped developers detect and fix more bugs and that they were easy to interpret and learn with few resources. At the end of the study, all users reported interest in adopting LiquidJava in their project.