Setting Up a Local Dev Environment: Step-by-Step

This guide is for users starting off from a clean system. By this, we mean you have no compilers, no version managers, and no development environments. If you have some things already set up from a previous project, then you can skip to the parts you actually need.

First Step: Get a Good Code Editor

A code editor will replace a plain text editor. For most people just starting out, VS Code is a great default option. It’s free, and almost every tutorial and tool assumes VS Code or a similar IDE and is available for download from the official website.

Second Step: Install a Version Manager, Not a Language Directly

Most version control systems skip this step, which is why you keep having language dependency problems. Instead of heading to a programming language’s official website and doing a direct download, some version managers are pyenv for Python, nvm for Node.js. With these tools, you can maintain multiple language installations and versions in a single system, which comes in really handy when dealing with different projects that rely on different language versions.

Install the version manager to start. Then you can install language versions with fewer hassles. Yeah, it requires a step now, but it can save lots of debugging headaches later on.

Step 3: Git Installation

Git needs to be installed separately from a particular project. Then there is a single initial config before any commits. This initial config sets your name and email. These remain attached to your commits for the entire project. It’s important to get this right so you don’t have to edit a ton of old commits to correct your name. git config --global user.name "Your Name" and git config --global user.email "you@example.com".

Step 4: Language-Specific Package Manager

Most languages have a package manager associated with them. For instance the commonly used Python package manager is pip and JavaScript and Nodejs can use npm or pnpm. These handle installation of external libraries you will need for any and all projects you build in the future.

5: A Terminal You Are Comfortable With

Since this process happens mainly through the terminal, a bit of time spent in the terminal before starting a project is worth it. This time, however, is spent using the terminal to manage files, run scripts, and read error messages to understand them. This process is built into Mac and Linux systems. However, in Windows systems, it is recommended you install WSL (Windows Subsystem for Linux) early on since a majority of the tutorials and assisting tools adjust to a more Linux-centered system and, in addition to learning coding, you are not going to want to learn to code and struggle to adjust Windows-specific quirks.

6: Test Your Whole Set Up With Something Small

Before you start a real project, run an actual trivial test that covers the full set up including: setting up a new folder, initializing Git in the new folder, creating a one line script in your decided language, running the script, and then executing Git’s command to lock the changes. If there are no errors, that entire process shows that environment is ready to go and you won’t have to worry about basic tooling issues when actually trying to build out your real project.

Mistakes usually made early on

There are a few things that tend to cause issues when you are just starting out: people will install a language system wide rather than through a version manager, others will skip setting up Git and realize only when they start committing code under the wrong name, and some people will jump right into big projects before testing their setup with a small project. It is not hard to avoid these mistakes, but people tend to overlook them when they are eager to start programming and they tend to be very frustrating for how little time it takes to set them up.