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.