This document provides an overview of CS315 as well as the readings and "assignments" for the first week and a half of class. More information on the course can be found in the course description.
You could use another IDE or another configuration, as long as you have ant and Mercurial. However, Eclipse with MercurialEclipse is strongly recommended. You should not use a different configuration unless your productivity with it is an order of magnitude greater than the effort it would take to use the recommended configuration.
Set your username in your Mercurial configuration file. Instructions are available on the Web (e.g. at the QuickStart wiki and in Chapter 2 of The Definitive Guide. Your username should be specified as "First Last <firstname.lastname@example.org>". NB: You must use your @bsu.edu email address here, otherwise the contintuous integration system will not be able to send email notifications to you.
Clone the jhm-team repository
You can do this
from the console if you installed a command-line client, or you could
do this using a GUI tool like TortoiseHg, but you could also do it
right from Eclipse:
create a new Project, and from the Mercurial heading, choose to clone an existing Mercurial repository.
From the URL, you can tell that the repository is being served via
http, so you might also try loading the repository in
your favorite Web browser, just to see what it looks like.
Note that you need to be on campus or connected via VPN in order to
continteg server. Ball State VPN clients are available
for many common operating systems, though not all. If you cannot run
VPN, you can always ssh tunnel through
Add a mugshot to the repository. Your mugshot is a recognizable photograph of yourself in which you are holding a placard with your name on it. Write the name you want to be called by your teammates (e.g. "Joe", not "Joseph X. Smith") so it is large and legible. The image should be in portrait orientation, in PNG format, and may not exceed 300k in size. Name the file according to your BSU username; for example, mine is "pvgestwicki.png". This will ensure no filename collisions.
Pull and update your repository, just in case someone else was working concurrently. I recommend using the "Update after pull" option in Eclipse, so you don't forget to do it manually. Then, push your changes.
You should also familiarize yourselves with the product backlog, which will have been shared with you via Google Docs by this point. Pay special attention to the sprint backlogs that have already been defined for you for the first sprint.
Note that on Friday, we will be forming four teams, and each team will inherit the tasks identified on the product backlog. You should come to Friday's meeting with an idea of which team you would like to join.
The games industry is competitive. You better take a moment and make sure you did the previous activity correctly.
The jhm-team repository, which holds the mugshots of all the team members, is served up via http. This has two benefits: first, you can easily clone the repository by pulling it through http; second, you can use the Web interface to browse without actually cloning the repository. Open up http://continteg.dhcp.bsu.edu:8888 and take a look.
Using a version control system has many advantages, one of the most prominent of which is accountability. Everyone on the team knows exactly what changes were made by each person. Of course, in order for this to work, every user must
Go to the Web site now, and find the record from when I uploaded my mugshot. Clicking on the description takes you to a page with all the details on that specific change. (If you're doing everything correctly, you should right now be looking at http://continteg.dhcp.bsu.edu:8888/rev/7f654f551492, which I am purposefully not hyperlinking because you should get there through the Web interface.) Notice that:
Notice that you can click on "pvgestwicki.png" to see the details on that specific file, and clicking on "raw" (on the left navigation bar) will actually show the contents of that file as of this revision.
(The commit message also exemplifies a best practice, that it starts with a past-tense verb and is a single descriptive phrase. In cases where you need to include more justification, put in a blank line, and then comment on the rationale for the change. More on that later.)
Go back to the main page of the repository and find where you uploaded your change. Verify that:
If your contribution is invalid, you must correct it by Thursday at 11:59PM, or else you fail the job training and are fired.
Note that replacement of resources is one place where the MercurialEclipse plugin is flakier than it should be. It gets kind of confused if you delete a file, then add a new file with the same name, and then try to commit. Instead, I recommend that you delete the file and re-add it in two separate commits.
Also note that every Mercurial repository is complete, and so if you want to verify your files before pushing them — a brilliant idea, really — you can serve your own repository. In fact, you can do this right from the Team context menu in MercurialEclipse, so you don't even have to tinker with console if that makes you uncomfortable. Serve it locally, check it out with your local browser, verify that you've done everything right, then pull-update-push, and you get to keep your job.
Get a copy of the project skeleton by cloning the repository into a
new Eclipse project. This is most easily done from within Eclipse,
selecting "New", "Project", "Other",
"Mercurial", and "Clone Existing Mercurial
Repository". The repository is
Authentication is not required.
changing the clone directory name to "Morgan's Raid", but this is optional.
Run the ant build script, which will in turn run all of the unit tests.
You can do this in Eclipse by right-clicking the
build.xml file and choosing "Run As...", "Ant Build".
If you get an error like this:
Perhaps JAVA_HOME does not point to the JDK. It is currently set to "C:\Program Files (x86)\Java\jre6"then you need to make sure you have installed a 1.6 JDK from java.sun.com and set your
JAVA_HOMEproperty correctly. Google will help you determine how to do this for your specific operating system.
Take a look at the jhm project build results and the dashboard on CruiseControl, our continuous integration system.
This next piece is important for your future convenience, although you may not see the impact of it right away. We'll be using JUnit for unit testing, specifically version 4 of the JUnit library. Efficacious use of this library makes use of static imports in Java, and unfortunately, Eclipse doesn't handle these gracefully by default. In order to make it easier to write test cases, it's a good idea to edit your Eclipse preferences. Specifically, open the "Preferences" dialog from the "Window" menu, then choose
In the Favorites panel, add the types
To check if this worked, create a dummy Java file, create a method,
and in the body, try typing "repl" and type control-space
for content assistance. If you did everything correctly, then Eclipse
will give the option to replace with the static
method from the class
You can see this specific method in action
edu.bsu.jhm.EntityTest, if you're interested.
ScrumMasters for each team must distribute a communication plan to their teams and the Product Owner. The communication plan must include at least the following: