Sunday, May 1, 2011

Preparing for the presentation

Our team has divided our roles for the presentation.  Carly will do the intro, Shannon and I will talk about the 5 bugs, and Stephanie will do the closing.  Our powerpoint presentation is finished.  The toughest thing ahead of me will be discussing bug #5.  I am looking over it now and figuring out how I will explain it.  This presentation will be the last thing I have to do before I receive my BS in computer science degree!  I'm looking forward to the feeling of being finished with school (for the time being).

Wednesday, April 20, 2011

Bug #5 and powerpoint rough draft preparation

We fixed bug #5 by adding an indication of the day at the very top, and by ensuring the log shows the applicable day.  Until our fix, the log would show the previous day's log information as the log for the current day.  Initially, our fix would start off by showing a Day 0 log when the game starts, but we've since replaced the Day 0 log with the instruction "Start the day by visiting the store."

We've divided responsibilities for our final presentation; I am to present the first few bug fixes.  I am working on adding a few slides to our powerpoint.  They will be text only for now, but I plan on possibly adding screenshots to make my slides more presentable.

This is the last post before I am required to submit my entire collection of blogs from this semester as a pdf file.   It is hard to believe that the end of the semester is just 2 weeks away and I will finally receive my bachelor's degree in computer science.  This semester has flown by faster than any other semester.  Working 35 hours/week at my internship, taking this class, and daydreaming about life after college has kept me busy.  The next few weeks are very important as I am putting final efforts into The A-Team's project and preparing for interviews.

Working on open source projects over the last 2 semesters has been exciting and a great learning experience.  I've become alot better at looking at code created by others and figuring out what is going on, which is a skill I think could be the most important skill to have out in the workforce.  After I graduate, I will continue to look into interesting open source projects to work on my skills and contribute to something useful.

Wednesday, April 13, 2011

Bug #4 fixed, onto bug #5

We figured out why the game doesn't necessarily enforce a "fewest coins" policy;  this is because it allows the smallest required unit in a fewest coins solution to be further broken up.

To illustrate this, we can look at $4.35.

The smallest coins solution in largest to smallest order would be:
4 dollars, 1 quarter, and 1 dime.

In this case, the 1 dime would be allowed to be broken up into any of its possible combinations such as 2 nickels, 1 nickel and 5 pennies, or 10 pennies.

We decided to allow this functionality, and so bug #4 is fixed.

Fixing Bug #5 may be as easy as moving the one-line day increment to different areas until we find the place that works for us. 

Tuesday, April 12, 2011

Bug #4 continued

There are some slight problems with our recent fix to bug #4. In most instances, the correct output is shown when entering amounts in 3 situations: correct amount with the fewest coins possible, correct amount but not the fewest coins possible, and incorrect amount. We will be working to figure out how to make it 100%.

Friday, April 8, 2011

Bug #3 and Bug #4

After Shannon changed the code so that it would not advance the day until a valid purchase was made, we were mostly finished with bug #3. However, the change did cause another bug; every time you enter a "too large" purchase, there is a chance of a random event still happening. You could possibly exploit the game by causing random events that benefit you without advancing the day or decaying items. I was able to fix this by not letting the user leave the store until a valid order is made.
In class, we were able to further enhance this fix by adding a message that states "You attempted to order more items than you can afford. Try again."

Bug #4 is a bit trickier; we spent time in class looking at the code and trying to figure out where and how we can change things. We believe we have it narrowed down to a specific function. I plan on looking at the code this weekend.

Monday, April 4, 2011

Bug #3 is fixed

I believe bug #3 is now fixed after making it so that orders that are too large are not allowed. The game never leaves the store screen and zeroes the order quantities if the cost of the order is larger than the available amount of money. You can however still hit enter without buying anything. We should leave it that way because it would be possible to get stuck on that screen if we didn't have enough money to purchase anything and it forced a purchase before moving on.

Thursday, March 31, 2011

Moving along

The A-Team is slightly behind, but it shouldn't be difficult to catch up. We still need to figure out how to add the Help and Quit commands to the bottom of the UI.

Tuesday, March 29, 2011

POSSCON

The POSSCON event was interesting. I was using my phone to connect to WiFi and then a speaker talked about not trusting public WiFi so I disconnected.

I was surprised to hear from John Diamond that currently only 5 developers work on the Alien Arena game. The game looks very polished and comparable to some commercial games. He explained how he makes money with the game; they package other companies' programs with the game, and also offer to include in-game billboards. He showed the evolution of the appearance of the alien character over the years. I learned that the emergence of Direct X and OpenGL was largely responsible for the advancement of gaming technology. I enjoyed the John Diamond session, but I probably would have enjoyed the Friday workshop more. I would have liked to dig into the code and have a hands on experience.

UPDATE:
After hearing from the people that went Friday, I'm glad that I didn't go to the workshop. Supposedly the workshops were not going as planned due to technical difficulties.

I thought that Walter Bender was a great speaker. He showed us an image of a board of shapes that could be hanging on a wall. He mentioned that kids try to reproduce the shapes on their own paper; I was surprised to see a swastika on it! I wouldn't want kids to be going around drawing swastikas. I was also surprised to see him suddenly and purposefully drop a sugar laptop. After he was finished speaking, all the sugar groups rushed him. He showed us an activity that he made during his flight; I thought it was amazing he could put something together so quickly. I hope I get to be that proficient someday. He also showed us different sensors to plug into the sugar laptop. One of them sensed temperature and another sensed moisture if I remember correctly. He was being rushed to leave the room due to it being time for the next speaker; it was nice of him to stick around and chat with us.

One speaker was from Digium. The Hawkes Learning Systems interns quickly realized that this is the company that creates the Switchvox phone system software we use at work. I had no idea that it was based on an open source framework; the framework is called Asterisk. He showed us the scripting language for the phone system which was unlike any other language I've seen before.

The 3-d printer was amazing to see up close; it was "printing" android phone holders.

I will be on the lookout for other events like this one and will try to attend one here and there.

Tuesday, March 22, 2011

Added help text toggle

I added the help information toggle in the Lemonade Stand game; so now you can hit the 'h' key to
turn the help text at the top on and off.

To make this change (within LemonadeGUI.py):

I added self.need_help == True

Line 31 added "K_h"

Line 168 changed "if main.day == 1:" to "if self.need_help == True"

I added this in LemonadeGui.py (lines 288-292):

elif event.key == K_h:
if self.need_help == True:
self.need_help = False
else:
self.need_help = True

I'm working on adding a bar on the bottom to show "Esc to quit" and
"Press h for Help"


Making this change helped me figure out how the "mysterious fix" occurred.
The mysterious fix was a side effect of fixing bug #2. Remember how the
journal always started on day 2? Well, the help text was originally set
up to only show during day 1. Because it was never actually day 1, the
text never showed.

the code in LemonadeGUI.py originally had:
if main.day == 1: (draw the help text)

Thursday, March 17, 2011

Established the timeline

The A-Team has established the Project Timeline for the rest of the semester. Tuesday we corrected the "starts on day 2" bug. I think we could possibly end up being ahead of schedule and we'll probably be able to do extra.

We got great feedback from Nathaniel who is the owner of Lemonade Stand. He let us know that he is behind us and that he trusts our best judgment.

After looking at the speakers for Thursday's POSSCON, I am interested to listen to David Duggins, John Diamond, and Chris Hinkley; David Duggins will talk about using open source for startups to save time and money, John Diamond will discuss open source gaming, and Chris Hinkley will discuss internet security.

Thursday, March 10, 2011

Lemonade Stand

I think I'm fairly familiar with the code for the Lemonade Stand after spending time reading through the code. I feel confident that the A-Team will be able to find things to change and improve.

The whole Lemonade Stand package has plenty of files, but I believe there are only 3 files we'll end up working with; those are: constants.py, LemonadeMain.py, and LemonadeGui.py.

LemonadeMain.py seems to be the logic behind the game. Variables are stored here in integer format.

constants.py seems to mostly give names to the variables stored in LemonadeMain.py by providing arrays for the integer variables to index into.

LemonadeGui.py does the indexing. It uses variables from LemonadeMain.py to index into arrays stored in constants.py to determine what features to display.

This may be an overgeneralization, but I think it gives me a good grasp of what is going on.

Thursday, March 3, 2011

Timeline?

The A-Team likes an activity called Lemonade Stand. The activity is a game in which you manage a lemonade stand and all the randomness and financial issues that you'd encounter. Associated with the activity is a wish list of desired features that are not yet implemented; we feel that we can tackle some of these and contribute to the game. My favorite idea so far is a random event in which a bully forces you to give him all your money. To prevent the bully from coming around, you can hire security.

Thursday, February 24, 2011

Chapter 7

7.2.2:

Without -u (diff factorial-number factorial > factorial-nfix-ticket2604.patch)

6,7c6,7
< if n > 0:
< result = n * factorial_recursive(number-1) --- > if number > 0:
> result = number * factorial_recursive(number-1)

With -u (diff -u factorial-number factorial > factorial-nfix-ticket2604.patch)

--- factorial-number 2011-02-03 05:53:13.000000000 -0500
+++ factorial 2011-02-17 14:29:58.590786002 -0500
@@ -3,8 +3,8 @@
# define a factorial function in recursive flavor
def factorial_recursive(number):
result = 1
- if n > 0:
- result = n * factorial_recursive(number-1)
+ if number > 0:
+ result = number * factorial_recursive(number-1)
print "factorizing: ", number, " result: ", result
return result

Without -u, the output is only the changed lines. Diff run with the -u tag shows names of the two files that were compared, the time and date of the two files' creations, as well as the the code of the entire function that was changed. I am not sure what the numbers mean directly above the code in each example.


7.8:

Created a 'bar' file with these contents:
Contents of the "bar" file: blah blah blah

Command:
diff -u /dev/null bar > foo

Results (in 'foo' file):
--- /dev/null 2011-02-24 11:26:51.181903002 -0500
+++ bar 2011-02-24 12:04:15.292286001 -0500
@@ -0,0 +1 @@
+Contents of the "bar" file: blah blah blah

I'm not entirely sure if I understood the instructions correctly, but from what I can tell I did the exercise correctly.


7.9:

I tried running the first command (curl -O http://ftp.gnu.org/gnu/coreutils/coreutils-8.4.tar.gz) but I didn't have the 'curl' program installed. After running 'sudo apt-get curl', I ran the command again. The rest of the steps were as easy as copying and pasting the commands into terminal, with the exception of editing the 'echo.c' file and the 2nd to last step which reads: "$ ./configure$ make." The 'make' step should be on a new line.

The last step made me laugh; either it is written wrong or it was an intentional joke. The command list being reversed is the same backwards and forwards, so even if the echo command is now reversing the order, you can't tell. I instead ran 'src/echo is this reversed' and this gave the output 'reversed this is' proving that it is reversing the order of words.

Tuesday, February 22, 2011

The Patch

After reading chapter 7, our group was less perplexed about how to submit the fix to the bug ticket we submitted. The .patch file creation was outlined very nicely in the text. We created our patch file by using the same command, only changing the names of the involved files.

Our completed Patch Report is now on the A-Team's wiki page.

This was an interesting learning experience. The fix for the bug was so small and trivial, yet the process for submitting this fix was fairly complicated. The turnaround for our small patch was very fast; I can imagine large submissions taking much longer due to reviews needed and testing required.

As a side note, I now have my Motorola Atrix a.k.a. "The World's Most Powerful Smartphone." I've already rooted the device and enabled sideloading, but it seems as though the bootloader is signed; this means that as of right now users cannot load custom ROMs to really customize things. This is the first smartphone I've owned since the PDA phone I had about 7 years ago. I'm enjoying the capabilities of the phone and the MotoBlur interface will have to suffice for now.

Thursday, February 17, 2011

Submitted the bug/Alumni Symposium

We submitted the bug and it is now a ticket that can be found via this link:
http://bugs.sugarlabs.org/ticket/2604
Someone outside of our group changed the status of our ticket as follows:

Changed 5 days ago by RafaelOrtiz ¶

* priority changed from Immediate to High
* milestone changed from Unspecified by Release Team to not applicable

The ticket is not on the main bug tracker page but is in the list of tickets. I've thought about submitting a comment to the ticket, but I will wait until our group meets today.

The Alumni Symposium was a great event. The main thing I took away from the experience is that I need to pursue computer science interests outside of class. I have had the urge to play with making Android apps for a little while but I haven't gotten around to it. Perhaps when my new Motorola Atrix arrives next week I'll be more motivated. I'll have to root the device though because AT&T doesn't allow sideloading apps.

Thursday, February 10, 2011

Found a bug!

Our group spent some time on Tuesday trying to get the Browse activity to work. The problem with Browse is that a Hulahop dependency will not install. We gave up on that for the time being and discussed bugs. We were not feeling very encouraged until Stephanie pointed out a problem with an example math program that comes with the Pippy activity. The bug is a simple naming mistake which is easily fixed. After investigation, we found that the bug was undiscovered up to that point, and so our group will have the opportunity to submit a new bug to the bug tracker and provide a fix.

Tuesday, February 8, 2011

Chapter 6

I saw this bug in the Sugarlabs bug tracker that is 2 years old:
http://bugs.sugarlabs.org/ticket/405

The problem described here is that there is not sufficient visual indication that the Keep button is pressed which causes the user to try pressing it multiple times. A documented suggestion for fixing the bug is the addition of a brief hourglass. This bug has changed in status from 'bug' to 'enhancement' and was supposed to be fixed in the 0.86 release. It still hasn't been fixed; this could be the case because developers don't see the enhancement as necessary.

I signed up on the bug tracker so I am now able to comment on the bugs. Whenever someone provides a comment, it is not instantly visible on the bug tracker; instead, the comment is forwarded to someone for review and acceptance. I reproduced a bug, confirmed that the bug shows itself and commented on it on the bug tracker. It did get approved to show and I did get a response.
This is the bug: http://bugs.sugarlabs.org/ticket/1997
There is a patch that someone wrote for it, but the Read maintainer hasn't added it to the repository. The patch needs reviewing; perhaps this is something my team can help with?

As for the other bugs, I haven't been able to find any more yet that I feel I can triage. I tried to reproduce this bug as well but was unable to: http://bugs.sugarlabs.org/ticket/2569
I downloaded the xvkbd virtual keyboard and used it in sugar, but it didn't remain open when I clicked on the 'x.'

Thursday, February 3, 2011

Freeciv

I had a rough time with the Freeciv assignment; it ended up breaking my dual boot Ubuntu installation. Here is the story:

I began to follow the instructions in the INSTALL file as directed by Chapter 5. I had already checked out the source with svn, and was installing dependencies. I got to the "Prerequisites for the Gtk+ 2.0 client." I checked for 'pkg-config' in the Synaptic Package Manager and noticed it was already installed. Moving on to the Glib library, I found that I didn't have it installed. I downloaded Glib from the ftp link and installed it. Then I checked for Atk, found I didn't have it installed, and downloaded it from an ftp link as well. When I tried to install Atk, it complained that it asked something for the version of Glib and that it returned version 2.6.6, but it when it actually checked the files, it found version 2.26. After this message, it said I should try ldconfig. I tried running that, it complained about permissions, so then I ran sudo ldconfig. It seemed to work, but then I noticed that anything I tried to open in the GUI would not open. I clicked to restart Ubuntu, but nothing happened. So, I powered off the computer and turned it back on. Ubuntu would not boot; it got stuck on the loading screen.

I had to reinstall Ubuntu. Consequentially, I had to reinstall updates and rebuild the Sugar project. I decided I wouldn't take any more chances with my dual boot setup of Ubuntu, and booted up Ubuntu in my Windows virtual box. I decided to skip the dependencies steps. I initially tried ./configure, but that didn't work. I noticed there was no configure file. After doing some reading in the Install file, I found that I had to run ./autogen.sh. Then I ran make, and then sudo make install. The program was installed with no problems, and it runs smoothly.

I think the moral of the story here is to not always follow instructions.

Tuesday, February 1, 2011

Building

Our group has officially switched projects from RapidSMS to Sugarlabs. I've had quite a bit of trouble building and installing, and still haven't gotten anything to actually run.

Carly sent the group this link which was very helpful:
http://wiki.sugarlabs.org/go/Development_Team/Jhbuild

First, I tried building on the Ubuntu version 10 that I already had installed on my computer. I was confident through the beginning steps. I liked that they had a script for checking required dependencies before the build process. I ran "depscheck" and copied and pasted the names of the missing dependencies into the Synaptic Package Manager to mark them for install before hitting 'apply' to install them. Then I ran the check again to make sure I didn't miss anything. Then, I started the build phase. I received error after error. Upon receiving an error, the build process would stop and show a prompt that looks like this:

*** Error during phase build of python-xklavier: ########## Error running make *** [5/31]

[1] Rerun phase build
[2] Ignore error and continue to install
[3] Give up on module
[4] Start shell
[5] Reload configuration
[6] Go to phase "wipe directory and start over"
[7] Go to phase "configure"
[8] Go to phase "clean"
[9] Go to phase "distclean"
choice:

I tried hitting option 1 to retry the errors, but the result was the same. Above the prompts for the errors it would say that it wanted later versions of dependencies, but the Synaptic Package Manager didn't have those versions. After hitting option 2 multiple times for different modules, I finally reached the end.
It showed a lengthy list of modules that weren't built that looked like this:

*** the following modules were not built *** [31/31]
telepathy-gabble sugar-presence-service sugar-toolkit sugar meta-glucose read terminal log pippy imageviewer turtleart jukebox meta-fructose meta-sugar

Digger deeper into the documentation, I saw that they only support Ubuntu 9.10. I also saw a single command to download all the dependencies; I was mad I didn't see this earlier since I had gone through the trouble of copying and pasting each individual dependency into the package manager earlier. I wanted to keep my later version of Ubuntu installed, so I decided to install Virtual Box in my Windows Vista environment and install Ubuntu 9.10. I tried the dependency command, but it didn't work; I still ended up using the copy/paste method. I went through the build process on this environment and experienced fewer errors, and did not get a list of modules that weren't installed at the end. Hopeful, I tried to run sugar, but it would not run.

There is still more to figure out, but I'm glad I've gotten some of the growing pains out of the way. Two of my group members have had success actually running sugar, so I will talk to them today in class to see if they did anything differently. Perhaps I will have to get rid of my Ubuntu 10 after all.

Thursday, January 27, 2011

Subversion

So I've found out that clicking on the URL for the repository and logging on through our web browser allows us to browse the contents of the repository, but we cannot add to it or make changes.

I've since installed rapidsvn using the following command in my Ubuntu terminal:
sudo apt-get install rapidsvn

I like the gui rapidsvn provides. It is easy to navigate and I am able to use many of the same idioms I learned over time from windows explorer. For instance, I was able to right click inside of a directory to access 'Make directory' which is exactly like 'New Folder' in most operating systems. I was also able to drag a file directly from my Ubuntu file explorer into the RapidSVN window which caused a file 'import.' I will note though that the performance is considerably slower than I expected it to be; FTP clients such as Filezilla seem to work faster. I guess the whole version control idea requires plenty to be executed behind the scenes. I'll continue to play with rapidsvn and reference the readings until it's time to leave for class.

Wednesday, January 26, 2011

Investigation

Our group has put in time individually over the weekend and some time together early Monday morning to put together information to report to the class. I think my best contribution to the group so far has been finding spreadsheets that some important RapidSMS players posted within their Google group discussions.

CLA Individual Signers

CLA Corporate Signers

RapidSMS projects


The first two links basically tell us who the big players in the project are and how to get in touch with them. Additionally, the 3rd link describes projects utilizing the RapidSMS framework, and who to get in touch with for each project. Carly has since emailed Cory Zue and he gave us some words of encouragement; he said that he would be happy to brainstorm about how we can contribute. I plan on sending more emails to each of the project managers to help us get a feel of which project might be a good fit for us. We have plenty of options, since we can work with either the RapidSMS framework or one of the many projects that use RapidSMS as a framework. I will blog later about my experiences with subversion and about Chapter 4.

As a side note, being sick is not fun. I have been hit hard by something that is going around. Hopefully these antibiotics I have been taking will have me able to work at a full capacity again just in time to do some programming.

Thursday, January 20, 2011

Narrowed it down to one

So now our group has officially chosen RapidSMS as our project. I've joined the google group and have access to their IRC chat. It looks as though the software is best run on a Linux operating system; I'm glad I still have Ubuntu installed on my laptop. I plan on downloading the source code and seeing what it takes to have a RapidSMS app up and running.

My initial reaction to The Cathedral and the Bazaar is that it is actually bizarre. It's not a site meant to be read straight through, but one to be perused. It seems to be a hodge podge of things that influenced the author.

Thursday, January 13, 2011

Picked our 3 projects

The class was moved into 220 which was a nice change since it has all the computers available for us to use. Our group picked our 3 projects which were: RapidSMS, OOo4Kids, and ifPeople; I think I would be happy with any of the three. I plan on checking out what the source code looks like for all three in addition to digging deeper into the documentation. It's nice that we have our wiki basically set and ready to make minor changes if needed.

Tuesday, January 11, 2011

First Day

The first day of CSCI 462 was familiar. We were divided into the groups that we will work with for the rest of the semester. My group consists of Carly, Shannon, Stephanie and myself. We've decided that "The A-Team" will be our team name. I've already started looking for the theme music. I successfully registered for the POSSCON event as well. Our team is in the process of figuring out the times we can meet. I think I may go ahead and look at some of the project choices while I have some time to kill.