arrow
Return

Do background colors improve program comprehension in the #ifdef hell?

delete2012-05-11
delete66
PRE
AI
J
Janet Feigenspan *
C
Christian Kästner
S
Sven Apel
J
Jörg Liebig
M
Michael Schulze
R
Raimund Dachselt
M
Maria Papendieck
T
Thomas Leich
G
Gunter Saake
DOI:10.1007/s10664-012-9208-xdelete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Software-product-line engineering aims at the development of variable and reusable software systems. In practice, software product lines are often implemented with preprocessors. Preprocessor directives are easy to use, and many mature tools are available for practitioners. However, preprocessor directives have been heavily criticized in academia and even referred to as #ifdef hell, because they introduce threats to program comprehension and correctness. There are many voices that suggest to use other implementation techniques instead, but these voices ignore the fact that a transition from preprocessors to other languages and tools is tedious, erroneous, and expensive in practice. Instead, we and others propose to increase the readability of preprocessor directives by using background colors to highlight source code annotated with ifdef directives. In three controlled experiments with over 70 subjects in total, we evaluate whether and how background colors improve program comprehension in preprocessor-based implementations. Our results demonstrate that background colors have the potential to improve program comprehension, independently of size and programming language of the underlying product. Additionally, we found that subjects generally favor background colors. We integrate these and other findings in a tool called FeatureCommander, which facilitates program comprehension in practice and which can serve as a basis for further research.
Keywords:
Empirical software engineering
Software visualization
Program comprehension
Software product lines
Preprocessors
FeatureCommander

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

O
Otto von Guericke University
Scholars:
8.5K
Papers: 6.7K
Citations: 54
U
University of Passau
Scholars:
692
Papers: 680
Citations: 515
P
Philipps University Marburg
Scholars:
1.3W
Papers: 1.0W
Citations: 10
researcher View more organizations