Monday, January 23, 2012

Perforce's beginner mode no more

What up! Another week is gone, another assignment is done and the next one is already posted and due in three (3) days I think. So, here I am posting about the second assignment. Just like this class is supposed to be (not too much programming), this assignment was more about learning how to use advance features of Perforce than actually programming.


The idea behind this assignment was to create a C# console demo app in a series of steps defined by Keenan in the instructions. The program initially consisted of a Singly-Linked List that holds some numbers in each node. Then, I had to transform the list from Singly-Linked to Doubly-Linked and look out for some particular nodes and delete them. Coding all these steps was not a particular challenge, I have spent a good amount of time coding Linked List in previous Keenan's classes.


The important lessons learned from this assignment were all the unknown-to-me Perforce features I was forced to use. Here is a small summary of some of them:
  • Delete and Rollback: one of the steps was to forcibly delete one file from the depot and in the following step recover it. I don't know if all Revision Control Systems work this way, but at least Perforce does keep a copy of all your files in the repository even if you selected to delete some of them. Then, using the Rollback option you can go back to a previous undeleted version of the file or folder it was contained in.
  • Branch: another great option that Perforce offers is branching. This feature allows you to create parallel versions of files and folders that can be edit separately. You might be asking yourself "What am I going to use this feature for?", imagine that you want to try out a series of new features in a piece of software but you are not sure if you want to incorporate them in the final version. Well, you can create a parallel copy of the current version of your software and work on those features separately without interfering with the main line of code.
  • Merge: this feature is basically the "opposite" of branching. Therefore, it allows you to merge or combine different branches into one. Using the same example as before, after you have coded and tested the new features of your software and you have decided that they should be incorporated into the main line of code, then you use this option on Perforce and with the help of the Conflict Resolution Tool you combine the parallel versions of the files and folders into one.
Using what Perforce calls Revision Graph, here is an example of how the different versions of one file look after using all the features mentioned above.


Well, I hope this information was somehow useful. See you soon. Adios!

No comments:

Post a Comment