SCG News

Implementing Mondrian in Glamorous Toolkit

Cyrill J. Rohrbach. Implementing Mondrian in Glamorous Toolkit. Bachelor’s thesis, University of Bern, September 2021. Details.

Abstract

Developers spend a lot of time reverse engineering software. To do this they often rely on reading the code, which is a slow and unscalable process. They rely on code reading because the environments used for the development are centered around the code editor and do not really offer other tools to help the developer understand the software. The goal of moldable development is to change this. The environment should provide tools to help the user understand software. In order to prevent the tools from not being suitable for the application, the developer should adapt and develop the tools alongside the software. Glamorous Toolkit is a new development environment based on Pharo and built around the philosophy of moldable development. One of the tools offered by Glamorous Toolkit to help understand a piece of software is a multipurpose visualization tool called GtMondrian. GtMondrian takes scripts and turns them into interactive visualizations. These scripts allow for endless customizability, but to do this the user has to know how the graphical elements of Glamorous Toolkit work. Since it takes time to familiarize oneself with those elements, this could well be something that prevents developers from using it to adapt the development tools, and therefore sabotages the concept of moldable development. We propose a tool similar to GtMondrian called CRMondrian. It has a lot of the same functionality with the major difference that the most commonly used customizations, such as changing the shape of the nodes within a graph, are done using builders. Therefore it just requires one simple keyword from the user and eliminates the need for the user to know how the graphical elements work.

Posted by scg at 17 September 2021, 12:15 pm comment link

Adherence of class comments to style guidelines

Suada Abukar. Adherence of class comments to style guidelines. Bachelor’s thesis, University of Bern, August 2021. Details.

Abstract

Code comments play an important role in program comprehension and maintenance tasks. They are written in natural language and follow a semi-structured or unstructured nature. Due to this, assessing their quality is a difficult task. To control certain aspects of quality such as consistency, readability, or preciseness, programming languages provide comment-related conventions in the coding style guidelines. One of the ways to assess comment quality in mentioned aspects is to verify if the code follows the respective coding style guidelines or not. However, what specific types of conventions they suggest related to code comments and if developers follow these conventions while writing comments is not yet explored. Previous works have proposed to automatically assess code quality using various linters or static tools. However, the extent to which these tools support comments is limited and comment validation on a semantic level is not provided. Additionally, one project can follow more than one style guideline. Thus, verifying which convention is from which guideline and to what extent it is followed is an essential but nontrivial task. This thesis provides an empirical study investigation of the content of popular commenting style guidelines and commenting practices in Java and Python. We extract comment-related rules from style guidelines used by 13 open-source projects. Furthermore, we assess nearly 700 statistically significant samples of class comments originating from these 13 projects. The projects vary in domain, size, and number of contributors and are selected from two popular programming languages: Java and Python. This thesis uncovers the quality of class comments written in open-source projects and the content of the comment style guide. We discovered that 57% of the comment conventions rules do not apply to the class comment samples. From the applicable portion, most class comments follow the convention rules. The rules that are followed by the comments the most were mostly rules about the content and writing style of comments. Our results highlight the importance of writing clear and straightforward rules in the style guidelines since they are used and interpreted by developers with different levels of coding experience. In addition, the high percentage of adherence proves that developers do consult style guidelines when coding.

Posted by scg at 1 September 2021, 11:15 am comment link

How to Identify Class Comment Types? A Multi-language Approach for Class Comment Classification

Pooja Rani, Sebastiano Panichella, Manuel Leuenberger, Andrea Di Sorbo, and Oscar Nierstrasz. How to Identify Class Comment Types? A Multi-language Approach for Class Comment Classification. In Journal of Systems and Software 181 p. 111047, 2021. Details.

Abstract

Most software maintenance and evolution tasks require developers to understand the source code of their software systems. Software developers usually inspect class comments to gain knowledge about program behavior, regardless of the programming language they are using. Unfortunately, (i) different programming languages present language-specific code commenting notations and guidelines; and (ii) the source code of software projects often lacks comments that adequately describe the class behavior, which complicates program comprehension and evolution activities. To handle these challenges, this paper investigates the different language-specific class commenting practices of three programming languages: Python, Java, and Smalltalk. In particular, we systematically analyze the similarities and differences of the information types found in class comments of projects developed in these languages. We propose an approach that leverages two techniques -namely Natural Language Processing and Text Analysis -to automatically identify class comment types, i.e., the specific types of semantic information found in class comments. To the best of our knowledge, no previous work has provided a comprehensive taxonomy of class comment types for these three programming languages with the help of a common automated approach. Our results confirm that our approach can classify frequent class comment information types with high accuracy for the Python, Java, and Smalltalk programming languages. We believe this work can help in monitoring and assessing the quality and evolution of code comments in different programming languages, and thus support maintenance and evolution tasks.

Posted by scg at 25 August 2021, 2:16 pm comment link

What Do Developers Discuss about Code Comments?

Pooja Rani, Mathias Birrer, Sebastiano Panichella, Mohammad Ghafari, and Oscar Nierstrasz. What Do Developers Discuss about Code Comments?. In 2021 IEEE 21st International Working Conference on Source Code Analysis and Manipulation (SCAM), 2021. Details.

Abstract

Code comments are important for program comprehension, development, and maintenance tasks. Given the varying standards for code comments, and their unstructured or semi-structured nature, developers get easily confused (especially novice developers) about which convention(s) to follow, or what tools to use while writing code documentation. Thus, they post related questions on external online sources to seek better commenting practices. In this paper, we analyze code comment discussions on online sources such as Stack Overflow (SO) and Quora to shed some light on the questions developers ask about commenting practices. We apply Latent Dirichlet Allocation (LDA) to identify emerging topics concerning code comments. Then we manually analyze a statistically significant sample set of posts to derive a taxonomy that provides an overview of the developer questions about commenting practices. Our results highlight that on SO nearly 40% of the questions mention how to write or process comments in documentation tools and environments, and nearly 20% of the questions are about potential limitations and possibilities of documentation tools to add automatically and consistently more information in comments. On the other hand, on Quora, developer questions focus more on background information (35% of the questions) or asking opinions (16% of the questions) about code comments. We found that (i) not all aspects of comments are covered in coding style guidelines, e.g., how to add a specific type of information, (ii) developers need support in learning the syntax and format conventions to add various types of information in comments, and (iii) developers are interested in various automated strategies for comments such as detection of bad comments, or verify comment style automatically, but lack tool support to do that.

Posted by scg at 25 August 2021, 2:16 pm comment link

What do class comments tell us? An investigation of comment evolution and practices in Pharo Smalltalk

Pooja Rani, Sebastiano Panichella, Manuel Leuenberger, Mohammad Ghafari, and Oscar Nierstrasz. What do class comments tell us? An investigation of comment evolution and practices in Pharo Smalltalk. In Empirical Software Engineering 26(6) p. 1—49, 2021. Details.

Abstract

Previous studies have characterized code comments in various programming languages, showing how high quality of code comments is crucial to support program comprehension activities, and to improve the effectiveness of maintenance tasks. However, very few studies have focused on understanding developer practices to write comments. None of them has compared such developer practices to the standard comment guidelines to study the extent to which developers follow the guidelines. This paper reports the first empirical study investigating commenting practices in Pharo Smalltalk. First, we analyze class comment evolution over seven Pharo versions. Then, we quantitatively and qualitatively investigate the information types embedded in class comments. Finally, we study the adherence of developer commenting practices to the official class comment template over Pharo versions. The results of this study show that there is a rapid increase in class comments in the initial three Pharo versions, while in subsequent versions developers added comments to both new and old classes, thus maintaining a similar code to comment ratio. We furthermore found three times as many information types in class comments as those suggested by the template. However, the information types suggested by the template tend to be present more often than other types of information. Additionally, we find that a substantial proportion of comments follow the writing style of the template in writing these information types, but they are written and formatted in a non-uniform way. This suggests the need to standardize the commenting guidelines for formatting the text, and to provide headers for the different information types to ensure a consistent style and to identify the information easily. Given the importance of high-quality code comments, we draw numerous implications for developers and researchers to improve the support for comment quality assessment tools.

Posted by scg at 25 August 2021, 1:15 pm comment link
<< 1 2 3 4 5 6 7 8 9 10 >>
Last changed by admin on 21 April 2009