The aim of the research was to analyze the possibility of developing an Integrated Development Environment (IDE) that could improve a programmer's performance by considering their current mood. The impact of moods on programmer performance was initially examined in the literature. Based on this, a Cognitive Programming Task Model (CPTM) was developed showing that various cognitive functions and programming activities are interrelated. A second model derived from the literature, the Cognitive Mood Model (CMM), suggested that moods are also interrelated with various cognitive functions. Combining these two models indirectly suggests a relation between moods and programming tasks, which was presented as the Mood Programming Model (MPM). As direct empirical support was lacking for this relation, various experiments were conducted to study the effect mood could have on performance in a debug task. The results showed that arousal dimension of mood has the direct impact on programmers performance. The findings lay the foundation for developing an IDE that can measure the programmer mood in a non-intrusive way and make effective interventions to improve programmer performance.