67 versions to 1 Simplified Codebase – How we manage our code on Github

The Problem

Whenever a team starts programming, whether in Spike using blocks or using Python with Pybricks (see here: Supercharge your Programming with Pybricks! for info on what Pybricks is and here: How to Set Up Pybricks to find out how to set it up), different versions of their runs pile up.

Transferring files means sending an email to yourself with the code attached and then realizing that’s the wrong version. Then you have to find out who has the right code and email them.

Storing them on cloud platforms like Google Drive helps a little, but it provides instant regret when your realize the Drive version isn’t updated. You reach out frantically and someone updates it, but when you run the code, it doesn’t work! You have no idea who has the correct version, or even who’s work broke the code in the first place!

This is the nightmare many teams face early on in the season, stopping their work for days and creating conflict and frustration within their team.

The Solution

In the corporate world, large software companies have to manage terabytes of data across sometimes millions of files. Doing this in places like Google Drive would lose billions of dollars.

That’s where Github comes in. It relies on a tool called git, devloped by Linus Torvalds many years ago. It allows people to push their code to a main “repository” located on the cloud from their own computers and allows others to clone or pull the up-to-date code, allowing everyone to stay up-to-date.

Whenever someone pushes their code, they have to write a commit message detailing what they changed, why they changed it, and what it does.

One of the best features of Github is the “blame” feature. It literally blames people for changing the code, allowing team members to see exactly who change what and when.

Conclusion

Next time you start writing some code, go to http://github.com and create a repository. Everyone will be better off, up-to-date, and have access to the code to edit and experiment with.

Leave a Comment

Your email address will not be published. Required fields are marked *