Wednesday, March 19, 2008

Ideas of Thesis on Ambient Device

About the Project
I am now working on a Hackystat related project call AmbientHackystat, which utilizes Hackystat with ambient device to show users some useful project states that indicated by data collected by Hackystat. For example, turn the ambient orb into red when a build fail and let the nabaztag(a bunny) tell you when new changes are committed to code repository. I am think of how will the thesis be if it is based on this.

The system is defined by a set of trigger action pairs, where trigger get data from Hackystat database and check it, then invoke some ambient devices' action when the data satisfy some defined condition, such as last build fail.

Current progress
For the current moment, the functionality is quite simple. The orb can change color and pulse speed, and the bunny can only talk. There are only two triggers available: SensorData and Coverage. Though SensorData trigger is able to configure to monitor all kind of sensordata from Hackystat, sensordata is too low level that only a few type of data will be meaningful to be monitored. My partner is working on the bunny and it will be fully utilized soon hopefully. I still keep working on the triggers and more will be built in the future.

Thesis research point
There are two research point within this project: 

1. What kind of trigger will be useful
This part is more like a data mining process. How to generate meaningful data for the thousands of raw data. What kind of information will be interesting to developers and project managers. How much detail should be provided, such as should it tell the number of coverage or just show if the coverage is within a certain level. It has to be careful when abstracting information, too much detail will make it verbose while too little detail will make it meaningless. However, this part is mostly similar to another project in my lab that call Boswell, which is a auto micro biographer that generate informative message and send it to all kinds of information platform such as twitter, email, text message or even facebook. The core parts of these two project are the same: abstract information from raw data of hackystat. So make be we should work together in this part for research.

2. How to present a project state/development event on ambient devices.
This part is much unique. How to present things is really a matter. It has to be noticeable enough to make people to be able to aware of it. But it should not be too distracting. People need to be focus on their work and don't want to be scared by ambient devices. Hence color and animation seem more fit this situation than sounds and speech. However, some particular events may do worth a vocal alarm, such as build fail may be one of them. These issues are needed to be settled. 

Problems of research
The most important issue for this research is the user. We do need a group of user to really try this out to tell if a certain function is useful. It might be OK even if we are the users ourselves. But in order to evaluate the system, we have to be a group that working on a same project and work with some certain behaviors that will make these ambient devices useful. For example, we should have people working at the same time that they will not be too easy to have the whole view of their project, then we can evaluate if it is useful to let the ambient devices tell them if the build and test fail or if someone is opening/editing the same file his is working on.

At this moment, we only have 3 people working on this project. We usually work at different time. And I, the only one get easy access to these ambient device, is the one write most of the project. So I already know what is happening before the devices change their state. I hope we could have some real users to try this mechanism and provide feedback so that we can evaluate and improve. I think this will be an essential part of the thesis.

Ant, Hudson and Continuous Integration

Use Hudson
I have just hooked my project onto Hudson, a continuous integration build system. The process is amazingly easy that I don't even need to read any guideline before finish it. Just click the new job, field out the configuration form, save and I am done. The configuration form is good self-documented, and every entry is followed by a small question mark where you can click on it for more help information.

In my project's job, I use subversion for source code management and invoke ant task for build process. It is pretty straight forward that I have already these tools for quite a while.

Write Ant Task for Hudson
After hooked my project onto Hudson, I become more anxious about the used way my project being verified: run junit task for unit testing and emma task for coverage separately because emma does not fail even though the unit test fail and it does not send junit sensor data. Though I already feel it is not a good way to do it for a long time but I just did not brother to look into the ant file to fix it. But now as the Hudson is looking for new commit every minute and the Hudson's server is hooking up over 20 project in the same time, I am become kind of worried about wasting the machine's power for redundant work. Also, for one of the purpose of using Hudson is to let it generate useful project data for my AmbientDevice project, it is better to get the data sooner so that the triggers can react earlier. So I tried to look into the and to look for some solution.

What I found is, what makes the build fail is not directly because of the junit tests fail, but because a variable is set to false when a test fails. The variable is set to the failureproperty attribute in junit task, and it is not set in the junit task that inside the emma task. So I just add it back to emma one and make the build fail when tests fail. It make more sense because coverage of fail tests will not be accurate. Also I add the junit sensor to the task dependence to send data of unit tests. But then I noticed that even though the build fails when test fails, the coverage data is still computed and emma sensordata is sent. The horrible thing is this incorrect coverage data will corrupt the project data. For example a false alarm of coverage drop by 20% may be raised because of the junit tests fail. That will be quite misleading and confusing. The solution for this is to add unless="junit.failed" in and emma.sensor to stop it from running. But the unless attribute is actually occupied by a variable called emma.disable already. However, it does not have any usability about this variable so far. So I just removed it. I am also wondering if it is possible and how to put an AND operation in the attribute verification such as if and unless

But anyway, the project is now verified in the way that I want: just run the unit test once and get both unit test results and coverage result if test pass. And emma will fail when test fails so that it will not generate some misleading coverage data. I just remember that I have met this kind of matters before that I run the emma after some small changes and suddenly found the coverage is much lower than I thought. I was thinking that I might have forget to put some test on some method then I looked into the test cases. But I found everything are there. It took me quite a while before noticing that it is because a test fail just when it start so all the rest of the test is not executed. That is quite a terrible experience and I am glad  that I have fixed it by the way.

Code Review for iHacky

Review project: iHacky for hackystat
This is a facebook application for software developers to generate their professional profile and get connected with other developers. It is based on the software engineering toolkit framework called Hackystat which collect and analyze software development process and product data in order to get a better view of the state of software development projects.

For user installation, there is a InstallationGuide wiki page in their project site. The process is described pretty clear in it. Moreover, the installation itself is good self documented that I finished the installation smoothly without go through the InstallationGuide.

iHacky is written in php, which I am not that familiar with. So I did not put much time to go over the code. I will focus in the functionality of the application.

Inside iHacky, I have to say that it is now almost empty. No actual useful function is provided. I did not use facebook much and not quite familiar with what it is capable of. Therefore, it is hard for me to determine if iHacky is useful or not. It is still under developing, however, it is still not proper to release a empty framework for code view. Though one of our view's goal is to provide some advise of what kind of functions will be suite for this application, if the developers(and also users) themselves have no idea of what can the application provide, how can they assume that other user will have? In my aspect, I find it useless at this moment, and have no idea what it might be capable of other than those of Hackystat ProjectViewer and TelemetryViewer.

For advise, the idea of showing what kind of tools, IDEs and programming languages are my favorite sounds cool. Then maybe I can find more people that using a particular tool and go ask for help and discuss things.