How to fly the nest and develop code offline
While cloud-based environments like GitHub Codespaces offer convenience, they require a constant connection. Learning to transition your development environment to your own Windows machine unlocks the ability to work offline and master the essential tools used in professional software engineering.
Transitioning from a cloud-based environment to a local setup—often called 'flying the nest'—involves configuring VS Code to run on your own hardware. This process allows you to use common technologies like Python and SQLite without relying on an internet connection. For a successful setup on Windows, it is critical to establish a dedicated project folder. To prevent errors, you should avoid using spaces in your folder names and steer clear of synchronized directories like OneDrive, iCloud, or Dropbox, as these programs can interfere with Git and essential build tools.
There are two primary ways to bring code to your local machine. The first is cloning a repository from GitHub. By using the Command Palette (Ctrl+Shift+P) in VS Code, you can run the 'Git: Clone' command, authorize your account, and select your repository. This method is ideal for projects that began in Codespaces and allows you to synchronize changes back to GitHub. The second method is starting a completely local project by downloading a prepared release. In this case, you must open the entire project folder in VS Code rather than individual files to ensure the debugger and Makefile function correctly.
Managing multiple environments requires disciplined synchronization. GitHub acts as the handoff point between your local machine, WSL, and Codespaces. Before switching environments, you must save all files, commit your latest changes, and push them to GitHub. When returning to a project from a different environment, you should always pull or sync the latest updates to resolve any potential conflicts. Avoid editing the same project in two different environments simultaneously, as this increases the risk of conflicts that can disrupt your workflow.
Source: Developing Your Project Locally with VS Code (Windows) - CS50 Seminars 2021