  Affects---emotions and moods---have an impact on cognitive processing
activities and the working performance of individuals. It has been established
that software development tasks are undertaken through cognitive processing
activities. Therefore, we have proposed to employ psychology theory and
measurements in software engineering (SE) research. We have called it
"psychoempirical software engineering". However, we found out that existing SE
research has often fallen into misconceptions about the affect of developers,
lacking in background theory and how to successfully employ psychological
measurements in studies. The contribution of this paper is threefold. (1) It
highlights the challenges to conduct proper affect-related studies with
psychology; (2) it provides a comprehensive literature review in affect theory;
and (3) it proposes guidelines for conducting psychoempirical software
engineering.
