Authors:
Victor Hugo Santiago C. Pinto
1
;
2
;
Alberto Luiz Oliveira Tavares de Souza
2
;
Yuri Matheus Barboza de Oliveira
2
and
Danilo Monteiro Ribeiro
2
Affiliations:
1
Federal University of Pará (UFPA), Belém, PA, Brazil
;
2
Zup Innovation, São Paulo, SP, Brazil
Keyword(s):
Cognitive-Driven Development, Software Refactoring, Experimental Study.
Abstract:
Refactoring is a maintenance activity intended to restructure code to improve different quality attributes without changing its observable behavior. However, if this activity is not guided by a clear purpose such as reducing complexity and the coupling between objects, there is a risk that the source code can become worse than the previous version. Developers often lose sight of the business problems being solved and forget the importance of managing complexity. As a result, after refactorings many software parts continue to have low readability levels. Cognitive-Driven Development (CDD) is our recent strategy for reducing cognitive overload during development when improving the code design. This paper provides an experimental study carried out in an industrial context to evaluate refactorings through the use of conventional practices guided by a cognitive constraint for complexity, a principle pointed out by CDD. Eighteen experienced participants took part in this experiment. Differ
ent software metrics were employed through static analysis, such as CBO (Coupling between objects), WMC (Weight Method Class), RFC (Response for a Class), LCOM (Lack of Cohesion of Methods) and LOC (Lines of Code). The result suggests that CDD can guide the restructuring process since it is designed to obtain a coherent and balanced separation of concerns.
(More)