Influence of listening to music on emotional state of programmers: Preliminary study

The performance of programmer is crucial in software developing process. The performance can be influenced by the number of external factors, such as noise, illumination etc. These work uses Electroencephalography to understand the influence of music on programmers mental state. Several(n=8) programmers were given the task according to their proficiency. They were asked to solve different tasks with music and without. The arousal-valence coefficients were calculated in order to understand emotional state of programmers. As results, the mean Arousal and Valence levels are lower and higher respectively, while listening to music. Further researches may use the proposed methods as baseline. Also, we strongly advice to increase the number of samples and asses other factors that could potentially influence the emotional state.


Introduction
Software is the product of the mental activity of software developers. Their mental activity is highly influenced by external factors, such as environmental conditions, sounds, illumination, and others. Creating better conditions for software engineers may result in increasing their performance. There are a lot of myths about the software development process. Also, there is no unified way of evaluating software developers' mental state. Thus, creating such a framework would help a lot of companies to understand their worker's mental state. In recent years such studies are gaining popularity as more and more researchers become interested in the topic [1]. Computer science researchers are interested in studying mental states of programmers [2,3,4,5,6,7,8,9,10,11]. Bio-signals may be used to build programmers state monitoring systems. So, developing robust analysis technique is a viable task.
Music can be considered as one of the external factors, which may influence the software developer's mind. The background music affects computer games players [12]. Also, relaxing music can decrease the anxiety of a particular person [13]. Software developers are often listening to music while programming. Thus, it is crucial to understand the music influence.
This study aims to understand music influence on the programmer's mental state. To understand the mental state of programmers, the biophysical signals, such as Electroencephalography(EEG) will be used. The EEG is a method of recording the electrical activity of the brain. This method is often used in medical practice to investigate different brain illnesses, such as seizures. These studies have chosen EEG as a primary source of biophysical information, as it is portable, non-invasive, and requires a little amount of specialized hardware.

Background
In different territories of science and particularly in the study of human prosperity and physiological condition, biophysical signals increase broad prominence. In order to understand the cycles in the human body and how external factors impact those cycles, these signs are fundamentally used by health professionals. As before, in the prosperity of individual software designers, organizations, and groups, software engineering specialists have recognized the portion of the concern and other mental states. In the analysis of the human physiological condition, the purpose of this section is to audit the current status of the use of biological signals and analysis how EEG and various other techniques have been used in the field [14]. In addition, it requires collecting a rundown of EEG analysis protocols that can be referred to in additional inquiries.
For study of Concentration Level: The study [15] aims to use EEG signals for concentration analysis and expands earlier studies that used eye-stare, face-identification, head posture, and distance from the screen to follow the focus of the subject. This is a promising field that can be applied in various ways, such as e-learning, driving, and generally applicable during video gatherings in estimating mindfulness. Different examinations use EEG to determine the degree of concentration, while the subject was conducting a learning activity, community EEG datagrams, to assess if the person is meditating or concentrating, and use it to continuously measure sharpness [16,17]. The author [18] introduces a remote EEG gadget with a single channel that can continuously discern the degree of exhaustion of a driver on an electronic device, such as a mobile phone or a notebook. We accumulated concentration analysis techniques that indicate that concern may be estimated by means of heart rate variability, galvanic skin reaction, eye blink recurrence, brain function estimation procedures, to investigate all the recently cited studies. In many fields, evaluating concentration is absolutely essential, such as identifying the sleepiness of drivers and the exhaustion of workers [19].
For identification of Stress Level: A few studies have implemented structure plans that examine the physical and mental condition of the employee in the workplace [20,21]. They classify the stress level of individuals using distinctive biophysical signals and ecological measures. A experiment [20] was done to measure the stress of call-center administrators. The experiment uses two kinds of sensors: natural and physiological, to screen the workplace. Stress evaluation is more focused on latter signals. The purpose of the exploration was to plan a system that enhances the representatives' prosperity and utilizes a multi-sensor test. In one of the study [21], using a portable system for quantifying biophysical signals, the author focuses on neuro-ergonomics as an important area of research along these lines. Like the previous literature [20], this one was intended to plan a system to forecast the mental and physical condition of humans and improve work productivity and prosperity. The spectrum of organic signs obtained, however, was essentially more detailed than the previous one.
For evaluation of programmers activity: A research [7] demonstrates how EEG can be applied to consider software engineers' psychological exercises during pair programming. A handy multi-channel EEG gadget was used here to understand whether there is any difference in the psychological cycles of engineers' brains as they use different methods of enhancement. During a few sets of programming meetings, the data was collected where two designers successively played the role of a "driver" and "navigator". The intention at that stage was to determine whether or not these exercises exercise a greater degree of concentration. In this area, comparative exploration [22] analyzes the intellectual exercises of beginners and expert engineers and assesses their cognition of the programming language. They suggested that there is definitely a fair difference between how these two groups interpret programming dialects by leading an EEG inquiry. In unique electrodes, there was a greater enactment of the cerebrum. In general, expert software engineers demonstrated enhanced transient memory and appreciation capabilities.

Materials and methodology
This section describes the methodology of how experiments were performed. Each participant was engaged in two experiments: treatment(with music) and control. The experiments were done in the same condition in a closed laboratory room, with air conditioning and artificial lamps. All the experiments were done in time frame, starting from 10.00 till 13.00. There was no extraneous noise in the room. All participants were introduced to the device and signed the agreement. The test subject was given a task according to his/her level of programming skills. Then, the participant was asked to solve the task while wearing an EEG cap. Each test subject was examined twice: once while listening to music and once without music.

Materials
In this research, the 24-channeled EEG Smart BCI cap, provided by Mitsar Company, was used. The placement of the electrode was done according to 10-20 international schema (Figure 1). The frequency band is 0 -70 Hz, the sampling rate is 250 Hz and the input range is 300 mV. EEG was recorded at 20 scalp positions with Cz being the referential electrode. EEG Studio software is used to record the data from the participants. The data recording software is used for capturing brain biological parameters by placing multiple electrodes on a participant's head.

Analysis
The analysis process can be described as a sequence of steps: (i) Pre-processing, which consists of automatic artifact detection and signal filtering (ii) Arousal and Valence calculation First, amplitude and Notch filtering was used to delete the noise from signal. After that, the artifacts, such as blinking, were cleaned by EEG studio software. Then, we applied set of filters in order to get Alpha(8-12HZ) and Beta(12-28HZ) bands

Arousal and Valence
As we wanted to understand the emotional state of programmers, the Thayer's arousal-valence emotional plane was utilized [23]. The EEG data processing was inspired by the work of [24], which showed that arousal-valence analysis give some meaningful information. The Figure 2 shows the emotional plane.

Figure 2. Thayer's arousal-valence emotional plane
The participants' EEG signals from the frontal(F7, F3, F4, F8) electrodes were used to calculate arousal-valence values. Alpha(α) rhythms are the most dominant band during a calm, resting state. Its activity is very intriguing because it responds to a stimulus with increasing/decreasing the power [25]. Beta (β) waves have been associated with alert or excited states of mind. Thus, we may consider Beta/Alpha energy ratio as the indicator of arousal. The arousal of each participant was calculated by the given formula 3.3 Arousal = (βF3 + βF4 + βF7 + βF8)/(αF3 + αF4 + αF7 + αF8) Several studies [26,27] state that left hemisphere is less involved in negative emotions and more in memory and positive affect. So, to compute the valence, this study will use the energy difference of F3 and F4 frontal electrodes, as in formula 3.3.

Results
The gathered EEG data was computed for control and treatment group and is given in Table  1. The average valence values can be viewed as relative alpha activity situated in left frontal lobe. Larger values of valence may indicate the positive state of particular person. The arousal values may indicate either high beta or low alpha activity. For control group, the mean and standart deviation values are 1.076 (0.31) and for the treatment (music) group are 1.019 (0.18) respectively.
As we may see, people who listen to music tend to have lower arousal and higher valence level in average, than for control. Thus we may conclude that, music indeed have some positive effect for programmers.

Conclusion
This research goal was to check the feasibility of emotional analysis while solving the programming tasks. Also, the additional goal was to see if the music have positive effect on programmers. The usage of EEG is very promising, as we may use it to estimate the performance in different environments. For example, open spaces or meetings could be possible research interests.
The results of the research show that there was a lower mean Arousal and higher mean Valence, which means that participants were less stressed during solving the task. But, the statistical significance could not be applied here, because of the small sample size of data. The future work with much bigger experiments is needed to fully prove the above statement.
We suggest, that further research should focus on using better preprocessing techniques. Also, the collection of a bigger dataset is strongly advised, trying to have also an open source / open data approach, indeed, still respecting the individual privacy [8, 28,29,30,31,32,33,34].
The results of current work could be potentially used as the baseline solution for companies, who are interested in their workers' mental state. The companies may increase the performance of their workers, by investigating their music and working environment preferences. These work findings could help to build a nice and comfortable environment for programmers. This is an empirical study, as we portrayed, with the goal of assessing the methodology's practicality. We may conclude toward the end of our discoveries that the EEG approach is feasible and that it has permitted us to see the effect of programming situations on the activity of the brain. For programming (without) music, EEG designs were particular. There is no full clarification of the genuine significance of these examples. Further investigations are expected to more readily comprehend the effect on brain function of music. Moreover, specific domains of analysis could be considered, such as agile methods, especially trying to understand their apparent striking improvements in quality [35,36,37,3,38,6,39,7,9,40], mobile computing [41,42,43,44,45], adopting also a solid measurement approach [46,47,48,49,50,51,52,53,54,55].

Acknowledgement
Special gratitude to Innopolis University for supporting this research.