186: Git: Keep Track Of Your Files As They Change. Part 1.

Take Up Code - En podcast af Take Up Code: build your own computer games, apps, and robotics with podcasts and live classes

Kategorier:

Programming involves change and managing that change is the only way to make sense of it. It’s more than history. As your projects get bigger and especially when you have a team of software developers all working on the same project files, a version control system is absolutely critical. This is either called version control or source code control. Both mean the same thing. How does it work? And how can you use it? That’s what I’ll begin explaining in this episode. Specifically, I’ll be discussing my favorite system called Git. We won’t actually discuss Git in this episode. There’s a bit of background material to explain first about the differences between text files and binary files. Listen to the full episode to learn more about the differences between text files and binary files. You can also read the full transcript below. Transcript It’s more than history. As your projects get bigger and especially when you have a team of software developers all working on the same project files, a version control system is absolutely critical. This is either called version control or source code control. Both mean the same thing. How does it work? And how can you use it? That’s what I’ll begin explaining in this episode. Specifically, I’ll be discussing my favorite system called Git. That’s spelled G i t. We won’t actually discuss Git in this episode. There’s a bit of background material to explain first about the differences between text files and binary files. I’ve mentioned version control many times in previous episodes and you might want to listen to episodes 142 about comments and episodes 166 through 169 which are a guide to computer programming. Before I explain how to use a version control system, let’s look at how you might keep track of files yourself. I’ve done this before and you’ve probably done similar things. If you only have one file, it’s a little easier but still a chore. Maybe you have a budget that you save to a file on your computer. If you keep updating the file each month then either the previous month’s information will get deleted or changed or if you want to keep all that information, then the file will grow until it gets too large to work with. Then you’ll face the same decision to start deleting old information from past months. Instead of either of these two options, maybe you decide to start saving the budget with a new name each month. This keeps your file size small and lets you keep as many previous months as you want. But soon you find yourself scrolling through all these files. Your directory starts filling up. So you move some of the old files into an archive folder. This is really what a version control system does for you. Only it does it better by managing all the work for you, keeping even smaller files archived so you use less space, and lets you compare changes. One thing you should be aware of is that any version control system works great with text files. So you can use it to manage more than just source code. Binary files are a bit different. But wait a minute, aren’t computers based on binary? Yes, and a text file is composed of binary bits just like any file. What makes a file a text file is that it contains sequences of binary codes that have meaning separated every now and then by new lines. All that means is that a text file contains characters that you typed split into one or more lines. Each character that you type could be stored in the text file differently depending on how it’s encoded. And it gets more complicated if the text contains something like Chinese characters. Listen to episode 107 about chars and bytes and episodes 114 through 116 about strings for more information. The encoding doesn’t really matter here. The bytes still represent the characters you typed no matter how they’re stored. The new line character can also be different

Visit the podcast's native language site