Wednesday, April 27, 2011

PS: Ubuntu Desktop Recorder

Hey everybody, as I was working on my portion of the ATeam's presentation I came across this fun tool and thought I would share it with you.  Ubuntu has several programs that will allow you to record a video of your desktop, or simply a portion of your desktop.  The one I used will even allow you to narrate.  Our team found this useful for preparing a demonstration of our program to show you, our classmates, while helping us be efficient with our time.  No awkward shifting between workspaces and having the display get mixed up for us!  If you'd like to check this out, you have two options:  

  1. Find the software and figure it out for yourself
  2. Visit the howtogeek and follow their instructions

This really is a fun little program to play with. I just wish I'd found it before finals week of my last semester! It would have been great for presentations along the way! Best of luck everyone!

Thursday, April 21, 2011

Why, Ubuntu? Why?

For the second semester in a row, during the last week of classes my Ubuntu system has encountered boot problems.  I don't know if it has a self-destruct program that is triggered by the user's need level or what, but it's kind of annoying.  On the bright side (trying to make lemonade from my lemons, here...) I did get to learn about using Netbeans subversion tools and about the Windows command terminal.

Since I had created the patches for our code on the Ubuntu system, but had not yet uploaded them to our subversion repository, I had to do it all over again.  However, I did not want to take the time to re-configure my Ubuntu drive, so I decided that it was time to tackle this problem from Windows!  Another team member, Shannon Fox, had started using Netbeans on his machine to access our repository, so I decided to do the same.  That seemed to work pretty well, but I couldn't figure out Netbeans's diff function.  It was time to brave the command terminal.

So I told my computer to run cmd and a terminal opened.  I'd done that before, so no huge victory there, but I wasn't sure if the subversion commands were the same.  I decided to type 'svn help' and see what happened.  Just like in Ubuntu, I got a listing of the different commands I could use and thankfully they were the same.  I proceeded to recreate my patches and add them to our repository using the windows terminal and voila - lemonade! :)

I think my only real disappointment in this venture was that I was unable to run the LemonadeStand game from windows.  It would give me an error because it could not find pygame, which was a dependency that I think comes installed (or easily installed) in Ubuntu.  I'm sure I can find the solution for Windows, but I haven't yet.  I would love it if I could because then I could share this game with my sister, a 4th grade teacher, and her class might be able to have fun with it!  I suppose that can be my first personal project of the post-graduation summer!

Also, as irritating as it was to recreate the patches, I'm very thankful for the realization that I am quite comfortable opening the command-line terminal and working from there.  It may seem silly, but I was always so impressed with my dad when he would use the terminal to do something or fix it.  It's almost like an affirmation that I am indeed equipped with the resources to succeed as a computer scientist.  I certainly don't know everything, but I do know my tools to find out more and so it is time to say once again, "Hello, World!"

Tuesday, April 19, 2011

Number Five is NOT alive!

Anybody ever see Short Circuit?  I used to love that movie and whenever I think the phrase "number five" and think of that little guy saying "Number Five is alive!"  Only in this case I'm referring to a bug that has been successfully squashed! No more Bug #5!

Bug #5 was more of a confusion to the user than anything else.  According to the wiki, each day of the game consisted of:
  1. Going to the store in the morning
  2. Selling lemonade
  3. Closing shop for the night and entering the day's activities and profits into the log
The program did all these things, but it updated the log's day after going to the store.  So, for example, at the beginning of the game, it would begin the log with Day 1.  Then the user would visit the store, buy supplies, and all of a sudden the log says it is Day 2 and records the user's purchases and profits under the Day 2 heading.  Confusing? I think so, and so did the rest of the team.

We found the place in the code where it processes the day's logic and the night logic.  At first I thought that moving the day incrementer to the night logic instead of the day logic would fix the problem, but it didn't.  After a bit of confusion we realized that the problem was that the daily log displayed yesterday's activities under the current day - and that did not make sense.  So we played a little bit more and figured out that the problem was not in the logic at all, but in the displaying of information.  We turned away from the Main file and investigated the GUI file and sure enough we found the code where it added new values to the log.  At this point we simply changed the day value to day - 1, so that the log displays yesterday's entry.  We also modified it so that on the first day the log shows a welcome message instead of "Day 0."

I was really excited about this success because this was the first bug that I beat my teammates to the solution!  For the last several bugs by the time my to-do list reaches LemonadeStand, I've received emails from my team saying that they found, fixed, and committed the bug.  I've been so thankful for a team that I can rely and trust to share the work, so please don't think I'm complaining about it.  I've simply felt like I wasn't keeping up with my contributions.  Anyway, this was a big victory for me because I was able to find and commit the solution.

And so we had success - except for one little thing.  Now the game play seemed confusing because there was nowhere to indicate what the current day was.  As we looked at the activity wiki we realized that their picture showed the current day with the day's weather, but that feature seemed to have been removed since the picture was posted.  We decided that it was worthwhile to add it back in and so appended a message to that block.

And now we are done!  We have completed the bugs! Of course, we also just realized that we've only been committing our code t our subversion server and not to the project...oops!  Our solution is to create several patch files based on our bugs and submit each of them.  Guess that is our work for this week!

4 Down, 1 To Go!

NOTE: This blog is to catch you up on last week's events.

Just a quick summary on what happened with Lemonade Stand Bug #4.  This bug was the check to calculate the user's profit and entering that value using the fewest coins possible.  What we discovered after we thought we had fixed it, was that it actually does not require the absolute fewest coins possible.  We then thought that this was a bug in the original creator's logic, but upon further investigation and testing, we realized that the game was actually working to simulate real life.

Here's how it works: Each amount of money can be created using the absolute fewest amount of coins.  For example, say you've earned $3.05.  Using the fewest denominations, that is 3 dollars and 1 nickel.  What the game then allows is for one unit of the smallest denomination to be exchanged for even smaller denominations.  So that nickel can be correctly entered as 5 pennies.  Using a different amount, if you earned $4.20, that should be 4 dollars and 2 dimes.  However, one of those dimes can be exchanged for 2 nickels.  Then, one of those nickels can be exchanged for 5 pennies.  We decided that it was actually very good that the simulated real life this way, so we left it as is.  The only problem was the confusion based on the instructions, so our decision was to edit the LemonadeStand wiki page to include this information.

Then we moved on to Bug #5...we're getting close!

Tuesday, April 12, 2011

Tricky Tricky Bug

So, it turns out that Bug#4 is a bit trickier than we thought.  Bug #4 is a problem with how the Lemonade Stand game requires the user to enter their profit.  The game wants the user to enter the amount using the fewest coins possible and originally reported an incorrect amount if this condition was not met.  Our team thought this was confusing so we wanted to create multiple error messages - one if an incorrect amount was entered and another if the correct amount was entered, but not using the fewest coins possible.  Shannon and Francis were able to find the section of code where this needed to be fixed and even fixed it.  This was no easy task, but with some perseverance it was done and it was done by our self-imposed deadline.  However, that is where things got tricky...

Following the best practices taught here at CofC, Shannon began thoroughly testing his solution and discovered that while the code he wrote was good, the original code confirming that the correct amount was entered with the fewest coins possible was wrong!  It only requires the three largest denominations (dollar, quarter, dime) to be 'correct.'  Beyond that, the user may enter any valid combination of nickels and pennies to complete the amount.

As I've been considering that problem, it occurs to me that maybe this is not an error, but was actually done intentionally.  This more closely models real life as a cashier may run out of certain denominations of dollars and coins.  It makes some sense that the game would require the larger denominations to be correct in order to prevent the user from simply entering the amount in pennies or dimes or quarters.  I hope this afternoon in class to discuss this with the team and if we decide to enforce absolute fewest coins possible, then hopefully we can figure out the necessary change.

Thursday, April 7, 2011

An Encouraging Honor

Greetings from a new member of UPE! This week I was initiated into the Upsilon Pi Epsilon Honor Society for the Computing and Information Sciences.  It was such an honor to be accepted into this organization.  I first heard about UPE last year and was interested in joining, but had not yet completed enough units in my computer science curriculum at College of Charleston to be considered.  When my teachers told me this semester that I qualified I was so excited!

My husband was so proud of me, too. He has been so supportive through these last two years while I completed this program.  He is also a member of Tau Beta Pi, the Engineering Honor Society, so he recognizes what an accomplishment it is.

The ceremony on Tuesday was kind of fun.  It was very brief, simple, and full of tradition.  I was very honored to be congratulated and welcomed by so many of my professors, as well.  It is so encouraging to know that they believe in my skills as a computer scientist, especially as I begin to feel so overwhelmed with the end of the semester.  I want so badly to finish strong, but sometimes I am so tired - I know I can't push myself as hard as I have in the past and my brain definitely is not working as smoothly as it did even a few weeks ago.  I guess I'll just keep doing the best I can and take what comes. 

Tuesday, April 5, 2011

Connectivity...Yay Apple!

While the A-Team has continued to make progress on our Lemonade Stand project, there are many other places you an read about what we've done (Start by checking out the team wiki!). Since I had a slightly unusual technology experience this weekend, I'd like to share that with you instead.

On Sunday afternoon my husband came downtown with me to do homework.  He brought his Macbook Pro and planned on connecting to the wireless service.  Unfortunately, I had forgotten that you have to go through a lovely formal network setup process here at CofC - you cannot simply log in to the wireless.  Of course, the directions to set up the network are online, so they are easily accessible, if you are connected to the internet.  The poor guy struggled to connect for quite a while because he didn't want to interrupt my meeting.  We finally got him connected (although one set of the online instructions for Macs was incorrect) and he was able to continue doing his work.

The real fun started when we got home - he could still see our home network, but was unable to connect! We quickly deduced that it was not a network problem, since my computer connected, my phone connected, and our Wii connected just fine.  As the new resident computer expert in our home (yeah right!) I took on the challenge of fixing it.  I started looking at all the different settings and discovered that the AirPort Express hosting our network had a different ID than the AirPort detected as containing our network! Then I noticed the little red dot next to airport symbol and realized that it should be green!  Conclusion: somehow the computer was not recognizing our AirPort - it was still recognizing the school's AirPort.

So how was I supposed to make it find our AirPort? I began searching for help and found a lot of discussions that seemed promising at first, but turned out to be very different issues.  Also, there was a lot of support for AirPort Extreme issues, a different Apple product, but not much for the AirPort Express.  I finally found a diagnostic tool in the network settings and as that tool began to run, the problem fixed itself.

Since I still don't know how it was fixed, I can only claim a partial victory, but it is my first victory on a Mac, so I'm quite pleased! I love that I at least know what to look for in order to solve technology problems!