Adventures Of An Accidental Games Developer – 2 – Source Management

My next blog post will be about the SDL library, But I don’t want to talk about that yet. I want to talk about something really, really important. Something that a lot of programmers don’t do, but really ought to. Source control. Particularly, source control with Git.

If you’re about to start a major development project, such as the creation of a video game, you’d do well to start good proper source control management processes.

Now, there are other source management systems. SVN, Mercurial and Microsoft SourceSafe are two examples I can think of from the top of my head. But I know Git best, so that’s what I’m going to be banging on about. 

So, what’s this Git then? 

Git was invented by Finnish-American programmer, Linus Torvalds. You may know that Linus is also famous for developing the Linux kernel which runs on billions of servers, cell phones and computers worldwide. It was initially created to manage the development of the Linux kernel, which is one of largest open source projects in existence with hundreds of thousands of contributors.

In a nutshell, Git allows for rapid, seamless developer collaboration without the risk of malicious corruption. And it just works.

Why Should You Care?

Are you worried about having your source code corrupted? Are you worried about making a change and it breaking your application? Would you like to be able to roll back your application to a specific period before you made a change? Would you like to be able to work with your code on your local file system, and have your main source code trunk being on a separate device? Or even better, on the cloud?

If you answered ‘yes’ to any of those questions, you probably want to start using source control. And Git is hands down, the best one on the market right now.

Who Uses Git?

Lots of people use Git. Popular open source projects like Gnome, Ruby on Rails, Node.JS and Flask use it to allow for coders around the world to work on one project with absolute ease.

There are some unorthodox use cases for Git too. There’s a guy in the UK called Francis Irving who uses it to track issues with his house, as shown in a recent Wired article .

Thousands of companies use Git internally, and it is rapidly replacing Sourcesafe, CVS and SVN as the source control manager of choice. Git is huge. And it’s not going away.

What is Github?

Github is a site that allows you to freely store open source projects on the cloud. They also allow you to have private projects stored on their servers, provided you are a paid subscriber to their service.

How do I get Git? 

Git is open source and available on most platforms. If you’re using Linux, you can grab it from your  repositories. There are binaries available for OS X and Windows. Incidentally, there’s an incredible metro app for Windows.

Many IDE’s have plugins that allow you to work with Git and Github. My favorite Java IDE, IntelliJ comes with a Github plugin built in. Eclipse has an optional third party plugin that provides Git support.

Whatever your platform or development environment, there’s nothing stopping you using Git.

Learning Git

Git may seem a bit daunting at first. Learning it isn’t hard though, and can be done in 15 minutes. Check out the Try Git course from CodeSchool.

Fin

I hope I’ve convinced you of how awesome Git and proper source control is. If you use a different source control method to Git, I’d love to hear about it! Just drop me a comment below.

Enjoy This Blog Post?

You should subscribe. Pop your email in the box in the sidebar and you’ll get an email whenever I write a new post.

About Matthew Hughes

Matthew Hughes is a software developer, student and freelance writer from Liverpool, England. He is seldom found without a cup of strong black coffee in his hand and absolutely adores his Macbook Pro and his camera. You should follow him at @matthewhughes.

1 comment

  1. Sourcesafe is an abomination and I’m not sure if it’s still supported by MS. TFS provides better source control, but also includes shedloads of task management, allocation, metrics and reporting so I use it when I’m lead-devving and give the customer full access to the project status.

    In terms of maintaining source code in the face of changing requirements, SCM is a resl boon. If something’s descoped or postponed, that code is removed immediately from the current codebase. Don’t comment it out – remove it. If the requirement comes back into scope, pull the snippet from SCM. This helps maintain your MVP. Every line should be directly traceable to fulfilling part of a requirement. If there’s a line that’s extranneous, that’s an extra line to maintain.

Leave a Reply