Sunday, October 18, 2009

Midterm pre-test

These are questions to practice on for the upcoming midterm. Good luck!

1. What is the philosophical issue that GNU group is based on?
The appropriate way to promote software is to free it from commercial interests.

2. What is the stance of the BSD group?
Users should have easy access to the source of programs.

3. Which approach of development would the Emacs editor fall under according to Eric Raymond's paper, "The Cathedral and the Bazaar"?
Richard Stallman scrutinized every line of code which was added to the kernel. This would fall under the "Cathedral" style.

4. Does subversion follow the "Cathedral" or "Bazaar" philosophy? What about GIT?
subversion -> Cathedral
git -> Bazaar

5. In an SCM system, why shouldn't you share workspaces?
A workspace should be for a single user/project to reduce confusion. Also, the SCM system will be unable to track changes based on user or task.

6. What are the advantages for using a distibuted version control system like Git?
1) You have a perfect clone of the project from the server.
2) Since you have a offline copy, you don't need to go online and are not slowed down by server access.
3) Since its possible for multiple people to have a copy of the project, you can always get the project from a fellow developer.
4) You can add bits and pieces from different projects and incorporate them into your own version of the project.

7. A Standford study tested heavy multitaskers and light multitaskers in a variety of tasks. Did heavy multitaskers or light multitaskers do better when ignoring things? Storing and organizing information? Switching from one thing to another?
The light multitaskers outperformed the heavy multitaskers in each of the tests.

8. Name the benefits to using open source software.
1) Since the source code is available, any developer can make the changes that they want to make.
2) A community to collaborate with.
3) It's free.
4) It's ok to use, modify, and redistribute the project.

9. What are the requirements for on open source project?
1) You are allowed to redistribute the project for free.
2) The source code must be available.
3) The license must allow modifications and derived works.
4) Derived works might be required to be distributed under a different name or version number.
5) No discrimination against people or groups
6) No discrimination against use in a specific field
7) The license is redistributed along with the project.
8) The license must not be specific to a product
9) The license can't put restrictions on other programs included with the project

10. While using a version control system, two developers check out the same file and make changes to that file. What is this called? What problems could arise from this arrangement?
This is called nonlocking. The second user to commit the file will be told that the version they have is out of date. They will need to update before commiting their version of the file and make any changes to the code to resolve any inconsistency issues.

Tuesday, October 13, 2009

Google Project Hosting

I have added my robocode project to Google Project Hosting. The project can be found here. It is exciting to know that my robot can be downloaded and developed by anyone who is interested. I was able to accomplish all of the tasks except those which required codesite-noreply@google.com to be added to the dicussion group. There is a bug which is preventing this from working properly. I have posted into the issue posting found here. At the time of the posting, my project hasn't been added.

The was only some slight difficulty in locating some of the settings that needed to be changed. Ohterwise, it was very strightforward to put my project onto Google Project Hosting. I am excited to have my code out there for the world to see.

Wednesday, October 7, 2009

Testing, testing, 123

Writing JUnit tests for a robocode robot make it very easy to test to see if your robot is doing what you're expecting it to do. Also, it makes it extremely simple to check that nothing is lost while you are making changes in efforts to improve functionality. My Runner robot has an admittedly very simple strategy so there isnt much to test.

The easiest tests to create were the acceptance tests, which only checked to see whether or not my robot won a set amount of rounds against another robot. The harder ones where to check whether or not my function to keep my robot headed in a somewhat diagonal heading worked or not. Testing to see if my firing power based on distance was working correctly wasn't too hard. I wasn't able to test much more of my robot's other strategy so i used more than 2 acceptance tests.

I think it tests most of what my robot does. The only thing that isn't tested is whether or not my robot turns 90 degrees when it hits a wall. I wasn't able to figure out a way to check to see if its behavior was correct.

The results of Emma are as follows:

Emma Coverage summary
class: 90% (9/10)
method: 84% (42/50)
block: 74% (390/530)
line: 74% (100.4/135)

I have changed my robot's code to make it easier to write JUnit tests. I could definitely add more to test though.

Download the latest distribution here