
A local development environment is the set of tools on your own computer that lets you write code, run it, test it and fix it before anyone else sees it. Working locally is faster than editing files on a live server, it is safe because mistakes affect only your machine, and it works without an internet connection. A well-organised setup also means that when you return to a project months later, or share it with a colleague, it starts with a single command instead of an afternoon of guesswork.
Whatever language you use, the setup is made of the same layers:
Most development tools are controlled from the command line, so a good terminal is the foundation. On macOS, the built-in Terminal works; many developers use iTerm2. On Windows, install Windows Terminal and consider WSL (Windows Subsystem for Linux), which runs a real Linux environment inside Windows. Much server software and many tutorials assume Linux, so WSL removes a whole category of "it works on Linux but not on Windows" problems. On Linux, the terminal is already central.
Learn a dozen basic commands: moving between folders, listing files, creating and deleting them, and viewing a file's contents. Knowing where you are in the folder structure prevents many beginner errors.
A package manager installs and updates software with one command instead of downloading installers by hand. On macOS the standard is Homebrew. On Windows, winget is built into current versions, and Chocolatey and Scoop are alternatives. Linux distributions have their own, such as apt on Ubuntu and Debian or dnf on Fedora. Using a package manager makes your setup repeatable: you can list the tools you need and reinstall them on a new computer in minutes.
Visual Studio Code is free, runs on all three major systems and supports almost every language through extensions. It has a built-in terminal, Git integration and debugger. JetBrains IDEs, such as IntelliJ IDEA, PyCharm and WebStorm, offer deeper analysis for specific languages, with free editions for some. Others prefer lightweight editors such as Vim, Neovim or Sublime Text.
Whichever you choose, install three kinds of extensions for your language: language support (autocomplete and error highlighting), a formatter that styles code automatically, such as Prettier for JavaScript or Black for Python, and a linter that warns about likely bugs, such as ESLint or Ruff. Enable "format on save" so you never think about spacing again.
Install Git with your package manager, then set your name and email, which are recorded with every commit. Create an SSH key and add it to GitHub, GitLab or Bitbucket so you can push code without typing a password. Even for solo projects, Git gives you a safety net: you can try risky changes and return to a working version at any time.
Different projects often need different versions of the same language. An old project might need Node.js 18 while a new one uses Node.js 22. Installing a language directly on the system allows only one version and can conflict with tools the operating system relies on. A version manager solves this by installing several versions side by side and switching between them per project:
Most of these read a small file in the project folder, such as .nvmrc or .python-version, so the correct version is selected automatically when you enter the folder.
Libraries a project uses should be installed for that project only, never globally. In JavaScript, npm, pnpm or yarn install packages into the project's node_modules folder and record them in package.json. In Python, create a virtual environment per project with the built-in venv module, or let tools such as uv or Poetry manage it, and record dependencies in requirements.txt or pyproject.toml.
Commit the lock file (such as package-lock.json) to Git. It records the exact version of every package, so everyone who installs the project gets the same code. Do not commit the installed packages themselves; list folders like node_modules and .venv in a .gitignore file.
Database passwords, API keys and other settings that differ between your laptop and the live server should never be written into the code. The common convention is a .env file in the project folder containing lines like DATABASE_URL=..., loaded by the application at start-up. Add .env to .gitignore so it is never committed, and commit a .env.example file with the variable names but no real values, so others know what to fill in. Leaked keys in public repositories are a frequent cause of security incidents, and automated bots scan GitHub for them constantly.
Many applications need a database, a cache or a message queue. Installing PostgreSQL or Redis directly works, but different projects may need different versions. Docker runs each service in an isolated container, and a compose.yaml file can describe all the services a project needs so that one command starts them. Containers can be deleted and recreated in seconds without leaving traces on your system. For some teams, dev containers go further: the whole environment, including the language and tools, runs inside a container defined in the repository, and editors such as VS Code connect to it directly.
Write a short README that lists what to install and the commands to start the project, then test it by following it yourself on a clean folder. Add scripts for common tasks, such as starting the development server, running tests and formatting code, for example in package.json or a Makefile. The test of a good environment is simple: a new team member should be able to clone the repository and run the project the same day.
Setting up an environment properly takes an hour or two the first time. That investment pays back every day, because you spend your time writing code instead of fighting tools.
Grade 10 Math: Functions and Reasoning - Quiz
1170 questions