Version control

Version control

Why is it important?

Most gamers would agree that adventure games are the most pleasurable to play. Because of the level of difficulty every gamer gets a sense of accomplishment when one surmounts a challenge. These games would however be discouraging to play if there is no way to save your progress. A loss will mean you begin anew and this can feel like a massive waste of time, effort and energy.

Software engineering is like adventure gaming, it's tough which is why we also have a way to save our progress using a process known as "version controlling". Cloud platforms like github and bitbucket exist to provide engineers with this service. When used correctly these services can help teams restart from their last reasonable version and it comes in handy when one has muddied their code in a bid to either improve on it or extend its features. Sometimes the best solution to fix code isn't to tunnel your way out, it's to travel back in time to a period when it all made sense and all was right in your world of code.

Simple conventions like these aren't valued till you screw up or you don't follow them properly (and screw up) . I learnt my lesson the hard way a couple days back. I was working on a personal project and didn't feel the need to follow convention because it's my personal project, to cut the story short, I messed up, tried to tunnel my way back up and messed it up more, decided to travel back to my last reasonable version and alas I found out that my last online commit had so many bugs and I was only pushing code in 24 hour cycles. If I travel back even further I'd lose 48 hours of my time, I'm now in a case of double jeopardy and may have to restart the project from scratch.

By now you're probably curious as to how version control is properly done, well there are rules you should take into consideration;

  1. Do not push code to your online repository (your project's version control) without ensuring it builds successfully.

  2. Do not push code to your online repository without ensuring that there is little or no runtime error.

  3. Attach insightful comment as to the state and stage of the project when pushing your code to the online repository (repo for short).

  4. Push code to your online repo frequently (multiple times per day depending on how much progress you're making).

With the above in place, you most likely won't end up like me. There's a burning sense of regret and frustration you'll feel when you need your version control and can't get it because you either didn't do it or you did it poorly. Code is tough enough without such despair, make sure you version control your code before its too late.