program comprehension
Recently Published Documents


TOTAL DOCUMENTS

483
(FIVE YEARS 57)

H-INDEX

30
(FIVE YEARS 3)

2022 ◽  
Vol 22 (2) ◽  
pp. 1-33
Author(s):  
Philipp Kather ◽  
Rodrigo Duran ◽  
Jan Vahrenhold

Previous studies on writing and understanding programs presented evidence that programmers beyond a novice stage utilize plans or plan-like structures. Other studies on code composition showed that learners have difficulties with writing, reading, and debugging code where interacting plans are merged into a short piece of code. In this article, we focus on the question of how different code-composition strategies and the familiarity with code affect program comprehension on a more abstract, i.e., algorithmic level. Using an eye-tracking setup, we explored how advanced students comprehend programs and their underlying algorithms written in either a merged or abutted (sequenced) composition of code blocks of varying familiarity. The effects of familiarity and code composition were studied both isolated and in combination. Our analysis of the quantitative data adds to our understanding of the behavior reported in previous studies and the effects of plans and their composition on the programs’ difficulty. Using this data along with retrospective interviews, we analyze students’ reading patterns and provide support that subjects were able to form mental models of program execution during task performance. Furthermore, our results suggest that subjects are able to retrieve and create schemata when the program is composed of familiar templates, which may improve their performance; we found indicators for a higher element-interactivity for programs with a merged code composition compared to abutted code composition.


Information ◽  
2021 ◽  
Vol 12 (10) ◽  
pp. 424
Author(s):  
Nianfeng Shi

A role-based teaching approach was proposed in order to decrease the cognitive load placed by the case-based teaching method in the undergraduate novice programmer comprehension. The results are evaluated by using the SOLO (Structure of Observed Learning Outcomes) taxonomy. Data analysis suggested novice programmers with role-based teaching tended to experience better performances, including the SOLO level of program comprehension, program debugging scores, program explaining scores, except for programming language knowledge scores, compared with the classical case-based teaching method. Considering the SOLO category of program comprehension and performances, evidence that the roles of variables can provide scaffolding to understand case programs through combining its program structure with its related problem domain is discussed, and the SOLO categories for relational reasoning are proposed. Meanwhile, the roles of variables can assist the novice in learning programming language knowledge. These results indicate that combing case-based teaching with the role of variables is an effective way to improve novice program comprehension.


2021 ◽  
Vol 26 (6) ◽  
Author(s):  
Pooja Rani ◽  
Sebastiano Panichella ◽  
Manuel Leuenberger ◽  
Mohammad Ghafari ◽  
Oscar Nierstrasz

Abstract Context 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. Objective Therefore, our goal is to investigate developer commenting practices and compare them to the comment guidelines. Method 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. Results Our results 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. Conclusion The results suggest 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.


2021 ◽  
Vol 7 ◽  
pp. e631
Author(s):  
Francesca Del Bonifro ◽  
Maurizio Gabbrielli ◽  
Antonio Lategano ◽  
Stefano Zacchiroli

Programming language identification (PLI) is a common need in automatic program comprehension as well as a prerequisite for deeper forms of code understanding. Image-based approaches to PLI have recently emerged and are appealing due to their applicability to code screenshots and programming video tutorials. However, they remain limited to the recognition of a small amount of programming languages (up to 10 languages in the literature). We show that it is possible to perform image-based PLI on a large number of programming languages (up to 149 in our experiments) with high (92%) precision and recall, using convolutional neural networks (CNNs) and transfer learning, starting from readily-available pretrained CNNs. Results were obtained on a large real-world dataset of 300,000 code snippets extracted from popular GitHub repositories. By scrambling specific character classes and comparing identification performances we also show that the characters that contribute the most to the visual recognizability of programming languages are symbols (e.g., punctuation, mathematical operators and parentheses), followed by alphabetic characters, with digits and indentation having a negligible impact.


Sign in / Sign up

Export Citation Format

Share Document