From the course: Complete Guide to C Programming Foundations

Configuration and setup

- [Instructor] This course works with GitHub Codespaces to assist with a learning experience and to work the exercises and challenges. To configure Codespaces, use a web browser as you see here for another one of my courses. The steps work the same for this course. So on this page below the heading related to this course, you see a link for GitHub Codespaces. Click the open button right below. You see this page, which is this courses repository on GitHub Codespaces. You want to generate a new codespace, one unique to you where you can find the exercise source code files, you can edit them and run them in a Linux environment generated on the web and accessible through a desktop or laptop computer's web browser. Click the code button here. Choose create codespace on main. If you've already created a codespace for this course and your returning, you can choose the codespace from this menu as it appears in the list. Choose that codespace and it will open in another browser tab. Otherwise, create a new codespace by clicking this green button. Wait as GitHub creates and configures the environment in a new browser tab. When everything is ready, the screen looks like this. Source code for the course appears here. If not, click this icon to view the files. This portion of the window is the editor, and down here is a Linux terminal where you can run code and provide input where necessary. The file names are related to the video chapter and number in which the file is referenced. To access a file, choose it. For example, in this source code, this is chapter zero, and I would choose this file here. Double click to open in the editor. If you see these messages, you can respond to them. Don't worry about the pre-release, but do install the C language extensions. You can close the tab and return to this tab here to edit the file. For example, I can go ahead and change this string here, change the wording a little bit, just like that. To run the code, you click this button. Now, if it shows the bug here, that means it's running in debug mode. You can choose run instead to run the file. You may be prompted to choose a debug configuration. Just go ahead and pick one. Do not show again. And for some reason when it runs the first time, it outputs to the debug console. Click the terminal console to see the program's output, which appears right here. Back in the file list, you see some modifications. M means that the file has been modified from the original, and this item here is a binary file the program created. I'm guessing that the U means it's an update to the repository, though all these files exist in your personal codespace, independent of the codes master repository. These are your copies. You can leave the codespace at any time. Just close the browser tab, and please do so when you're done. The codespace shuts down automatically after 30 minutes of inactivity. You can start it again as shown earlier in this video. And be aware that after 30 days of inactivity, your codespace is deleted. You'll be sent a warning email before this happens. Codespaces provides the exercise files, the editor, the compiler, the linker and everything you need to start programming in C. This tool makes it easy to learn C by keeping what you see on your screen consistent with what I show in the courses videos. Let's get started.

Contents