To What Extent Cognitive-Driven Development Improves Code Readability?

06/21/2022
by   Leonardo Barbosa, et al.
0

Cognitive-Driven Development (CDD) is a coding design technique that aims to reduce the cognitive effort that developers place in understanding a given code unit (e.g., a class). By following CDD design practices, it is expected that the coding units to be smaller, and, thus, easier to maintain and evolve. However, it is so far unknown whether these smaller code units coded using CDD standards are, indeed, easier to understand. In this work we aim to assess to what CDD improves code readability. To achieve this goal, we conducted a two-phase study. We start by inviting professional software developers to vote (and justify their rationale) on the most readable pair of code snippets (from a set of 10 pairs); one of the pairs was coded using CDD practices. We received 133 answers. In the second phase, we applied the state-of-the art readability model on the 10-pairs of CDD-guided refactorings. We observed some conflicting results. On the one hand, developers perceived that seven (out of 10) CDD-guided refactorings were more readable than their counterparts; for two other CDD-guided refactorings, developers were undecided, while only in one of the CDD-guided refactorings, developers preferred the original code snippet. On the other hand, we noticed that only one CDD-guided refactorings have better performance readability, assessed by state-of-the-art readability models. Our results provide initial evidence that CDD could be an interesting approach for software design.

READ FULL TEXT
research
10/13/2022

Cognitive-Driven Development Helps Software Teams to Keep Code Units Under the Limit!

Software design techniques are undoubtedly crucial in the process of des...
research
02/10/2021

Refactoring Practices in the Context of Modern Code Review: An Industrial Case Study at Xerox

Modern code review is a common and essential practice employed in both i...
research
01/25/2019

Unveiling Exception Handling Guidelines Adopted by Java Developers

Despite being an old language feature, Java exception handling code is o...
research
03/12/2020

A survey on test practitioners' awareness of test smells

Developing test code may be a time-consuming task that usually requires ...
research
08/30/2023

Collaborative, Code-Proximal Dynamic Software Visualization within Code Editors

Software visualizations are usually realized as standalone and isolated ...
research
09/28/2022

How unitizing affects annotation of cohesion

This paper investigates how unitizing affects external observers' annota...

Please sign up or login with your details

Forgot password? Click here to reset