34
Bachelor Informatica Universiteit van Amsterdam Music-based quality control in software engineering Kas van ’t Veer June 11, 2013 Supervisor(s): Raphael Poss Informatica — Universiteit van Amsterdam

Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Bachelor Informatica

Universiteit van Amsterdam

Music-based quality control insoftware engineeringKas van ’t Veer

June 11, 2013

Supervisor(s): Raphael Poss

Informatica—

Universiteit

vanAmst

erdam

Page 2: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Abstract

This research examines the use of music in giving feedback to programmers. Becausethere are tools available to automatically evaluate programming code, it is possible toautomatically give feedback to programmers who are part of a large software engineeringproject. Because many programmers listen to music while writing code, it is possible togive feedback about the status of their project by changing their music. This researchpaper describes how different methods of changing music are evaluated, how a toolhas been written to perform operations on a programmers music and how it can bedetermined if such a tool could indeed be useful in professional programming.

Page 3: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Contents

1 Introduction 4

2 Related work 62.1 Build automation software . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Apache Maven and Apache Ant . . . . . . . . . . . . . . . . . . . . . . . . 7Buildbot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.2 Methods for status indication . . . . . . . . . . . . . . . . . . . . . . . . . 8Build Light Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Lava Lamp Build Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 Use cases 103.1 Advantages of using music . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.2 Parameters in music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Pausing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Switching tracks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12DSP effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.3 Target Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4 Implementation 154.1 Customizability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.2 Build automation - Tool communication . . . . . . . . . . . . . . . . . . . 16

Periodically polling webpages . . . . . . . . . . . . . . . . . . . . . . . . . 16Connecting to Buildbot through IRC . . . . . . . . . . . . . . . . . . . . . 16Extracting the important data . . . . . . . . . . . . . . . . . . . . . . . . 18

4.3 Tool - Music Player communication . . . . . . . . . . . . . . . . . . . . . . 194.4 User configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5 Functionality validation 235.1 Equal results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.2 Restarting the tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.3 Server-client connection lost . . . . . . . . . . . . . . . . . . . . . . . . . . 245.4 Server-Buildbot connection lost . . . . . . . . . . . . . . . . . . . . . . . . 245.5 Name in use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.6 Errors in the config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.7 Unexpected Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.8 Default configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

2

Page 4: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

5.9 Accidental muting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6 Appliance evaluation 276.1 Qualitative Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.2 Quantitative Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

7 Conclusions 307.1 Future continuation of this research . . . . . . . . . . . . . . . . . . . . . 30

3

Page 5: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

CHAPTER 1

Introduction

When developing software with groups of people, there are lots of ways to give feedbackto the programmers about the current situation and progress being made. The mostclassic way to do this is of course by looking at the code that a coworker has submitted,evaluating the code manually and inform the coworker by email if something is wrong.However, it is going to cost lots of time (and therefore money) if people are manuallyevaluating other peoples work all of the time. That is why some tools have been de-veloped to automate the evaluation process of code and show test results on a webpageor through sending automated chat and email messages to the programmers. However,when someone is working on a software project, we can assume he will probably notactively check his emails, chat messages or those webpages periodically as it would bedistracting from the programming. So it might be very useful to look for alternativesto these methods of feedback that are more subtle, yet noticable. A recent alternativemethod of feedback would be build light indicators. These are big lights placed in anoffice which will light according to which stage the project is currently in (determined bythe automated evalution software) so the employees can view the progress in the blinkof an eye at any time. The disadvantage of this is that these lights would need to beplaced in every working area of the programmers and that they have to be in everyonesline of sight. Next to that, the programmers still need to actively look at these lights,which again would not be desirable because they may not want to have to think aboutlooking at the lights all the time. However, lots of programmers seem to like to listento some music on the background while programming. This background music could beanother great way of giving feedback if we can alter this music in a subtle, but noticableway. Not only could this be a good non-invasive way of giving feedback, it also will notrequire any material to be placed, because any programmer that likes to listen to musicon the background will have a pair of earbuds or headphones or a speaker system al-ready. When there is quiet background music being played in the working area throughspeakers, we can modify that music in the same way as long as the music is coming froma computer and without needing any additional physical equipment. This thesis willresearch if and why music-based quality control could be useful and in which way themusic could best be changed to give feedback to programmers (chapter 3), what wouldbe the best way to implement this through a simple software tool and to what extentit is possible to change the music (chapter 4), if such a tool can be functional and howit should respond under erroneous conditions (chapter 5) and how to validate if such atool could indeed be useful for giving feedback to programmers in a real-life situation(chapter 6).

4

Page 6: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

To provide this kind of musical feedback there will be quite a few challenges lying ahead.First of all we have to find a reliable way to pass data from the automated code eval-uation software to the tool we are going to develop. Secondly, we must find a reliableway to somehow connect the tool to the software that is playing music and influence themusic. Finally, because different people use different music players on different operatingsystems, we also must find a way to make the tool modular enough to be used with avariety of different players.

The repository containing all of the code written during this research, including instal-lation instructions, can be found here: https://github.com/SBEXOBZO/MusicQC

5

Page 7: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

CHAPTER 2

Related work

2.1 Build automation software

There are lots of tools available already for automating the evaluation of code and thereare lots of differences between these tools. There are tools available that automaticallyattempt compilation of a complete software project according to a given set of options,which are called build automation tools. These tools have to be configured manually ac-cording to the project. Their configurations usually consist of a list of system commandsand parameters required to actually initiate the compilation process, the structure ofall the files in the project, how those files are linked together, locations of external re-sources or packages and more. These tools are often used to achieve so called continousintegration. This term suggests that programmers integrate newly written code into theexisting code continuously. Build automation tools help with this because they can assistin finding out if the code has been integrated successfully. There are lots of differencesbetween these tools, some build automation tools can only be used with projects of aspecific programming language and some tools do not require many system resourceswhile other tools can be computationally heavy. Other differences are that some toolsrequire manual activation and some of them can be linked to a remote repository thatall of the programmers involved in the project submit their code to. When the tool islinked to a repository, each time new code is submitted the tool tries to build the codeto see if it is able to compile. Many of these tools are also open-source projects that arestill being updated by their communities and available for free. A short overview of afew well-known build automation tools is given below.

Make

Make is a Unix command that almost every computer science student will know. Itbasically runs the contents of a given makefile through the command line or teminal.This makefile contains a list of commands that can have variable parameters. Advantagesto this are its built-in support on most Linux systems, its simplicity and the fact that itcan compile any kind of project because it merely executes some commands. Makefilesare clear, readable and can therefore be used to automate the building a medium-sizedframework of code in an easy and adaptable manner. Since make is merely a command,it requires manual activation, so it will not be automatically activated each time code issubmitted to a repository.

6

Page 8: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Apache Maven and Apache Ant

Maven1 and Ant2 are two open-source build automation tools by Apache that are writtenin Java. Both tools use an XML file to describe a building process. While they are mostlyused for Java projects, they can be used for many more languages as well. The XMLfiles contain information about the structure of the files, the order in which files haveto be compiled and locations of external resources. The required XML files however aresometimes regarded as hard and cumbersome to write and update by some programmers.Both tools do not have native support for automatic start of a build.

Buildbot

Buildbot3 is a piece of software that can be used to automate building and testing andis oriented at continous integration. It is written in Python and was first used as amore lightweight alternative to Mozilla Tinderbox. Nowadays it has grown so much inpopularity that it is used by many developers including Google and Mozilla themselves.Buildbot performs a preconfigured build and (potentially) test cycle each time the sourcecode of a project is changed in the repository which it is linked with. There are manysupported subversion management systems such as Git and SVN. Another nice featureis that the Buildbot software is didived into one master and one or multiple slaves. Themaster is responsible for getting the slaves to download the new code and test it eachtime new code is submitted and it is responsible for collecting the results of all the slaves.The slaves themselves actually do the building and testing, while the master controlsthese slaves. One of the advantages of this is that you can configure lots of slaves withdifferent operating systems or different versions of programming languages. That can beuseful because you can test if the project runs stable on all of these different platformsor not.

7

Page 9: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

2.2 Methods for status indication

Automated music modification according to the results of automated code evaluationtools has not been done before at the moment of writing or in knowledge of the writer.However, some tools have already been developed that make use of the output of au-tomated code evaluation in an alternative way. Two examples of this are build lightindicators and lava lamp indicators. These tools have been described by programmersas both useful and fun.

Build Light Indicators

Build light indicators are lights placed in a working area that indicate the status ofthe latest build. These lights are placed at a location of a working area where all theprogrammers can see them. There can be multiple different lights, which can be coloredor labeled to indicate what they mean. A common setup consists of a few labeled lightswhich indicate different levels of success. For example, there can be two lights, onewhich lights up when the latest build builded successfully and another one which lightsup when the pre-defined unit tests have succeeded. So theoretically, there can be aninfinite amount of different variations of setups of lights, depending on the project whichis being worked on and the preferences of the programmers. The lights are not onlyuseful because they give information to the programmer about the build, but they canalso have a positive effect on the performance of the programmers, because the lightsoffer a clean overview of the status of the last build4, which allows teams to work morestructured. When lights go off or turn red (depending on the setup), everyone immedi-ately knows there is something wrong with the latest build. Teams have reported theycan track down the issue and get it resolved within a much shorter time by using theselights5. The only downside of these lights is that they have to be constructed6 andplaced so that everyone working on the project can see them.

Figure 2.1: From left to right: A setup of build light indicators, lava lamp indicatingsucces, lava lamp indicating failure

8

Page 10: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Lava Lamp Build Indicators

A very interesting variation of build light indicators indicators can be made by using ared and a green lava lamp instead of regular lights7. These indicators work the same asbuild light indicators, but lava lamps have some interesting traits to them. Inside lavalamps there is translucent liquid mixed with other opaque liquid can move up and downin bulbs and emit a colored light when other light is project through it. The opaqueliquid of the lava lamps starts moving when it gets hot. When the lava lamp is turned on,it will start to warm up and light will start to be projected through the liquid. Becausethe lava lamp only heats up and cools down slowly, it takes a significant amount of timebefore the colored opaque liquid starts moving after turning it on. It also takes timebefore the liquid in the lava lamps settles down again after turning it off. In this setup,when a build fails, the red lamp is turned on and when a build succeeds the green lampis turned on. This means that if someone submits code that causes the build to fail, thered lamp starts projecting light through the liquid, but the red colored opaque liquidis still in the bottom of the red lamp. Since it takes time before this liquid is actuallymoving up and down througout the lamp, it will first only be a small red bulb in thebottom of the lamp. If the build gets fixed in time, the red liquid will never start to riseup and down, but if the failed build is not fixed in time the red liquid will start movingup and down. This can create a little game for programming teams, because they cantry to have the red liquid moving as little as possible and having the green liquid moveas often as possible. If the build fails and the red liquid in the other lamp starts glowing,the team has to try to fix the build as quickly as possible in order to prevent the redliquid from rising, which makes for a faster working team. Just like with build lightindicators the only real disadvantage to this is that the lights have to be placed in aplace where everyone who is working on the project can see them.

9

Page 11: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

CHAPTER 3

Use cases

3.1 Advantages of using music

Build light indicators have proven to be a good method of informing the programmersabout the status of the current build and can be motivational as well. However, manysoftware engineering teams also actively work on projects at home, communicating withtheir team through the internet without being in physical proximity of each other. Thisalso happens a lot within open-source communities which can be spread all over theworld working on a single project together. In such scenarios, any type of build lightindicator would not be wishful as people work separately and possibly even at variablelocations. It would not be practical to have each programmer place build light indicatorsat each location at which they work. It would be interesting to look for an alternativewhich only makes use of resources already available. Since many programmers seemto like to listen to some music on the background while working, this might make fora very suitable alternative. The only piece of equipment required are speakers or apair of earbuds or headphones, depending on whichever the individual prefers. We canassume that any programmer that likes to have some music playing while coding hasaccess to this already, which completely cancels out the need of any additional physicalequipment. Wherever the programmer may be while programming, he can have accessto these materials. This even applies to situations in which the programmer is travelling,assuming that if a person can carry a laptop with them, they can also carry a pair ofearbuds or headphones (or use built-in laptop speakers).When a person is listening to music, the listener does not expect the music to makeunexpected changes. When the music does make an unexpected change, the listener willnotice this because he did not expect this event. We can use this to our advantage bychanging the music unexpectedly to gain attention from the listener. Different methodsof doing this are explained below.

3.2 Parameters in music

There are a lot of different ways to give feedback through music. For example, the volumecan be modified, we can skip to another track, the music can be paused completely andso on. When a programmer is listening to music, there will always be an expectationof continuity. By changing the music we can break this expectation to gain attentionfrom the user. In other words, when a programmer has to be notified there should bean unexpected change in the music so we can get his attention. We can create drastic

10

Page 12: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

changes in music or we can make a more subtle change. Some users may prefer adistractive change, in order to have their attention grabbed, but some may not like to bestartled. Drastic measures like stopping the music or increasing volume instantly couldbe too invasive and be regarded as annoying, but subtle measures may go by unnoticed.It is also worth noting that effects of temporary nature will be completely missed if theprogrammer mutes his music, takes off his headphones or earbuds or takes a break fromwork. We shall elaborate a bit on which parameters could be useful below.

Volume

Volume is a well-known and evident parameter and it could be used in several differentways. We can instantly increase or decrease volume or increase or decrease it in thespan of a few seconds. A sudden change in volume can be used to draw the attentionof the user quickly, but this can also be perceived as startling or annoying. If such anevent is unwishful, the volume can be changed more subtly by incrasing it over time. Anadvantage of volume is that it is a permanent change, so when the programmer takes abreak, he can still notice that something has changed when he comes back. A problemwith volume is that some users could max out software volume and adjust their volumeby hardware (such as a potentiometer to change the volume), in which case volumecannot be increased without risking audio clipping, which is an unwanted distortioneffect that occurs when the sound pressure level exceeds the maximum sound pressurelevel for the resolution of the used digital audio file. A second problem is that even ifthe user leaves a margin for volume to be increased through software, the volume will belouder than the listener initially set it, depending on the initial volume and volume gain,this might cause hearing damage! Lastly, most listeners will probably have a personalpreferable range of volume at which they like to listen. In order to make this effectnoticable and reduce the risk of having the volume modification pass by unnoticed, thevolume has to be changed by a significant amount. Changing the volume by a significantamount may leave the volume outside of the listeners range of preference.

Advantages Simple and recognizable parameter. Permanent effect; can indicate states.

Disadvantages Volume modification might be either too drastic or too subtle. Notpossible through software in some events. Risk of hearing damage.

Pausing

Another simple parameter is pausing the music. Pausing the music altogether is aninvasive way of informing a user and also requires additional measures to get the musicrunning again. When a programmer is writing code and his music suddenly stops, itmay be annoying if the music suddenly stops. This however can also be regarded as apositive effect when the attention of the programmer is needed. Even though pausing isa permanent effect, the programmer might pause his music already when taking a break,which still makes the effect unnoticable when returning from a break. One instance inwhich pausing could be used to indicate a state is by completely pausing the music whena build breaks and only resuming playback as soon as the build gets fixed. If this is usedfor one indivudual, this requires the individual not to pause his music manually, whichis a restriction that may not be wishful.

Advantages Simple and recognizable. Could be used to indicate a state

Disadvantages Requires manual measures to restart music. Permanency of limited use.

11

Page 13: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Switching tracks

The concept of switching tracks can be used in many different ways. One could justhead to the previous or next track in the list, restart the current track or change to acompletely different playlist, internet radio station or stream. These kind of options makeswitching tracks a very interesting parameter, because when using playlists or streamsof different genres, the different types of music can be used for portraying differentatmospheres and therefore different states of the project, which could be last buildfailed or last build successful. For instance, one could have a playlist with fast rockmusic and one with calm acoustic songs. Unlike using a sound effect (more on this laterin this section), this method keeps the artists intent of the songs intact, it even utilizes itby categorising songs of similar type. Switching playlists can be done in a non-invasivegentle manner by fading out a song and fading in the next one of another playlist orby queueing the first song of a new playlist after the current one. This could also beused in the same way as the lava lamps (see chapter 2) to make everything into a game.This could be achieved by making a playlist with music that you do not like as much,which will be played when the last build has failed. This could motivate the user to fixbroken code so the music that he likes will be played instead of music that he does notlike. To stimulate faster addressing of errors even more, you could make a playlist witha likable song in the beginning and progressively less likable songs as the playlist goeson. In such case, if a build gets broken, the programmer would not be annoyed at firstand may prevent future annoyance by fixing the build quickly so the unlikable songs willnot come up. Probably the best feature of this parameter is that you can indicate stateswhich your project is in by continously playing a specific playlist.

Advantages Can indicate states. Can use songs meaning or feeling to its advantage

Disadvantages Not useful if listener wants to be in control of files being played

DSP effects

Digital Signal Processing effects are effects applied to a digital sound stream to alter itsresult, for instance by adding a slight echoing effect to the sound, changing the presenceof certain ranges of frequencies or changing the pitch of the sound. Most effects haveconfigurable settings which alter the intensity of the effect. Modifying these settings canmake an effect more subtle or noticable. Foobar20008 is a media player which supportsa few DSPs out of the box and even more with additional plugins9. There are manytypes of sound effects, but their advantages and disadvantages are mostly the same. Ef-fects among each other are pretty distinguishable, which gives a lot of different possiblescenarios to identify. To not have the effect go by unnoticed, the effect has to be set toa pretty high intensity. Effects that are set to a high intensity give a distinct change tothe sound, which is often not desirable over a long period of time. To still make use ofthe effect, it can be used for only several seconds. The problem with this however is thatit will go by unnoticed if the programmer is taking a break and it also cannot indicatea state.

Advantages Can be made as subtle or as noticable as the user wants. Effects are easilydistinguishable. User can be in control of files being played.

Disadvantages Subtle effects might go by unnoticed. Very noticable effects are un-wanted for long periods of time. Can not indicate state if used temporarily.

12

Page 14: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Examples of DSP effects

Frequency boosts Frequency boosts, EQ or equalizers work by increasing or decreasingthe appearance of certain frequencies in music. This makes the music sound different,but it still sounds like the same song, so the listener will not be annoyed and the intentof the artist will stay unscathed (given that amount of boost or drain is kept within areasonable margin). For instance, by making treble more appearant than bass, the musicwill start sounding a bit more tinny. If bass is made more appearant than treble, themusic will start sounding more boomy or muddy. By using different options like these,we can create several different modifications to the sound to indicate different events. Ahighpass or lowpass filter is another DSP effect which works a little bit the same, exceptthat these completely remove all sound above or below a certain frequency instead ofonly making them quiter.

Playback speed Another option of altering musical playback is by speeding tracks upor down. In this case, to avoid off-pitch music when speeding up, the pitch has to belowered by the inverse amount with which the music is sped up. Still the acquired resultmay not always be desirable, since changing the speed will probably cause the musicnot to be represented as the artist intended it. For instance, speeding up a slow mellowtrack might result into an awkward sounding song and lose its meaning. Next to that,the listener might know a lot of the songs already and hearing them in another pacemight probably only leave the listener annoyed. Like other effects it could be used for ashort time as a temporary effect.

Playback pitch Another parameter to change would be the pitch of the music, however,like playback speed, this might only leave the listener annoyed. Again, using this effectwill probably leave the music altered in a way not intended by the artist and kill theoriginal feel or emotion associated with the song. Like other effects, it would still beuseable as a noticable temporary effect.

Reverb Reverb adds an echo-like effect to the music, effectively simulating a room inwhich the walls reflect sound. Depending on the magnitude of the effect this becomeseither noticable or not. This effect is actually used in the post-production process of anyvocal recordings because of the desired sound changes. The user might not notice thiseffect and the event to indicate could go by unnoticed. With different settings, the effectmay be very noticable. In that case it could be used as a noticable temporary effect.

Stereo to mono Stereo to mono basically merges the two stereo channels into onechannel, which changes the directional origin of the sound. This effect is slightly noticablewhile using speakers, but it is a lot more noticable when using earbuds or headphones.While using headphones the music sounds more as if it is inside your head instead ofcoming from the sound drivers. This is also a distinguishable change which could beused for a short time as a temporary effect.

Distortion Distortion would be an unwanted effect but again could also be used for ashort time just to indicate an event and notify the user.

Phaser A phaser is an effect that phases frequencies in and out with a certain period ofrepetition, again a very noticable and drastic effect but can be used for a short periodof time to indicate a certain event.

13

Page 15: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

3.3 Target Audience

A software tool that alters music in any of the previously described ways might beof use for a programmer that likes to listen to background music and is involved in asoftware engineering project that makes use of build automation. These may seem quiterestrictive conditions, but in reality many of the bigger software projects are performingcontinuous integration and therefore use build automation tools already. Next to thatmany active programmers in the circle of acquantances of the writer have informallyreported that they like to listen to background music on the side. With two commonconditions this should still leave for quite a significant group as a target audience.Like described in the introduction, these programmers should use the tool whenever theyare working on the project. They can work on the project while listening to music likethey always did. Except that this time their music will change according to the resultsof the build automation tools.

14

Page 16: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

CHAPTER 4

Implementation

Now we have a general idea about which people we will be targeting and what the toolshould be doing, it is time to make design and implementation choices. As part of thisresearch is about finding to which extent it is possible to modify music, it would be thebest to work towards an initial release that supports just one combination of platforms,but keep modularity in mind at all times while coding, so that the tool can later bemodified to fit other platforms as well. The programming language used here is Python2.710, this is chosen because Python code is readabe, fast and easy to write and becausethe writer had the most experience with it at the time of writing. Python might becomputationally slow, but the software we are going to make is not computationallyintensive anyway, so this disadvantage should not be worth worrying about. Note thatthe examples of code given below are a very simplified version of what is actually beingused in the tool itself, this is done to keep the explaination from getting too long andtedious. The actual code can be found in the repository of this project11.

4.1 Customizability

As different users with different projects will have different preferences about whichparameters in their music should be changed, we shall be making a configuration filethat can be easily edited to affect the behaviour of the tool. With a configuration filethe user can configure which actions should be performed on the music player on whichevents that the build automation software can produce. This is almost mandatory whenusing different playlists for different events, because each user likes different types ofmusic that can be categorised into these playlists. Besides, to actually link the tool toa build automation server we need to have some sort of configuration anyway, becausethe user needs to enter the address of the server so the tool knows where to get its datafrom.

15

Page 17: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

4.2 Build automation - Tool communication

Periodically polling webpages

The first problem is how to get the information about the latest build to our tool. Somebuild automation tools offer webpages which automatically update after each attemptedbuild. This might be of use as we can use packages such as Beautifulsoup12 that offeran easy programming interface to let us download a certain webpage and systematicallywade through its contents. This can be used to periodically poll the webpage of thebuild automation system to check if there are any changes. If there is a new build,we can extract the needed data from the webpage and use this data for selecting theassociated effect. The downside of this is that this introduces a lot of redundant networkrequests and therefore can unnecessarily increase the workload on the server if the projectinvolves larger groups of people. The frequency of the requests can be lowered to reducethe amount of unnecessary requests and the amount of server workload. However, thisintroduces another problem, which is delay. If the clients only poll the server every xminutes, it can take up to x minutes before the clients actually get informed about anew build in the worst case, which is when a build just finishes after a client periodicallypolls the server for new build results.

Connecting to Buildbot through IRC

The good news is that Buildbot (see chapter 2) has built-in support to run an IRC boton the master server13. IRC stands for Internet Relay Chat protocol, which is a simpleprotocol used for sending chat messages to each other through a chosen channel on anIRC chat server. This IRC bot however, emulates a user but is in fact an automated pro-gram that informs people in the channel about the latest status of the Buildbot server.This bot has a number of different functions. It can be configured to send chat messagesto the channel it is connected with when a build starts or finishes and other people onthe same channel can communicate with the bot to get information about the buildsthrough several commands. Even though this bot is normally used in a chat channelwith actual human users it should also be able to be used with custom made software.Instructions on how to enable the bot properly can be found in the readme.md file inthe root directory of the repository of this project11.

To connect with a server we simply create a TCP socket and connect to the server to beused. A good free IRC server is irc.freenode.org, which is also used throughout thedevelopment and testing of the tool in this thesis. To connect to this server, we needthe following code in Python:

mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

mysocket.connect(("irc.freenode.org",6667))

16

Page 18: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Now we have to identify ourselves to the server and specify which channel we want tojoin by sending a few messages containing that information to the server. The syntax ofthese messages is determined by the IRC protocol14. Because it can be a bit heavy towade through the whole protocol just for making a simple connection, it was useful toderive the code from a clear example found on an internet forum15:

nick = "botclient01"

channel = "mybbchannel"

mysocket.send(’NICK ’ + nick + ’\r\n’)

mysocket.send(’USER ’ + nick + ’ ’ + nick + ’ ’ + nick + ’ :Python IRC\r\n’)

mysocket.send(’JOIN #’ + channel + ’\r\n’)

After sending these messages and receiving confirmation from the server, we should beconnected to the IRC server irc.freenode.org and the channel #mybbchannel. If any-one in the channel sends a message to the channel, we can receive it from now on. Ifthe Buildbot IRC Bot is configured to send messages through this channel each timea build finishes, we can receive them and then extract the name of the builder thatfinished and the build result from that message to. This is the important step in whichwe actually receive the data we want from Buildbot. The advantage of this method overperiodically polling a webpage is that there are no unnecessary requests anymore, whena build finishes, the Buildbot IRC bot will inform us with the associated information.

To receive a messages from a socket, we use the following code:

data = mysocket.recv(4096).decode(’cp1252’)

This statement waits for any incoming messages or returns a message that was alreadysaved in the buffer of the socket. The decode() method is used for decoding any unex-pected characters such as an O, which could otherwise make the code crash.

We can also send messages ourselves by using the IRC protocol through Python. Whenconnected to the IRC server it is very important to respond to ping messages from theserver. The server will periodically send us these ping messages to check if we did notimproperly disconnect. This means it is crucial to answer these pings with a so calledpong to inform the server that we are did not lose connection. If this is not done, theserver will kick the simulated user by the tool, which would cause us not to receiveupdates from Buildbot anymore. Answering to a ping is as simple as:

if data.find(’PING’) != -1:

mysocket.send(’PONG ’ + data.split()[1] + ’\r\n’)

17

Page 19: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Extracting the important data

Now we have a stable and lasting connection with the IRC server it is time to focus onthe important part: receiving data from Buildbot. When Buildbot finishes a build, theIRC bot will send a message through the channel it is connected with. A complete IRCmessage like this received through a Python socket looks like this:

:[email protected] PRIVMSG #kbbchannel :build #51 of

runtests is complete: Success [build successful]

In this example kbb is the name of the Buildbot IRC bot, pc-vlab09.science.uva.nlis the host address of the message sender and #kbbchannel is the name of the channelthe message was sent through. Everything after the colon is the actual message thatwas sent, in which runtests is the name of the builder that just finished and build

successful is its result.

We can also ask the Buildbot IRC Bot what the latest build was. This is going to bevery useful to do when a user starts up the tool, so he does not have to wait for the firstnew build for something to happen after he launches the tool. In the example belowwe ask about the latest build to our Buildbot IRC bot. The two variables represent thename of the channel and the nickname of the bot:

mysocket.send(’PRIVMSG #’ + channel + ’ :’ + botnick + ’: last\r\n’)

Supposing that kbb is still the nickname of the Buildbot IRC bot and #kbbchannel thename of the channel, this code sends the message "kbb: last" to #kbbchannel.

The bot will respond to this message with a new message:

:[email protected] PRIVMSG #kazaabuildbot :last build

[runtests]: 2m53s ago: build successful

The useful information in this message can be extracted by using a regular expression.A regular expression is a hardcoded string with some wildcards left out, which in ourcase will be the name of the builder and the name of the result, because that data isinteresting to perform actions with. A regular expression for extracting this data froma message in which the Buildbot IRC bot tells us about the last result looks like this:

regex = re.compile(’^:’ + botnick + ’_*!\S+ PRIVMSG #’ + channel +

’ :last build \[(.*?)\]: \S+[ seconds]* ago: (.*?)\r\n’)

There are several different syntaxes for the bot to tell us about a newly finished build orabout the result of the last build that finished ealier. Because we cannot know before-hand which message contains what, we will check for all the different types of syntaxesfor as long as we do not find one.

To check every single message if it is of importance we will be making an endless loopafter connecting and keep calling the recv() method to receive all the data the serversends us. Every time we receive data, we need to check if the data is of any use to us bychecking if the data is a ping or if it is useful information about a build by using theseregular expressions. For the full receive-loop, refer to the repository11 of this project.

18

Page 20: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

4.3 Tool - Music Player communication

Now we have found a way to get the name of result of the latest build and the name ofthe builder to our tool written in Python, we have to influent the music that is playingon the users music player. Since Spotify seems to be a music player that is still becomingincreasingly more popular than it already is, it might be a good choice to use this for theinitial functional release of our tool. Several professional programmers at the Universityof Amsterdam have also informally reported that they like to use Spotify, because ithas unofficially been released for Linux16. This means the target audience for the initialrelease will be programmers that use Linux with Spotify.

The problem now is how to control the Spotify application through our Python soft-ware. Luckily, many of the recent music players can offer extended functionality withcommunity-made plugins. Since it would cost too much time for the timespan of thisresearch to build a plugin like this ourselves, we will have to find an alternative thatis already available. Luckily there is a plugin available for Spotify under Linux calledSpotCommander17. This plugin is actually written to control Spotify with mobile de-vices or with a webpage through POST requests. Since it is also very easy to performHTTP requests with POST variables with Python, this plugin can be of great use forthis tool if we can find out the protocol behind it.

By using a plugin called Firebug18 for the Firefox browser, it is possible to open a consolewhich logs all requests. By simply visiting the webpage hosted by the SpotCommanderplugin and activating Firebug, we can see all requests that are being performed andtheir associated variables. Because activating different playlists seemed to be a potentialmethod (see chapter 3) we will try to find out which POST cariables we need to sendto change the playlist first. Opening up the HTML console of Firebug while selectinga custom made playlist on the webpage of SpotCommander yielded the following infor-mation:

action: play_uri

data: spotif:user:kazaakas:playlist:6bYGgYKxkb0bl1V1lBINOY

See figure 4.1 on the next page for Firebug console output that was used for retrievingthis data.

It is easy to use Python to send these POST variables to the same webpage by usingthe urllib and urllib2 packages:

url = http://localhost/spotcommander/main.php

post = {"action": "play_uri", "data": "spotify:album:5LMGAYhn2ywaxGZdtmXGpw"}

urllib2.urlopen(url, data=urllib.urlencode(post))

Sending this request through Python this way proved to execute the same action aswhen a playlist was clicked in the browser menu of SpotCommander. The best part isthat the second parameter holds the Spotify URI of the playlist that will be played. AnURI is basically a code that links to a certain collection of tracks. This is very usefulbecause within Spotify you can right click on any album, artist or playlist and copy theURI. This would allow the user to simply right click on his playlist of choice, copy theURI and paste it into the configuration file, which will be easy to use.

19

Page 21: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Figure 4.1: Firebug showing the POST variables used for initating playback of thisplaylist

20

Page 22: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

4.4 User configuration

It would be preferable to make an interactive graphical user interface for the tool, how-ever, since different music players with different remote control plugins are going toneed different commands, we would need to make a different user interface for each dif-ferent music player and potentially for different platforms, because some players haveplatform-dependent plugins. This requires more time than available for this research,so a simple configuration file was used which will have to be edited by the user. Sinceour target audience consists of experienced programmers, they will be proficient withediting configuration files anyway, which makes spending time on creating an interactiveuser interface even less valuable.

This configuration file consists of a JSON dictionary. JSON is basically a syntax forwriting plain text that can be loaded into a data structure instantly. Using this willagain save us the hard work of developing our own notation for the configuration file.The JSON dictionary holds the credentials, a few boolean options and a command dic-tionary. The tool filters out any newline, tab or carriage return characters when it loadsthe configuration, so it can be saved as a nicely structured and indented file withoutmaking it invalid JSON.

The following options in the configuration file determine some credentials:

"nick": "botclient01",

"server": "irc.freenode.org",

"port": 6667,

"channel": "mybbchannel",

"botnick": "kbb",

These options respectively represent the nickname of the client bot, the address of theserver, the port of that server, the name of the channel to join and the nickname of theBuildbot IRC bot.

The most interesting aspect of the configuration file is the commands dictionary. This isa dictionary within the main dictionary that holds several keys that represent data thatBuildbot returns. This can be the name of a result, but it can also be the name of abuilder followed by the name of a result, separated by a comma. Giving only the nameof the result will make the tool execute the command associated with that key if it isequal to a found result. If a name of a builder is also given, the tool wil only perform theassociated command if the given builder returned the given result. For both the nameof a builder and result regexes are also supported instead of just strings. This was donebecause some projects might have a lot of different failure events and if you just wantto play the same playlist with any kind of failure event you could enter .*[Ff]ail.*,which will match any result with the substring fail or Fail in it.

21

Page 23: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

The values associated with the keys that represent Buildbot results is a data structurewhich could be called a command dictionary. A command dictionary is a dictionarydescribing the attributes of the command that will be executed if the result of the buildmatched the associated key. Command dictionaries can have several different valid forms.As previously described, the command can be an HTTP request with POST variables,but it can also be an HTTP request with GET variables or it can be a system call, whichis also implemented because some music players can be controlled through calling theirexecutable with certain parameters. This gives the tool a lot of flexibility to be usedwith different music players and different remote control plugins.

Because some music players might need multiple commands in a row to perform certainwished actions such as starting playback of a new playlist, multiple sequential commandsare also supported. In this case the key with the build result should link to a list ofcommand dictionaries.

A single command dictionary that starts playback of a specific Spotify playlist looks likethis:

".*[Ss]ucces.*": {

"type": "http",

"url": "http://localhost/spotcommander/main.php",

"POST": {

"action": "play_uri",

"data": "spotify:album:5LMGAYhn2ywaxGZdtmXGpw"

}

}

The three keys in this dictionary determine the type of the command, the address toperform the request on and the POST variables respectively. For more detailed informa-tion on how to perform other types of commands or a sequence of commands, refer tothe readme.md file which is found in the root directory of the repository of this project11

Lastly, there are several other boolean options:

"autorename": 1,

"autoreconnect": 1,

"pollonstart": 1,

"ignoreduplicates": 0,

If autorename is set, the user automatically renames to a random name if his name is inuse. If autoreconnect is set, the tool will attempt to reconnect after losing connection.If pollonstart is set, the tool will ask about the last build as soon as it (re)connects toa server and execute the associated command. ignoreduplicates will allow the scriptto activate two actions in a row even if they are the same. More about the use andreason of addition of these options can be found in the next chapter.

22

Page 24: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

CHAPTER 5

Functionality validation

Normal operation of the written tool should consist of initially connecting to a serverand then connecting to the appropriate channel. When connected, every time a buildfinishes it should execute any commands that are associated with that result itself or thatresult from a certain builder, depending on the configuration. The tool that has beendeveloped which can be found in the repository of this project11 satifies this behaviour.However, there are several erroneous and controversial scenarios thinkable which canoccur while using the tool. This chapter will discuss these kind of scenarios in detail.The scenarios discussed here have either been found during development and testing orthrough forethought.

5.1 Equal results

When a new build finishes, chances are that its result is the same as the build beforeit. In this case it depends on the users preferences if we should perform the associatedaction with the build result or not. When the user uses temporary effects at each result,he will probably want to have the effect played anyway to inform him, but if a user usesplaylists he will probably not want to start at the first track of the playlist again if thebuild result has not changed anyway. This is why the option ignoreduplicates hasbeen built in. If this option is set, the command associated with the build result willstill be performed even when it is the same as the last result.

5.2 Restarting the tool

If a programmer calls it a day and stops working on the project, he should close thetool so it does not influence his music anymore. However, if he starts the tool againthe next day to continue working, there may have been some changes to the project.If the programmer uses a configuration which uses different playlists associated withdifferent types of results of the last build, the last result has to be asked from the server,otherwise the programmer has to wait until a new build finishes for the tool to actuallystart representing results of the last build by playing his playlists. This is why there is anoption called pollonstart. If this option is set the tool will ask for the last build wheninitially connecting to a server and execute the associated command with that result.

23

Page 25: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

5.3 Server-client connection lost

When the connection between the tool and the IRC server is lost there will be no wayto correctly modify the music anymore to the users configuration, because there is nopossibility of receiving updates about recently finished builds from the Buildbot masterserver. That is why there has been an option built in called autoreconnect. If thisoption is set, the tool will automatically attempt to reconnect to the server when theconnection is lost. Since the server can be down and we do not want to send unnecessaryamounts of packets, the tool will wait for five minutes if the reconnection fails after threeattempts, until it eventually connects again. Note that if the initial connection gives anykind of error it will also always try to connect two more times. It will retry after thatand after waiting for five minutes if the option autoreconnect is set. If all of those threeattempts fail, the tool will again wait for five minutes until trying again, until it hopefullyeventually connects. Because this might still result in spamming the server too muchif connection gets lost frequently, this option can be disabled by the user by settingthe option to 0, should he wish to do so. When reconnecting to the server after theconnection was lost a recently finished build can be missed. If the user reconnects thereis a possibility that there has been a new build, which is why the tool will always askfor the last build when reconnecting after a disconnect, regardless of the pollonstart

setting. This has been done because this is an erroneous scenario, for which we shouldtry to compensate. Its not to say with certainity if there has been a new build with thesame results or if there has not been a new build after having lost connection for a while,this should also be taken into account. So when the last build has not changed whenreconnecting, no actions will be performed. Also, when the user did not set pollonstartand there is no last build known, we can never be certain that the last build actuallyhas been changed, which is why no actions will also not be performed then.Because the IRC protocol requires periodically answering of pings between clients and theserver (usually in intervals of around 250 seconds), we can be certain that the connectionis lost when nothing is heard for 300 seconds. When nothing is heard for 300 seconds,the tool will also attempt to reconnect to the server if autoreconnect is set.When something is going wrong with networking the Python socket might return emptystrings. This is why any empty string returned by the recv() method will be countedas if nothing was sent, therefore increasing the time that nothing has been heard fromthe server, until the connection eventually times out after 300 seconds if something wasactually wrong, in which case the tool will reconnect if the user has configured it to doso.

5.4 Server-Buildbot connection lost

When the connection between the Buildbot IRC Bot and the IRC server is lost, nobodywill be able to receive any updates about builds and therefore nobody will be able tohave their music modified accordingly. Luckily, the Buildbot IRC Bot automaticallyreconnects to the configured IRC server. This introduces another problem however, ifthe connection was not cleanly closed, the name of the IRC Bot will still be in use whenthe bot attempts to reconnect. Because of this, the bot will take on an alternativenickname, which is its configured nickname followed by an underscore character. Theproblem with this is that if any newly connecting users join the server and try to sendthe last command to the Buildbot IRC Bot, the bot will not receive this commandbecause it has a different name than in their configuration file. The same counts for

24

Page 26: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

identifying messages from the bot about recently finished builds. This last problem canbe easily corrected by adding an optional underscore after the name of the bot in theregular expression that is being used. When asking for the last build however, there isno such method. This is why the tool does not only send the last command to thenickname of the Buildbot IRC bot, but also to the alternative nickname of the bot. Inthis case, if the bot is connected to the channel, it will always answer with informationabout its latest build, regardless of the fact if it is using its alternative name or not.

5.5 Name in use

The emulated user of the tool can also be disconnected improperly, which will cause hisold nickname to linger around for a few more minutes and prevent further connectionwith the same name. That is why there has been an option built in called autorename.If this option is set, the tool will automatically reconnect to the IRC server with arandomly generated alphanumerical name that starts with the capital letter T (T fortemporary). Since users only need to communicate with the Buildbot IRC bot and notwith each other, they do not need to be able to identify each other, which is why we canseamlessly use this technique without any consequences. Because the name of nicknamethat the tool uses to connect to the server does not matter, the nickname field also hasthe functionality to be set to an empty string, in which case the tool will connect witha randomly generated name every time it connects.

5.6 Errors in the config

When the configuration misses certain options or when it does not load as valid JSONthe user must have broken the configuration file. That is why the application will refuseto start when this happens because the user should have an understanding of what heis changing in the configuration, an understanding which he will not have if he createderrors in the file.

5.7 Unexpected Errors

Even with extensive forethought, unexpected errors can always occur. This can bebecause a regular expression fails for any reason, when we receive a character that doesnot fit the used encoding or any other still unknown mistakes. Because we want thetool to be as reliable as possible we do not want the tool to quit unexpectedly. Thisis why there are try and except clauses around all vulnerable pieces of code. Whensomething goes wrong in an unexpected way we would want to log the error to theconsole and continue regular operation afterwards. So when an unexpected error occursduring decoding, analyzing or executing, the current message or action will be discardedand the tool will restart the receive loop again to start receiving and analyzing followingmessages. Its not forgivable to discard an action or message this way, but its better thancrashing.

5.8 Default configuration

Not everyone likes to wade through all the options of a tool when they just start to useit for the first time, because they might just want to see what the tool is like and what

25

Page 27: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

it does. This is why a default configuration should be made for each supported plat-form. Again, because playlists have been thought to be the most interesting and usableparameter (chapter 3) this would be a good option for an initial configuration. Becauseplaylists indicate states, we will set all of the boolean options except ignoreduplicatesto make them work as well as possible as explained earlier in this chapter. The name isleft blank because the user only needs a name because the IRC Protocol requires this,so a random name will suffice. The only thing that needs to be configured is the Build-bot IRC bot its name and the server address. As for default playlist associations withbuild results in case of Spotify, the album Eliminator by ZZ Top and the album PerfectStrangers by Deep Purple are chosen, for no particular reason other than being personalfavorites of the writer. This can be done because the user only needs to be given a roughidea about what is happening when he is using a default configuration, which two differ-ent playlists will manage to do. Afterwards he can configure his own playlists and usethose. The two default playlists are linked to the regular expressions .*[Ss]ucces.* and.*[Ff]ail.* respectively, which will match any general status about the build eitherfailing or succeeding.

5.9 Accidental muting

When programmers are using the Buildbot IRC Bot for the first time through manualinteraction they might want to try out some commands to see what they do. The problemwith this is that the bot also has a mute command which will completely sabotage thetool when executed, because the bot will keep completely silent after using this, so nomore updates about newly finished builds will be given. As this can be a serious issue,the best way to fix this would be to completely disable the mute command of the bot,however, this is not supported through configuration files. Luckily, Buildbot is alsowritten in Python, so the actual source code of Buildbot can be modified. To disablethe mute command, head to the

/buildbot/master/buildbot/status/words.py

file in your buildbot source, which is the file that contains code for running the BuildbotIRC Bot. Now replace the body of the function called command MUTE with merely areturn statement. Afterwards, if its there, remove the file called words.pyc in the samedirectory. This file is a pre-compiled version of the previous words.py file that we havejust altered. Because we do not want to use this version of the file anymore, it shouldbe removed. Python will automatically compile new the file again if needed. Followingthese steps will still leave mute as a usable command, but it will do nothing, so it willno longer be able to sabotage the tool. If the Buildbot IRC Bot is configured correctlythe command notify off should not be able to create a situation in which there willbe no analyzable messages sent after finishing builds, so this command is of no threat.

26

Page 28: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

CHAPTER 6

Appliance evaluation

Even though acquaintances of the writer that are actively involved in programminginformally reported that this tool may be fun and useful, scientific research on the reallife appliance of the tool on the target audience still has to be done. Because of thelimited timeframe available for studying this subject, no such research has been doneyet. Since speculation about methods of measurement is one of the first steps that wouldhave to be taken to continue this research in the future we will elaborate on this.

6.1 Qualitative Research

To qualitatively research the degree of appliance of this tool will need several peoplefrom a few different software engineering projects. Conditions for test subjects are asfollows:

• The person is engaged in an active software engineering project that makes use ofBuildbot.

• The person likes to listen to music on the background while programming.

• The person is willing to set up the tool and provide feedback after a short periodof usage.

Depending on the music player and platform the person uses, it may be required to addsupport for additional music players. More diversity between test subjects will give awider overall view after feedback is received. However, when time is a concern, it shouldbe taken into consideration if the extra time investing in adding support for their musicplayer is worth their feedback. If multiple potential test subjects are using the samemusic tool that is not supported, it will be more worthwhile to add support for theirmusic player. If only a very limited amount of test subjects can be found it will also bemore worthwhile to start supporting a music player for only one test eubject becausethe fewer people that are tested, the more difference one extra test subject makes. Theonly things that need to be changed when adding support for a new music player are thecommands in the configuration file. It is required however to write an additional readmefile for each different supported music player since the user can not know what pluginhas been used to make the configuration file work with his player and how to configurethe configuration file accordingly. A readme file should include concise steps on how toinstall the required plugin and which paremeters of the commands to change to alter thedefault playlists. Since switching playlists seemed to be the most valuable option (see

27

Page 29: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

chapter 3) it is recommended to make the default configuration use switching betweenplaylists and explain the user how to add his own playlists in the readme file.After offering and preferably personally explaining the tool to the test subjects it shouldbe used during active programming for at least a couple of days. Afterwards a ques-tionnaire should be given to the test subjects so they can give their feedback about theactual usefulness of the tool. Possible questions on this questionnaire could be:

• Did the tool help you stay informed about the current status of the project?

– If so, what functionality did you use for achieving this and how?

– If not, do you have any suggestions to improve this?

• Was the tool fun to use or did it make your time programming more pleasant inany way?

– If the tool was fun to use, which features played the bigged role in this?

– If the tool was not fun to use, what did you dislike about using the tool?

• Did the tool help you work more effectively?

– If you worked more effectively, which features played the biggest role in this?

– If you worked less effectively, what was detrimental to your working perfor-mance?

• Was the tool easy to configure?

– If not, what would you like to see changed in a future release?

• Would you recommend this tool to other software engineers?

– If not, is there anything about the tool that can be improved to change youropinion on this?

• Do you have any further suggestions or remarks?

After receiving feedback from several different people from a few different projects, theindividual results will have to be interpreted and a general conclusion can be drawn bycomparing the answers with each other. If the tool turns out to be not recommendable,but the test subjects have a general opinion about what can be improved, a secondresearch can be done after revising the tool by using the feedback. If the same peopleare used for this second research, they can be asked about wether or not they think thetool has been improved or not and they think it is more useful and more recommendableafter revision.

28

Page 30: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

6.2 Quantitative Research

A quantitative research would preferably use a larger group of people. Beforehand anunanimous poll should be taken among all of the test subjects about which music playerson which platforms they are willing to use while testing the tool. Through this poll, thefew most popular combinations of music players and platforms that are either alreadysupported or easy to support should be chosen to use with the research. When usingquantitative research it will probably not be possible to assist everyone personally byusing the tool, so a lot of effort should be put into making the readme file extra clear andunderstandable, possibly through example screenshots. When all of these preparationsare made, all of the test subjects that said to be willing to use the combinations of musicplayers and platforms should be contacted with the information they need to use thetool. After at least a couple of days of time, the test subjects should be contacted againwith a questionnaire concerning their opinion about the tool. However, with quantita-tive research it may be useful to let the test subjects rate certain aspects of the tool ona scale of 1-5 or 1-10. This makes it easier to draw conclusions from a larger amount ofdata, because for each question a mean can be calculated. A possible questionnaire forthis could be:

Strongly Mildly Mildly StronglyDisagree Disagree Neutral Agree Agree

The tool helped to inform me aboutthe current status of the project

It was fun to use the tool

The tool helped me to work moreeffectively

The tool was easy to configure

I would recommend other softwareengineers to use this tool

Do you have any further remarks?

With a large amount of results a general mean can be calculated per question and amean per question can be calculated for each supported combination of music playersand platforms. This way a difference may be seen between users of different musicplayers and platforms. If the specific question has a significantly different rating thanthe general mean that same question, this may indicate that a certain supported musicplayer has either poor or exceptional explaination or readability, depending on whichquestion differs and how. Additional remarks made by the testers of that specific musicplayer and platform can be used to further investigate the possible issue.

The advantage of this method is that differences between the quality of the supportof music players can be clearly seen. Also, because means and larger groups are used,this method is less susceptible to producing skewed results due to unusual outliers. Thedisadvantage is that qualitative research might give more of an in-depth view about eachissue because of using more complex questions.

29

Page 31: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

CHAPTER 7

Conclusions

Through the course of this research, music-based quality control looks promising anduseful in theory. Not only does it seem to be possible that through modification ofmusic we can use a passive thought process (the listening to music) to actively alertthe programmer, but the currently playing music can also be consulted at any time as asource of information about the health of the latest build when preconfigured playlists areused. There are also several different useful parameters in the music that can be changedwhich will have different effects on the user, namely permanent effects that can indicatestates and temporary effects that can indicate an event happening at the time. By usingthe Buildbot IRC Bot and music player plugins together with Python, it has been shownthat Python is a sufficient programming language to implement this type of functionalityin a structured way without the need of any additional packages. Community madeplugins for all kinds of music players have been shown to be of great help when needingto control the music player through custom written automated software. Furthermore,it should be easy to validate the usefulness of the written software through a group oftest subjects which are given the tool, the required explainations and a questionnaireafterwards through which they can provice feedback about different elements of the tooland its functionality.

7.1 Future continuation of this research

To continue on this research in the future, there are still lots of areas which can beresearched further. Later in this research support was added for Foobar20008 throughthe foo httpcontrol plugin19. This was initially done to use with the many sound effectsassociated with Foobar20009. However, this plugin did not support enabling of theseeffects and no other plugins that did could be found. It should be possible to add thisfunctionality to existing plugins through the Foobar2000 SDK to use all of the differenteffects with the tool.

An interactive user interface could also be built for easier modification of the tool.Even better would be to create a standalone plugin for music players with the samefunctionality as the tool in order to completely replace it. Because this thesis was aboutdiscovering the possibilities of custom software for this concept, this has not been done,a more modular approach was chosen instead.

30

Page 32: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Another possible point of improvement could be made by using Buildbots web pages.These pages contain additional information about finished builds such as where it wentwrong. This information could also be used to filter on more specific events.

Lastly it would be very useful to perform evaluation research among the target audiencefor this tool to evaluate if the tool is useful after all. This could also lead to new insightson how to revise the tool even further.

31

Page 33: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

Bibliography

[1] Apache Maven Project.http://maven.apache.org/.

[2] The Apache Ant Project.http://ant.apache.org/.

[3] Buildbot.http://trac.buildbot.net/.

[4] Automated Continuous Integration and the Betabrite LED Sign.http://www.codinghorror.com/blog/2005/03/automated-continuous-

integration-and-the-betabrite-led-sign.html.

[5] Lights! Continuous Integration! Action!http://www.rallydev.com/community/engineering/lights-continuous-

integration-action.

[6] Build Indicator Lights - The Pictures.http://www.longsteve.com/fixmybugs/?p=402.

[7] Bubble, Bubble, Build’s In Trouble.http://www.pragmaticautomation.com/cgi-bin/pragauto.cgi/Monitor/

Devices/BubbleBubbleBuildsInTrouble.rdoc.

[8] Foobar2000.http://www.foobar2000.org/.

[9] A collection of special effects (Foobar2000 plugin).http://www.foobar2000.org/components/view/foo_dsp_effect/.

[10] Python Programming Language - Official Website.http://www.python.org/.

[11] SBEXOBZO/MusiqQC - Github.https://github.com/SBEXOBZO/MusicQC.

[12] Beautiful Soup.http://www.crummy.com/software/BeautifulSoup/.

[13] Buildbot IRC Bot.http://docs.buildbot.net/0.8.1/IRC-Bot.html.

32

Page 34: Music-basedqualitycontrolin software engineering · Buildbot Buildbot3 is a piece of software that can be used to automate building and testing and is oriented at continous integration

[14] Internet Relay Chat Protocol.http://www.irchelp.org/irchelp/rfc/rfc.html.

[15] IRC bot example on the Ubuntu Forums.http://ubuntuforums.org/showthread.php?t=1493702&p=9363159#

post9363159.

[16] Spotify for Linux.https://www.spotify.com/nl/download/previews/.

[17] SpotCommander.http://code.google.com/p/spotcommander/.

[18] Firebug.https://addons.mozilla.org/nl/firefox/addon/firebug/.

[19] Foobar2000 - foo httpcontrol plugin.http://www.hydrogenaudio.org/forums/index.php?showtopic=62218/.

33