Programming: Source Control

Throughout this whole project, we made sure that we used source control (otherwise known as version control)  to keep track of all the changes and files used in the app code. Recording these changes allows you to jump backwards to older code, incase something breaks or the project files are lost. It allows you to compare changes over time and track the progress of the project as it evolves.

Using source control in todays day an age is an essential professional practice as it allows you to easily work collaboratively with other people – as was done in this project with two programmers.

We put our code in a private repository on Bitbucket. This repository is on a remote server and can only be accessed by people who have permission. This is great when you want to keep your code/ project a secret, and is something we had to do as mentioned in the contract signed at the beginning of this project. We use this repository as a backup of the code. When either one of the programmers makes any changes, we are able to push them up to the repository where they will be saved.

Below is a screenshot of our Commits page on the bit bucket repository. Here you can see all of the individual commits made and pushed to the server. A commit is made after some lines of code are changes, a comment is then added so we know what the changes were in the commit – making it easier to find where to jump back to if we ever need it. It also helps us keep track of what has been done so we don’t waste time repeating processes. If you were to click on one of the commits, it would take you to a new page were you can easily see which files were changes and which likes of code were edited.

Screen-Shot-2015-05-16-at-12.57.30

Locally, this source control was used in a couple of ways – either through Xcode itself or using Terminal. Inside of Xcode it has options for you to commit changes, push changes to the remote repository or pull changes from the repository. This is all done with a pretty graphic interface making it nice any easy to use. My personal favourite way of doing it is through Terminal, using the command line to do the same functions to source control my work.

Below is a snippet of the same commit log above, but presented through terminal.

Screen-Shot-2015-05-16-at-12.56.12

To be blunt, using source control for our code helps us meet the learning objective:

02 Originality, creativity and professionalism in the interpretation of a live brief, production conception, pitching, management and realisation of interactive media artefacts;

It is a professional practice which allows us to work swiftly (pun definitely intended) and collaboratively on this project. While I believe we did a fairly good job at making regular commits for the changes to the code, they could’ve definitely been more regular if it was possible. One of the biggest downfalls is that a lot of the code was only written on Thursdays and Fridays while we had workshops. Within these workshops we were able to quickly get  help as and when we needed it, rather than searching endlessly on the internet wasting valuable learning time. As a lot of progress was often made in short stretches of time, remember to stop and commit the changes wasn’t done as often as it should, and would usually be done at the end of the day after too many changes were made to accurately keep track of. That being said, source control has proved itself invaluable to this project and was an essential part of the whole process.

Advertisements

Source Control & Group Developing

Source code management (SCM) is a convention within the developer/ programing industry strongly connected with idea and use of Git to manage code and text based files. Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency (Git-scm.com 2015). For text and code projects, the back-up strategy typically  includes version control, or tracking and managing revision. Each developer can make several revisions per day, and the ever increasing corpus serves simultaneously as repository, project narrative, communication medium, and team and project management tool (Loeliger 2009). 

Using git has benefits to group projects like

  • Easy and simple to use
  • Branching and merging projects together allows several members to develop the same project simultaneously that can be merged back together further on.
  • Community shearing means any developer can pick the work up and continue to develop with it creating a timeline of development
  • Errors, bugs or backtracking can be performed at any time because of the logging systems precise level of storage and references means all changes can be seen throughout the development, meaning this can be returned to instantly.
  • Management can see the development of a project in a literal versions thats not code based.

Implementing

Implementing SCM or Git within a collaborative project usual uses an online repository services that hosts the Git documentation and the project files to giving access to participants. Services like Github or Bitbucket are just a few of these services that provide onlining hosting for Git projects.

These services provide a graphical interface for the Git project showing the all the projects Commits (Commit is a single libeled change to the project), the to perform ability merges and resolve clashes and errors. This is helpful for developers as it highlights clashes or differences between branches (branch is a separate line of development with a single project) giving a developer to fix or debug the issue. Push or Pulling an entire project is a feature that developers on the move use constantly to update the online hosted version of the project. Pushing the project up gives other team members to see the work, git commits and progress with the project that they can then download and work with as well.

Our Group

Within our Application project its vital that we implement an SCM system as all members will be contributing towards the programing or design programing. Some members will have a more design based focus however will still needs to implement or tinkers with the design style of the application during its development. Using a hosted service such a Bitbucket, we can give access to private repositories so that information is not being released to a public domain.

During the development of the application commits will be vital to the success of the SCM as it will create a timeline of the applications development for the client to see. This will be useful for the assessment criteria because it will show how we iterated through the design, development and testing process ending at our final product that we present to the client.

Setup

We have setup a private repository here. It cannot be viewed by non group members but will be made public as soon as the client is supplied with the final product.

https://bitbucket.org/kuuurttyy/magna-carta-prototype

BitBucket Magna Carta

Continue reading