What Do Developers Discuss about Code Comments?

08/17/2021
by   Pooja Rani, et al.
0

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 or process comments in documentation tools and environments, and nearly 20 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 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.

READ FULL TEXT

page 1

page 7

research
02/18/2021

Speculative Analysis for Quality Assessment of Code Comments

Previous studies have shown that high-quality code comments assist devel...
research
08/24/2021

Do Comments follow Commenting Conventions? A Case Study in Java and Python

Assessing code comment quality is known to be a difficult problem. A num...
research
10/25/2018

The anatomy of Reddit: An overview of academic research

Online forums provide rich environments where users may post questions a...
research
05/23/2020

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

Previous studies have characterized code comments in different programmi...
research
08/08/2021

Empirical Analysis on Effectiveness of NLP Methods for Predicting Code Smell

A code smell is a surface indicator of an inherent problem in the system...
research
06/13/2017

Preprint Déjà Vu: an FAQ

I give a brief overview of arXiv history, and describe the current state...
research
05/05/2023

Hearing the voice of experts: Unveiling Stack Exchange communities' knowledge of test smells

Refactorings are transformations to improve the code design without chan...

Please sign up or login with your details

Forgot password? Click here to reset