Cooperation

This chapter will be all about working together and it is also one of our longest. This is something you will be doing constantly during your time at Chalmers. Your programming courses will most likely contain labs or assignments to be done together with others, and sometimes your math courses do as well. Therefore it is crucial to have a good environment set up to be able to work with a group.

It's very common for new students to gather around a single computer, or to write code separately and test which is best before turning it in. Others share files over Discord or Snapchat and this can lead to major issues when you're working at the same time or if you've missed a message.

To facilitate group work we will introduce two tools: Git—the stupid content tracker—and LiveShare, a VSCode plugin which we will go through in chapter 5.7.

What is Git

Git is a form of Version Control System (VCS for short). That is, a set of tools that help you track changes you make to your text files. It helps you collaborate with others by keeping track of who did what, as well as guiding you in merging your different versions of files. Git lets you be fearless when changing your code, safe in the knowledge that previous versions of your code are easy to access.

This chapter will probably feel very long compared to the others but it is also the most important, which is why we needed all the other chapters to build up to it. Knowing Git is a crucial skill and there are many good and important reasons for learning it.

  • It's used in virtually every software-related job on the planet. Be it backend work, programming, systems development or a role as system administrator, you will most likely be using Git.
  • It's incredibly useful in your courses, and even required in a few. Being able to write code simultaneously and to work on different parts of the code at once is a requirement for effective work.
  • Having access to previous versions of code can be a life saver, for both personal and collaborative projects. It serves as a backup system in case your hardware breaks, but also lets you go back to older versions or test different feature implementations.

In this tutorial, we will guide you through setting up the necessary software and accounts for a modern Git experience. We will also introduce you to the basic concepts of version control.

To make Git a bit easier to understand we will primarily be using the Git integration built in to VSCode. We will also go through how to use Git in the terminal for those of you who prefer the CLI.