Keywords

1 Introduction

Mob programming is becoming more prevalent, especially in the field of agile development. Mob programming is a method to learn programming in a group. Although it is becoming popular, its effects and limitations remain unclear.

Herein analysis is conducted from a different perspective: EEG (electroencephalography). This new information is used to analyze participants’ EEG brainwaves to identify efficiencies, shortcomings, and advantages of different types of programming sessions (solo, pair, mob programming). Pair programming is a method to learn programming with another individual, it has similar concepts to mob programing. Here, four hypotheses (RQs) are investigated.

  • RQ1: Do pair and mob programming induce lower levels of concentration (attention) compared to solo programming?

Often tasks requiring high concentration levels are performed individually, suggesting that sessions involving multiple people will lower concentration levels. Working alone may be better for tasks that require high fixation and core interest. An investigation known as the Coding War Games found that software engineers worked more efficiently alone [2]. Another benefit of working alone is that the individual may become completely immersed in their work. However, a drawback is that the person is solely responsible for the performance and output. In contrast, people working in a group may find motivation and inspiration throughout the whole session because it is the group’s responsibility to produce results and there is peer pressure to not disappoint the group. This research question examines the difference in attentiveness in groups vs. individual programming work.

  • RQ2: Do group sessions induce higher levels of calmness (meditation) compared to solo programming?

The psychological benefits of collaborative learning are increased participants’ self-esteem and reduced anxiety [3]. Thus, we approximate that group work is calmer than solo programming sessions. Typically, participants working in a larger group are more comfortable with an unfamiliar problem because other people are around to assist. They are more mentally assured and less worried about solving the task because someone else in the group may know the answer. It is important to understand the difference in calmness in these sessions to be able to create an environment that can be continued for a prolonged/maintained period of time. As an increase in calmness/meditation can lead to less tension and stress.

  • RQ3: Does difficulty decrease when working in a group?

Previous research found that groups of three to five individuals perform best when solving complex problems, suggesting that groups are better suited than those working alone to address challenging problems [4]. Additionally, those in a group tend to retain more information, especially since the group can work together and share knowledge. Finally, working with others provides new insight and perspectives. If a significant difference can be seen within individual/group size, we will be able to assign tasks to groups or individuals according to the difficulty of the task. Thus, making it much easier for participants to program a task.

Here, task difficulty is measured using EEG brainwaves such as the frequency of low β and low α. An increase of \(low \beta /low \alpha \) denotes an increasing difficulty [5].

  • RQ4: What are the significant differences between pair and mob programming sessions?

Although solo and group work should have clear differences, the impact of group work in pairs or a larger group may also result in differences in attention and concentration. This question compares group work in teams of two to that in larger groups. It is possible that working in a larger group will decrease how the participants feel on the difficulty of solving problems/tasks.

A comparison between the roles (driver, navigator) is necessary to compare pair and mob programming. In both sessions, the driver’s attention level and the navigators’ meditation levels should be highest because the driver will be coding and perhaps more focused, while the navigator is more relaxed as no coding is actually done.

2 Background

Mob programming is an agile software development practice where a group works together on the same screen and changes roles at set time intervals. This approach began with Woody Zuill’s programming ventures at Hunter Industries [6]. Assigned roles assigned the productivity and efficiency. During a mob programming session, one software engineer (the driver) codes for the entire group by utilizing a console and mouse. Other software engineers (navigators) audit the code and ensure that the driver’s work is free from logical or syntactical errors. Mob programming sessions aim to complete specific programming improvement assignments while working together with the client [7]. Advantages include an organized cycle for utilizing distributed information and a greater code fulfillment due to the inherent sharing of information and experience among the participants [8].

A systematic literature review (SLR) revealed [14] that (1) experimentation with controls is vital and (2) most mob programming sessions are finished during working hours, but the eventual outcomes are rarely investigated. Participant surveys show definite impacts such as improved code quality and expanded profitability, but the results are subjective and lack scientific evidence. Logical proof from an expert’s viewpoint confirms that mob and pair programming have logical confirmation [9,10,11,12]. Performing coding tests (which have been recognized by experts) during mob programming sessions can monitor the effects on code quality. Furthermore, the influence of the mob programming session length on the coding speed should be investigated.

The SLR highlights the importance of investigating and analyzing the impacts of mob programming. This study uses a new perspective (brainwaves) to discover empirical evidence.

3 Collection and Analysis of Brainwaves

In this study, we employed a new method, which is similar to a preliminary study of pair programming on brainwaves [13], to collect empirical evidence and answer our four RQs. Participants’ brainwaves were used to understand and compare the mental state from a scientific viewpoint. We collected three main datasets: attention, meditation, and difficulty. We compared the numerical values of how the participants mentally feel in each programming session. Surveys, code testing time, code quality, and personal options are conventionally used to analyze mob programming. However, these methods do not provide clear logical proof or analysis. On the other hand, our new method provides a clear psychological view. Although this study could simply investigate the differences in code testing time and code quality after several mob programming sessions, herein we assess mental states using attention, meditation, and difficulty values.

A brainwave detector, called the MindWave Mobile 2, was used, and NeuroView software collected and analyzed the EEG.

MindWave Mobile 2 (Brainwave Device).

The device measures and outputs the EEG (0–127.75 Hz) power spectra (alpha, beta waves, etc.). Additionally, it monitors attention and meditation. The device consists of a headset, an ear-clip, and a sensor arm [1].

EEG.

EEG was performed to assess the electrical activity of the brain. Brain cells communicate with each other via electrical impulses. The MindWave Mobile 2 tracks and records brainwave patterns. Small flat metal discs called electrodes are attached to the scalp with wires. The electrodes analyze the electrical impulses in the brain and send signals to a computer that records the results [1].

Attention.

The eSense Attention meter (0–100) indicates the intensity of a user’s level of mental “focus” or “attention” during intense concentration or directed mental activity. Distractions, wandering thoughts, lack of focus, or anxiety lowers the meter level. Thus, the concentration levels during programming sessions can be measured [1].

Meditation.

The eSense Meditation meter (0–100) indicates the level of a user’s mental “calmness” or “relaxation.” Meditation is a measure of a person’s mental state not physical levels. Meditation is related to reduced activity for active mental processes in the brain. Distractions, wandering thoughts, anxiety, agitation, and sensory stimuli lower the meditation meter levels [1].

Difficulty.

Difficulty felt by participants during a certain task can be calculated using

$$ low{\kern 1pt} \beta {\kern 1pt} waves/low{\kern 1pt} \alpha {\kern 1pt} waves $$
(1)

collected from the MindWave Mobile 2 [5]. A previous study involving ten high school students used a typing practice with two difficulty levels (basic & advanced). The study proposed that an increase of \(({\varvec{l}}{\varvec{o}}{\varvec{w}}\boldsymbol{ }{\varvec{\beta}}/{\varvec{l}}{\varvec{o}}{\varvec{w}}\boldsymbol{ }\boldsymbol{\alpha })\) indicates a higher difficulty (low \(\beta \) wave (13–16.75 Hz) and low \(\alpha \) wave (7.5–9.25 Hz)) [5]. In this paper, we used this approach to evaluate the third RQ.

4 Experimental Method

We evaluated three types of sessions: solo, pair, and mob. Nine subjects (E1–E9), who were university or graduate students over 18 years old and with a certain level of programming skills (i.e., completed basic programming), participated in each experiment. Each experiment was repeated twice. The flow of the experiment was as follows:

Table 1. Participant overview
  1. 1.

    Subjects were divided into six groups: 3 Solo groups, 3 Pair groups and 3 Mob groups. Each participant was involved in two sessions: Solo & Mob or Pair & Mob (Table 1).

  2. 2.

    We asked the participants to wear an EEG on their heads and to meditate for 1 min to obtain EEG data during a neutral state. That is, we asked the participants to close their eyes and relax. This data was used to compare with the EEG data obtained during the programming period.

  3. 3.

    The two sessions were conducted consecutively with a 15-min break in between them. Each group was asked to answer up to three programming questions with varying degrees of difficulty.

figure a
  1. 4.

    The time limit was 30 min. Subjects were not required to finish questions. A new question was given once the previous question was completed. EEG brainwaves were recorded using the MindWave Mobile 2 while the subjects answered the questions.

  2. 5.

    For the Solo programming session, the participant coded alone, and was not allowed to communicate with anybody. However, for pair and mob programming sessions, participants could communicate with group members. For pair and mob programming sessions, there were two roles (driver and navigator). There was only one driver at a time, and the other participants were navigators. The participants switched roles after 15 min for pair programming and 10 min for mob programming sessions. Each participant performed both roles. The groups were assigned as shown in Table 1.

5 Evaluation of Results

The experiments assessed the RQs. Figures 12 show the data to answer the first two research questions, while Fig. 3 shows that for the third research question.

Fig. 1.
figure 1

Comparison of meditation and attention levels by programming state.

Fig. 2.
figure 2

Box and whisker of participants’ aver-age percentage in change of attention, medita-tion, and difficulty from the neutral state by programming session.

Fig. 3.
figure 3

Attention vs. meditation for participants in driver & navigator roles during pair and mob programming

5.1 RQ1: Do Pair and Mob Programming Induce Lower Levels of Concentration (Attention) Compared to Solo Programming?

In many situations, tasks requiring high concentration are often worked on alone. In Fig. 1, concentration (attention) levels were highest in the neutral state. Therefore, the average percentage change in each programming session (Fig. 2) decreased concentration. Pair programming showed the highest percentage of attention level change. However, both group programming sessions (pair and mob) had higher concentration levels than the individual programming session.

figure b

5.2 RQ2: Do Group Sessions Induce Higher Levels of Calmness (Meditation) Compared to Solo Programming?

In Fig. 1, all participants except two (E2, E7) showed the highest meditation level in the neutral state. Overall, a decrease was observed in the average for all three types of programming sessions. The highest average meditation level was solo, and the lowest was pair programming. Their difference was significant (around 13%). This result differs from a previous study [13], where a more relaxed state was observed in pair programming than solo programming.

figure c

5.3 RQ3: Does Difficulty Decrease When Working in a Group?

The questions in each session had the same level of difficulty. However, differences in difficulty are observed by session type. The lower the difficulty value, the easier a task feels. Figure 2 shows the average change in difficulty by group relative to the neutral state. The solo experiment showed a 36% increase in difficulty, whereas the mob programming group had a 1% increase in difficulty compared to the neutral state. On the other hand, pair programming showed a decreased difficulty of around –14%. These results imply that working in a group setting is less difficult than working alone.

figure d
Table 2. Comparison of the average percentage change from neutral state

5.4 RQ4: Are there the Significant Differences Between Pair and Mob Programming Sessions?

Attention and Meditation.

Both pair and mob programming sessions were positively correlated with attention and meditation, but the correlation was not significant (Fig. 1). Only pair programming had a positive percent change compared with the neutral value (Table 2). There was a somewhat positive correlation (Pearson’s Correlation Coefficient [15]) only for the driver in pair programming (Fig. 3), but the rest (pair navigator and mob) had a negative or close to zero correlation. For mob programming, a significant difference was observed between the roles (driver and navigator). The attention and meditation levels decreased more than 10% from the navigator to the driver, suggesting that participants concentrate less and are more relaxed when they are navigators.

Difficulty.

Participants had an easier time in a group than when working alone (Fig. 2). Pair programming and mob programming showed a significant difference. Participants in pair programming found it easier to tackle problems, but there was not a significant difference between the roles (Table 2).

figure e

6 Discussion

Four RQs were examined to obtain a deeper knowledge of mob programming and pair programming compared to solo programming. MindWave Mobile 2 was used to collect brainwave data from a new research perspective. The results indicate that group programming can realize more efficient learning than individual programming. As shown in the results, the meditation levels were lowest in solo work which suggests working alone may lead to less stress and tension compared to group work. Additional research is necessary to identify patterns. First, a larger dataset is necessary since this study involved only six participants. Due to time limitations, two programming sessions were conducted in a row. If the programming sessions occurred on different days, the participants would be more refreshed, which may affect the concentration and meditation results. Second, the EEG results have yet to be fully analyzed. The results here should be compared with other brainwave data.

7 Conclusion and Future Work

We preliminarily identify the differences between the brainwaves of programmers under different sessions (solo, pair, and mob). MindWave Mobile2 collected the levels of meditation, concentration, and EEG signals. Although differences between the participants in each session were distinguished, it is too early to yield conclusions. It is unclear whether the apparent differences between these programming methods are sustained by scientific and empirical evidence. Consequently, future research should investigate appropriate systems to look at brainwaves and summarize noteworthy quantities of data.