Software engineering (SE) research lacks theory and methodologies for addressing human aspects in software development. Development tasks are undertaken through cognitive processing activities. Affects (emotions, moods, and feelings) have a linkage to cognitive processing activities and the productivity of individuals. SE research needs to incorporate affect measurements to valorize human factors and to enhance management styles.The objective of this study is to analyze the affects dimensions of valence, arousal, and dominance of software developers and their real-time correlation with their self-assessed productivity (sPR).A repeated measurements design was conducted with eight participants (four students and four professionals), conveniently sampled and studied individually over 90 min of programming. The analysis was performed by fitting a linear mixed-effects (LME) model.The results showed that valence and dominance are positively correlated with the sPR. The model was able to express about 38% of deviance from the sPR. Many lessons were learned when employing psychological measurements in SE and for fitting LME.This article demonstrates the value of applying psychological tests in SE and echoes a call to valorize the human individualized aspects of software developers. It reports a body of knowledge about affects, their classification, their measurement, and the best practices to perform psychological measurements in SE with LME models.