Always Version Control

Published by Leave your thoughts

Version control has become very popular and has amazing benefits, but surprisingly there are many developers writing and creating code without using some type of version control. While not as critical for small projects the relative low barrier to set up a repository makes it the smart choice.

Types of Version Control

Two main competitors exist for version control, Git and SVN. the vast majority of project and companies use one of these two technologies. other systems include mercurial and CVS as well as a plethora of proprietary VCS systems.

1) Version control helps avoid developer collisions

When you have multiple developers working on a project this can greatly speed up the timeline and allows for developers to work on separate functionality. however this can lead to some serious problems when developers work over each other and inadvertently overwrite work. This can lead to some serious hair pulling as developers work to sort through bugs in systems that have been throughly tested. Version control maintains records of each commit with the changes and has overwrite protections requiring merges for conflicting files. while dealing with merge conflicts can be annoying and time consuming they are almost always less time consuming that dealing with an accidental overwrite of code

2) Test driven development

This works great in conjunction with Test Driven Development. Developers can create unit tests and system tests and using them with continuous integration and testing of new code. Gitlab even has a CI/CD built into their software. This helps discover bugs faster, and keeps developers from shipping bad code to their production servers

3) Feature implementation

Version control has branching and tag abilities allowing teams of developers to work on maintenance and at the same time developing new features on separate branches ensuring that master branches remain clean. when using a modular or loosely coupled design pattern developers can avoid the headaches of having new features interfere with existing product environments and new features can be isolated on development environments until QC is complete

4) Reverting code

This is one of the greatest assets of any version control system. code can be recovered all the way back to the start of the project. in the event of a corruption of data or need to look back at older code you can easily do so with a version control systems. I use this functionality all the time when I program. I test out a methodology, it goes wrong or interferes with something else I wrote, I can revert it back to a stable copy. When someone pushes code into production and there are bugs or features included that are not ready for release you can easily revert the system back without having to dump the entire environment. Back in the old school days people had to resort to backups, now this is not the case

5) Commenting

Version control allows you to comment on everything you do. as a good programming practice you should always put comments in your code, but this takes it a step further. each commit is timestamped and allows you to see what you were working on and the list of files you touched. this allows you to retrieve a good history of a project, or find out who touched what and why. I use this functionality any time I am working with a team as a technical lead, or just want clarification from a team mate. It is an indispensable tool when used correctly

Categorised in: Uncategorized

This post was written by cgaffney

Leave a Comment