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

Date:

Slides

Online

Previous studies have characterized code comments in different programming languages. However, very few studies have focused on the analysis of the information embedded in code comments. None of them compared the developer’s practices to write the comments to the standard guidelines and analyzed these characteristics in the Pharo Smalltalk environment. This paper reports the first empirical study investigating commenting practices in Pharo Smalltalk. We quantitatively and qualitatively analyze class comments of the most recent version of Pharo, to investigate the information types of Pharo comments. Finally, we study the adherence of developer commenting practices to the class template over Pharo versions.

We found that 23 information types are typically embedded in class comments and only seven of them are present in the latest Pharo class comment template. However, the information types proposed by the standard 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 written and formatted in a non-uniform way.