We'll be using a Quadtree1 data structure to practice pair programming. Pair programming is a concept in software engineering where one person acts as a driver, writing the code, and the other is the observer, reviewing the code as it gets written. Choose now who will start in each role. After 15 minutes, we'll switch off. Two novice programmers working together can accomplish great things this way!
Quadtree code repository:svn+ssh://USERNAME@ugradx.cs.jhu.edu/home/obuzek/svn/cs226-quad(quadtree code thanks to jotschi at github)
You can also get the source from Google Code if you don't yet have a ugrad account, though you won't be able to commit to the repository:
http://cs226-quad.googlecode.com/svn/trunk/
We'll be modifying the PointQuadTree.java file to add an Iterator. This will involve making it implement Iterable, adding an .iterator() method, and writing an inner class called PointQuadTreeIterator.
[obuzek@ugradx ~]$ cd ~ [obuzek@ugradx ~]$ mkdir svn [obuzek@ugradx ~]$ cd svnTo create a repository:
[obuzek@ugradx ~/svn]$ svnadmin create PROJECT_NAMEMake sure you set the permissions so other people (namely, your group members!) can access it.
[obuzek@ugradx ~/svn]$ chmod -R a+rw PROJECT_NAMENow you've got a repository! If you go into the directory, you'll see something like this:
[obuzek@ugradx ~/svn]$ cd PROJECT_NAME [obuzek@ugradx PROJECT_NAME]$ ls conf db format hooks locks README.txt
Now that you've got it, you can access it from elsewhere. You should be able to access a repository on the ugradx servers.
Do the following on your own computer. You can also use this URL to enter into TortoiseSVN or Versions.
daifuku:working olivia$ svn checkout svn+ssh://USERNAME@ugradx.cs.jhu.edu/home/USERNAME/svn/PROJECT_NAME PROJECT_NAME
daifuku:working obuzek$ cd PROJECT_NAME daifuku:PROJECT_NAME obuzek$ mkdir YOUR_NAME daifuku:PROJECT_NAME obuzek$ cd YOUR_NAMEYou can now modify files in the YOUR_NAME directory on your own computer. Make the changes you'd like to make, add files, etc. You'll also have on your computer now a folder called quadtree_code. For today, copy the code inside that directory into the YOUR_NAME directory.
daifuku:PROJECT_NAME liv$ svn add YOUR_NAME A YOUR_NAME A YOUR_NAME/file1 A YOUR_NAME/file2 A YOUR_NAME/file3 daifuku:PROJECT_NAME obuzek$ svn ci -m "message" obuzek@ugradx.cs.jhu.edu's password: Adding YOUR_NAME Adding YOUR_NAME/file1 Adding YOUR_NAME/file2 Adding YOUR_NAME/file3 Transmitting file data . Committed revision 1.The first puts all the files in the YOUR_NAME directory. The second command checks in the revisions you've made.