Friday, October 29, 2010

24.DecathlonUserStories

The option of being part of the Hawaii Solar Decathlon Team while in ICS413 is quite the opportunity. "The U.S. Department of Energy Solar Decathlon is an award-winning program that challenges 20 collegiate teams to design, build, and operate solar-powered houses that are cost-effective, energy-efficient, and attractive. The winner of the competition is the team that best blends affordability, consumer appeal, and design excellence with optimal energy production and maximum efficiency.

The first Solar Decathlon was held in 2002; the competition has since occurred biennially in 2005, 2007, and 2009. The next event will take place on the National Mall in Washington, D.C., Sept. 23–Oct. 2, 2011. Open to the public free of charge, visitors can tour the houses, gather ideas to use in their own homes, and learn how energy-saving features can help them save money today."


Purpose

The Solar Decathlon:
  • Educates student participants and the public about the many cost-saving opportunities presented by clean-energy products
  • Demonstrates to the public the opportunities presented by cost-effective houses that combine energy-efficient construction and appliances with renewable energy systems that are available today
  • Provides participating students with unique training that prepares them to enter our nation's clean-energy workforce.

-http://www.solardecathlon.gov/contests.cfm
-http://www.solar.hawaii.edu/

It is because of this project, our class begins the process of designing a system that allows for close monitoring of the applications with their respective costs and profits. This is done to help aid those living in the house have a tight control of their expenditures in order to break even with the power grid and be self sustaining. For this blog entry I will show 10 user stories that can portray options describing the use of the system to be developed.

1.) A household member wishes to inquire to the families energy consumption for that particular month. They will use their smart phone to bring up a web app that allows for the graphical visualization of their current monthly consumption. The member will have the option to choose which day/month/year they would like to view.

2.) A household member wishes to get up out of bed in the middle of the night after awaking to a clatter. The member will say "lights," and the voice activating lighting system will dimly illuminate the room. After exploring the area of the house from which the noise came, the user will return to bed and say "lights" a second time, and the lights turn off.


3.) A household member wishes to set an alarm for the lights to turn on in his house in the early hours of the morning. The user will set this alarm on their phone and go to sleep. The lights then turn on at the requested time in the morning.

4.) A household member wishes to view the O2 generation for a various day. The member will use their smart phone to bring up the data represented by the web application. After clicking the O2 tab, the user will see a line graph that shows the estimated O2 being produced by the aquaponics.

5.) A household member decides that they need to save more energy for that month. The user then goes to their smart phone and enables a checkbox called "spartan savings". This puts the house into spartan mode where only the absolute bare minimum energy is expended to help the house break even with the power grid.

6.) A household member wishes to be notified if their expected energy consumption will cause them to not break even with the power grid. He then whips out his smart phone and goes to the energy consumption tab. He then enables a check box that will "notify if consumption > produced." The user then rests assured that he will know when this may happen.

7.) The house member from story #6 also wishes for everyone else in the house to know if their consumption is far too great, and goes back to the energy tab on the smart phone web app and enables "notify all household members" check box under the "notify if consumption > produced" checkbox.

8.) A household member decides that they want to email their cousin their energy usage vs. consumption graph to brag about how "green" they are being. The user then brings up their smart phone. The user then clicks on the energy tab and clicks the "month" button. The graph provided by google has a link associated with it, and the user copies it into an email and sends it to their cousin.

9.) A household member wishes to play pong on their phone but also have it visualized by the LED array encasing the house. They bring up their smart phone and have it access the web application which consequently has a games tab. The user selects the games tab and selects pong. By default pong is only displayed on the phone, but the user decides to enable it to be viewed on the LEDs and enables the checkbox to do so.

10.) A senior household member wishes to prohibit the TV from being turned on during certain hours of the day. But this member is currently at work. He then brings up his smart phone and accesses the parental housing controls and selects TV. With a quick scroll of 2 drop down menus, the member has now set the TV to be powerless/inactive from hours 7am to 6pm.

Tuesday, October 26, 2010

23.WebsiteUsabilityReview

When defining usability, one should consider its five quality components:

  • Learnability: How easy is it for users to accomplish basic tasks the first time they encounter the design?
  • Efficiency: Once users have learned the design, how quickly can they perform tasks?
  • Memorability: When users return to the design after a period of not using it, how easily can they reestablish proficiency?
  • Errors: How many errors do users make, how severe are these errors, and how easily can they recover from the errors?
  • Satisfaction: How pleasant is it to use the design?

(http://www.useit.com/alertbox/20030825.html)

For this blog entry, I will describe how these five quality components apply to two  websites as I believe them to have high levels of usability. I will then describe how two other websites are lacking in areas of usability.

(Good Usability)


nytimes.com (The New York Times)

Learnability: The front page of the New York Times website should have a very familiar feel as it mimics a newspaper. Most people know what a newspaper looks like,
and how to navigate it. Arguably, this webpage navigates better than a newspaper as one doesn't have to fumble about with the loose sheets of paper.

Efficiency: Since most users already know the design of a newspaper, one can just read the headings and briefly glance at what things are interesting to them. The front page provides snippets of information that the writers feel relevant to their articles and are what promotes the users interest to click a link.

Memorability: Again as mentioned previously, this webpage is very intuitive due to the fact that it mimics a newspaper design. As long as the user has seen and used a newspaper, they will always know how to navigate this page.

Errors: It is very hard to make an error on this webpage as the links are very distinguishable from each other. However, if one were to make a mistake and mis-click on a link, he/she would be able to simply hit the back button to get to the front page. Also, each page that is clicked on will generally have some link back to the front page, no matter where the user navigates to.

Satisfaction: There is an sense of unbroken information flow when I navigate this page. Finding interesting information is very easy as it will pop out at the user. The left column also provides links to various specific pages related to categories of news, such as sports, science, health, etc. The user interface to this website is very simple and I believe it to be very pleasant to navigate.

pandora.com (Pandora Internet Radio)

Learnability: The front page of pandora is very self-explanatory. To create a new internet station, one just clicks the button, "create a new station..." From here, the user can enter in the name of a genre or particular band they are interested in, and pandora will generate playlist of songs for the user. In total, the user has to perform at most three actions to start listening to music. Since there are few hoops to jump through, the chances of the user accomplishing these basic tasks are fairly high. In the case that the user wishes to create an account, there will be more steps involved, but this will be a one time task.

Efficiency: After the user has created their first station as explained in Learnability, the user will only have to repeat the same steps to create a new station. In the case that the user wishes to switch stations to another station in the set of stations they have created, the user will only have to click on the station. So far, the total count of operations that a user would have to endure is four. In most cases, the user will only be switching through stations. The worst case scenario would consist of the user constantly creating many new stations, but users will generally not behave this way.

Memorability: Unless the user forgets their account information, the total amount of the common operations that a user will commit to memory is ~four. I would imagine that even the least tech savy people would be able to handle these four operations, no matter how long they may have been away from this page. Since the labels of all the links are self explanatory, the user will not have to remember much to get started again. In fact, the site saves the users information, so a default station will start playing music as soon as the user comes back to the page.

Errors: It's difficult to make errors on this website. If the user selects the wrong station, they can simply click on the correct one. If the user creates a station that they did not want, they can delete it by using the drop down menu associated with the station and repeat the process of station creation until they are satisfied.

Satisfaction: Navigating this page and accomplishing the task of creating a music channel is fairly seamless. Manipulating the station environments feel natural to those who are comfortable using computers. Even if you don't use a computer, it should be pleasant to use this site as there aren't too many things to remember. One could say the ease of use is comparable to typical music entertainment electronics.

(Bad Usability)


http://www.joneschijoff.com/ (Industrial Designer?)

It's hard to understand what the point of this webpage is. Navigating it is simply a pain. Although it incorporates the use of HTML5, it is misused. The user does not immediately understand what the point of the brain in the middle of the page is supposed to represent. There is minimal amounts of information being displayed. Thus, navigating and trying to find information is very tedious. The user will only remember this site in a way in which they will remember never to visit it again.

The chances for error while browsing this page are very large. The user can click just about anywhere on the front page and get output, however the output is enigmatic. In the most general case, upon clicking a part of the brain, you are given a zoom in view of the brain. When clicking the right error, you are taken to a matrix of pictures that have seemingly little to do with each other. There are no text links and the user is left to deduce where the useful information is.

When I leave this page, I'm left feeling very dissatisfied.

http://www.siphawaii.com/ (Shop in Paradise)

This site gives an ample definition to the statement "information overload". It is the exact opposite of the page previously reviewed. The web designer has filled this page up with many colors and styles. The main page is hard to look at. Reading the page gives the user an inclination to turn their head away from the bombardment of noise. In terms of efficiency, the website is not efficient at all. The person who made this page obviously neglected most common html interface structures, such as a drop down menu. There is a lot of redundancy with the labels and more than enough pictures.

The links on this page provide no feedback to the user as to which links have been previously been clicked. If a user wishes to find what item(s) they were looking at previously, they will have to make the search once again with little reference. This can debilitate the learning process associated with this page. The user will learn that you have to associate items of interest in relation to items of disinterest to find the items again.

The pages are also extremely "tall." The user will have to scroll through large portions of screen real estate to have the chance of finding what he/she is interested in. My finger is worn from the continuous use of the mouse-wheel on my mouse.

Upon adding an item to the cart, the user is whisked far away from anything that resembles the page they were at previously. This can cause confusion and perhaps annoy the customer enough so that they may give up entirely.

The site is memorable in that I may remember never wishing to be bombarded by so much information at one time again. I leave this page feeling extremely dissatisfied.

Conclusion
In conclusion, the less thinking involved, the better the user response and hence, the higher rating of usability corresponding to the product.

Thursday, October 14, 2010

21.RoboHosting

This assignment required the ICS413 class to:
  1. Task 1: Install an SVN client. Download and install an SVN client. 
    1.  If you are using Windows, I recommend TortoiseSVN. If you are using a Mac, I use SmartSVN. Both are free, open source packages.
      1. I downloaded both subversive plugin for Eclipse, and SmartSVN for OSX.
  2. Task 2: Checkout/modify/commit an existing system hosted at Google Projects.
    1. Check out the "robocode-pmj-dacruzer" project into your local workspace with commit access. You should be a member of this project, and thus able to check it out using https.Make sure that the "verify" target passes."Improve" the project in some way. This does not have to be a major improvement. Perhaps there is a JavaDoc comment that could be worded in a slightly better way, for example. Make sure that the "verify" target still passes. Commit your change to the repository, and make sure you include an informative commit message explaining how you improved the Project.
      1. I managed to complete all of these steps simply using the subversive plugin for eclipse. I could successfully import the project from https://robocode-pmj-dacruzer.googlecode.com/svn/trunk without having to access the terminal.
      2. The Eclipse run of ant verify.build.xml gave an output of successful completion. Thus it can be expected that the Subversive checkout accomplished the task and got the required files.
      3. I added the comment "OVER 9000!" to the firing method of DaCruzer and ran the verify.build.xml one more time. After it proved successful, I synchronized with the repository, and after some quick merging, I committed the new revision.
  3. Task 3: Create a new system hosted at Google Projects.
      1. The assignment of getting our robocode robot java project hosted on Google Code didn't prove too problematic. However, I initially had trouble sharing my project on google hosting. I erroneously uploaded the project to the main directory instead of the trunk using Eclipse’s Subversion plugin. I’m still unsure as how to delete files in the main directory with this plugin, however, I was able to delete this extra file via the terminal by use of :
        1. svn delete https://robocode-ktt-bubonic.googlecode.com/svn/robocode-ktt-bubonic --username kurt.t.teichman@gmail.com --message Bad upload
      2. I then proceeded to check out the project using Eclipse's Subversive plugin again and ran the ant verify.build.xml through Eclipse. Everything went smoothly.
      3. I created a google discussion group for the project @ http://groups.google.com/group/robocode-ktt-bubonic-discuss
      4. I created the required UserGuide and DeveloperGuide wiki page using Googles markup language which was a pain. I used Professor Johnson's sample guides for the robocode-pmj-dacruzer for inspiration when creating these.
The majority of the assignment ran smoothly and I got to experiment and use the Eclipse Subversive plugin. I feel like the assignment was a great introduction to the usage of SVN and hosting projects on Google Code. I would highly recommend trying this out if you have any aspirations of creating projects that will be worked on by multiple people. If you wish to see the robocode-ktt-bubonic project, please goto:
https://code.google.com/p/robocode-ktt-bubonic/

Friday, October 8, 2010

19.RoboTesting

Testing Bubonic with JUnit was an interesting experience. After you figure out how JUnit works, using ant with the command line and through eclipse, and jump through all the configuration hoops, you can finally think about how you wish to test your robot.

I found that the acceptance tests were the easiest to create. Since my robot was able to beat Walls and SittingDuck 100% of the time, I did not have to extensively modify the sample test case, provided by Professor Johnson. These tests were valuable to insure that my robot had a baseline standard and was affective against both a trivial robot and a not so trivial robot.

The second easiest tests to create were the Bubonic simple movement behavioral tests. Since Bubonic’s strategy heavily relies on hugging a wall and scaling up and down, I thought these would be good tests to create. Thus, I had two cases that I wanted to test for: the robot seeking the left or right wall, and the robot moving to the top and bottom of the map (this case is dependent on another robot’s movement).  These were easy to test for in that it simply came down to a simple the position checks. The RobotSnapShots were enough to get the position of the robot at the end of a round. From these snapshots, I was able to use the getX() and getY() functions to find out whether my robot was indeed on a wall, and if it made it to the top or bottom of the map, respectively. These tests were valuable in that I wanted to make sure that the intended movement actually occurred and thus would be a good type of test to run. It should be noted that the vertical movement of Bubonic is dependent on an enemy robots movement so for that particular test case, the sample.Walls  robot was used to promote Bubonic’s movement. The Jacoco coverage for the horizontal movement test and the vertical movement test were 92% and 98%, respectively.

The hardest tests to create involved the testing for more specific behaviors. Since some of Bubonic’s behaviors are fairly complicated, the test cases became proportionally complicated to design. One test I wanted to check was whether my radar swept the top and bottom of the battlefield at least once after the robot reached the left or right wall and was moving vertically.  Since an enemy’s robot movement determines my robot’s vertical movement, I needed to load an enemy robot that moves unconditionally (not SittingDuck). Thus, I used test subject, Walls again, to generate the typical movement done by Bubonic. The test case only checked the radar heading after the robot has gotten into its specific position and is doing the intended movement. In retrospect, I could have spawned the robot on one of the sides of the map, but it would still initiate the same algorithm of movement. This was a valuable test in that proper scanning of the field insures that Bubonic knows where all the robots are.  Assuming that the radar alternates between 0 and 180 degrees, it wasn’t hard creating a boolean that would store whether the 0 or 180 case had been reached upon the end of a turn. The Jacoco coverage for the radar sweep test was 99%.
  public void onTurnEnded(TurnEndedEvent event) {
    IRobotSnapshot robot
= event.getTurnSnapshot().getRobots()[1];
    
double currentRadarHeading;
    
double xPos = robot.getX();
    
//Checks to see if the robot is on either the left or right wall
    
if (xPos < 40 || xPos > (width - 40)) {
      robotOnWall
= true;
    
}
 
    
if (robotOnWall) {
      currentRadarHeading
= Math.toDegrees(robot.getRadarHeading());
      
if (currentRadarHeading == 0) {
        radarHasSweptTop
= true;
      
}
      
else if (currentRadarHeading == 180) {
        radarHasSweptBottom
= true;
      
}
    }
  }
The hardest test involved checking if Bubonics intended behavior would be triggered by a stationary target. In theory, Bubonic should stop and fire at this target with the hardest bullet until the target starts moving again. So the test subject for this experiment was SittingDuck. The method I used involved the comparing of an initial radar heading with a previous radar heading to see if the radar has not moved. If the values are equal, it can be assumed that the radar has locked onto a target. Then it is a necessary check to see if Bubonic’s gunheat is increasing, which shows the Bubonic is indeed firing at the target. The Jacoco coverage for the stationary target behavior test case was 99%.
  public void onTurnEnded(TurnEndedEvent event) {
    IRobotSnapshot robot
= event.getTurnSnapshot().getRobots()[1];
 
    
double currentRadarHeading;
    
double xPos = robot.getX();
    
//Checks to see if the robot is on either the left or right wall
    
if (xPos < 40 || xPos > (width - 40)) {
      robotOnWall
= true;
    
}
 
    
if (robotOnWall) {
      currentRadarHeading
= Math.toDegrees(robot.getRadarHeading());
      
if (previousRadarHeading == currentRadarHeading) {
        radarIsNotMoving
= true;
        
checkGunHeat(robot.getGunHeat());
      
}
      previousRadarHeading
= currentRadarHeading
    
}
  }
The overall coverage for my test classes, as well as the Bubonic robot itself was pretty good. I had done some intensive testing on my robot vs. various other robots at high speed before the robocode competition to figure the weaknesses of my robot. Had I known how to successfully implement JUnit test cases, I think I could have further optimized my robot. I feel though, however, that my robot is fairly simple. Thus it was fairly easy to test. Had I created an advanced robot with really advanced features and behaviors, testing would not have been as straightforward. A link to my project file can be found here.