Assessing Python Style Guides: An Eye-Tracking Study with Novice Developers
<|reference_start|>Assessing Python Style Guides: An Eye-Tracking Study with Novice Developers: The incorporation and adaptation of style guides play an essential role in software development, influencing code formatting, naming conventions, and structure to enhance readability and simplify maintenance. However, many of these guides often lack empirical studies to validate their recommendations. Previous studies have examined the impact of code styles on developer performance, concluding that some styles have a negative impact on code readability. However, there is a need for more studies that assess other perspectives and the combination of these perspectives on a common basis through experiments. This study aimed to investigate, through eye-tracking, the impact of guidelines in style guides, with a special focus on the PEP8 guide in Python, recognized for its best practices. We conducted a controlled experiment with 32 Python novices, measuring time, the number of attempts, and visual effort through eye-tracking, using fixation duration, fixation count, and regression count for four PEP8 recommendations. Additionally, we conducted interviews to explore the subjects' difficulties and preferences with the programs. The results highlighted that not following the PEP8 Line Break after an Operator guideline increased the eye regression count by 70% in the code snippet where the standard should have been applied. Most subjects preferred the version that adhered to the PEP8 guideline, and some found the left-aligned organization of operators easier to understand. The other evaluated guidelines revealed other interesting nuances, such as the True Comparison, which negatively impacted eye metrics for the PEP8 standard, although subjects preferred the PEP8 suggestion. We recommend practitioners selecting guidelines supported by experimental evaluations.<|reference_end|>
@article{roberto2024assessing,
    title={Assessing Python Style Guides: An Eye-Tracking Study with Novice
  Developers},
    author={Pablo Roberto, Rohit Gheyi, Jos'e Aldo Silva da Costa, M'arcio
  Ribeiro},
    journal={arXiv preprint arXiv:2408.14566},
    year={2024},
    archivePrefix={arXiv},
    eprint={2408.14566},
    primaryClass={cs.SE}
}