Tuesday, March 27, 2012

Day Twenty Eight: Preparation for POSSCON

I will be attending POSSCON with the rest of my classmates on March 28 and 29. In preparation for this event, I have developed a schedule for the events that I will attend. This is necessary because some time slots have multiple presentations.

March 28
9:00 - 9:15        Welcome
9:15 - 9:50         Keynote: Open Source - Now and in the Future
10:00 - 10:45     Demo: Open Sourcing: From Within Your Company, For Your Company
11:00 - 11:45     Education: Working Laterally: Restructuring K-12 Education Based on Open...
12:00 - 1:00       Lunch
1:00 - 1:45         Keynote: Big Data, Hadoop and Open Source
2:00 - 2:45         Big Picture: Open Source: Licenses & Communities
3:00 - 3:45         Demo: How GitHub Uses GitHub to Build GitHub
4:00 - 4:45         Big Picture: Changing the Face of Open Identity in Ecommerce
4:45 - 5:00         Wrap Up 

March 29
9:00 - 9:15         Welcome
9:15 - 10:15       Keynote
10:30 - 11:15     Education: Some People Hate Fun: Protecting 3D Printing and Open Hardware...
11:30 - 12:15     Education: Open Source in Art
12:15 - 1:30       Lunch
1:30 - 2:15         Keynote: Let's Talk About Cloud - The State of the Industry, OpenStack and APIs
2:30 - 3:15         Big Picture: Starting a New Open Source Project: The Project Lifecycle and How...
3:30 - 4:15         *Tie between Education and Demo*
4:30 - 5:00        Big Picture: Predictions & Trends for Open Source in the Enterprise in 2012
5:00 - 5:15        Wrap Up

We are also supposed to pick three presenters to talk with during free time. Scott McNealy is an obvious choice, though he may be very busy. Dan French has an interesting position as Superintendent of Schools; it would be nice to get some insight as to how he sees public schools interacting with technology in the future. Jonathan LeBlanc also sounds like a very interesting individual. The social side of technology has always intrigued me. These are my three choices as of now, but this decision is subject to change based on presentations. If I see a presentation that particularly interests me, I might decide to spend some of my time in discussion with that speaker instead. 


Monday, March 26, 2012

Day Twenty Seven: More Work with RMH Homebase


Exercise 6.1:
This is a very simple exercise that involves adding setters and getters for employer, contact person, and contact phone variables in the Person class.
Note: This exercise does not mention implementing a "status" variable, but it is necessary for the next few exercises. I went ahead and included the variable in this exercise.

Initialize the variables:

private $employer;           // name of current employer
private $contact_person;    // name of a contact Person
private $contact_phone;    // phone of the contact Person
private $status;          // a Person may be "active" or "inactive"

Make the setters:

function set_employer ($name) {
    $this->employer = $name;
}
function set_contact_person ($name) {
    $this->contact_person = $name;
}
function set_contact_phone ($phone) {
    $this->contact_phone = $phone;
}
function set_status ($status) {
    $this->status = $status;
}

Make the getters:

function get_employer () {
    return $this->employer;
}
function get_contact_person () {
    return $this->contact_person;
}
function get_contact_phone () {
    return $this->contact_phone;
}
function get_status () {
    return $this->status;
}

Exercise 6.2:
This exercise involves updating Person's constructor to implement status, employer, contact, and contact phone. The unit test, testPerson.php, also needs to be updated.

Modify the constructor with the new variables:


/**
 * constructor for all persons
 */
function __construct ($f, $l, $a, $c, $s, $z, $p1, $p2, $e, $t,
    $bg, $in, $sh, $con, $whe, $exp, $mot, $spe,
    $av, $sch, $hist, $bd, $sd, $pubn, $myn, $privn, $pass
    $status, $employer, $contact, $contact_phone) {
        $this->status = $status;
        $this->employer = $employer;
        $this->contact_person = $person;
        $this->contact_phone = $contact_phone;
        ...
}


Include the variables in the unit test:



//I need to make an object to test. This is just dummy data.
 $myPerson = new Person("Taylor","Talmage","928 SU","Brunswick","ME",04011,
 2074415902,2072654046,"ttalmage@bowdoin.edu","applicant,volunteer,sub","no","no","no","", "", "", "", "", "Mon9-12, Tue9-12, Wed12-3", "", "", "02-19-89", "03-14-08","this is one of my notes","this is a cool note","this is another note","Taylor2074415902", "active", "McDonalds", "Ronald McDonald", 8034563452);



Test getters and setters:


$this->assertTrue($myPerson->get_employer() == "McDonalds");
$myPerson->set_employer("Burger King");
$this->assertTrue($myPerson->get_employer() == "Burger King");


$this->assertTrue($myPerson->get_contact_person() == "Ronald McDonald");
$myPerson ->set_contact_person("The King");
$this->assertTrue($myPerson->get_contact_person() == "The King");

$this->assertTrue($myPerson->get_contact_phone() == 8034563452);
$myPerson->set_contact_phone(8035467654);
$this->assertTrue($myPerson->get_contact_phone() ==  8035467654); 


$this->assertTrue($myPerson->get_status() == "active");
$myPerson->set_status("inactive");
$this->assertTrue($myPerson->get_status() == "inactive");



Exercise 6.3:
This exercise asks how set_status could be implemented in order to error check the values provided to the method. Since a valid value for status can only be "active" or "inactive", it would be easy to set up a Boolean expression for error checking.

function set_status ($value) {
    if ($value == "inactive" or $value == "active") {
        $this->status = $value;
    }
    else {
        echo (""active" or "inactive" are the only valid inputs for status");
    }
}

Exercise 6.4:
This exercise involves removing mutators that are not called in any part of the code. As is stated in the book, none of the setters for the Person class are ever called because a new Person object is created every time information is changed; however, the book suggests that we leave these methods intact for reasons that will be discussed in future chapters. All of the getter methods are called at some point in the code base.

Monday, March 19, 2012

Day Twenty Two - Twenty Six: Condensed Update

The focus this week has been on our FOSS project rather than individual assignments. There is not much to say here that is not on my group's wiki page. I can briefly mention the work that I have done individually, but four separate blog posts would just be a waste of everyone's time. This post is a condensed version of what I have been working on over the past week.

Release Candidate 2 (RC2) was released on March 2 and further refines features that were added in RC1. All of the recent changes can be tracked here on XBMC's github page. RC2 quickly fixed a few major bugs, such as video lag, that were present in RC1. It is clear that the developers rapidly respond to problems that are readily defined in the bug tracker and on the forums. RC1 and RC2 were released only a week apart. The first order of business during our first group meeting after spring break was to catch up and compile the latest release from source. A weekly release schedule can eat up a lot of our time: it takes over an hour to compile on my poor little netbook. Speaking of my netbook, Ubuntu 12.04 is running nicely, and all of my previous problems appear to be fixed with this latest update. The newest kernel includes a fix for the back light problems that most netbook users are having.

It is crazy to think about how much XBMC has changed since we first started working on this project. When I first mentioned XBMC to my group earlier this semester, I was using Dharma on my desktop. Now, we are three beta releases and two release candidates into Eden. The pace is pretty hectic, and any contributions in this project are welcome to take some of the stress off of the developers. Matt and I replied to the Xbox 360 controller bug report, and offered to help fix the problem now that it has been discovered by the developers. CrystalP asked for us to test the changes and submitted a pull request (PR) on github. Git has a high learning curve. My experience with SVN last semester was pretty straight forward, but Matt and I had some trouble figuring out how to actually implement a PR in Git. There are a couple of Stackoverflow questions and various blogs that suggest possible solutions, but there are so many conflicting answers. Cherry-pick seems to be the best command to pull in a patch from a single commit. The process is very convoluted, and, unfortunately for our group's contribution (fortunately for the entire XBMC community), CrystalP went ahead and implemented the PR. At least we contributed to the conversation and gave the bug the push it needed to be fixed for Eden.

Jason's bug was also fixed by a developer while he was looking though the code for possible solutions. I let David borrow my netbook to test more LIRC bug reports, but these reports seem to be very hardware specific. He has not had much luck replicating bugs that deal with LIRC. It is difficult to keep up with such a fast-paced community with everything else that is going on this semester. We have decided to continue working on any bugs that come our way, but we need to refocus some of our effort to areas where we can contribute more. In our next meeting, we will come up with a schedule for our poster and find a couple of important pages on XBMC's wiki that need to be updated. Much of their wiki was designed for Dharma, and they desperately need some updates in order to be ready for Eden's release. From now on, I will focus my blog posts that are not dedicated to individual assignments on possible bug fixes to discuss with my group or specific pages on the wiki that needs to be updated. I hope this condensed post is more informative then three or four scattered posts.