Setting Up a Development Environment From Scratch

A working environment, a codebase you will keep, and the commands that get Linux from a fresh install to ready. These are my own setup notes.

What an IDE actually is

An integrated development environment is an application that helps you build other applications. The point of one is that it puts every tool you need behind a single interface instead of spreading them across half a dozen programs.

Underneath, though, it is a text editor. You will move to more capable editors as you go — and which one depends on the language you are writing and on whether you want the editor to compile and test your code — but the thing you are setting up is a place to write code and a place to run it.

Step 1: create a codebase

Open your file manager and make a new folder to keep every programming file in.

This is also a good moment to get clear on what a root directory is, because it comes up constantly. Your root directory is where files begin. On Windows, everything is saved under the C: drive, so C:\ is the root.

I would recommend keeping personal data on a drive that is not running your operating system — it reduces what you lose when something fails. That would make your root something more like D:\MyCodebase.

Keeping it simple, create the folder in your root so it looks like:

C:\MyCodebase

Codebase is a term you will hear on every team you join. It just means the collection of code and scripts belonging to a particular project. A common task for a new hire is to read the company's codebase and its coding standards, so it is worth building your own now — somewhere to add to, organise and grow.

The reason to keep one is what I think of as a once-and-done approach: you work something out by building it, then save it as a template to reuse. It is the thing I most wish I had done at the start, because without it you solve the same problem several times over and never notice you are doing it. It also means you never open a blank screen with no idea what to do — you start from something you already made work.

Step 2: write the first file

Open the simplest text editor you have. On Windows that is Notepad. It has none of the features you will later depend on, which is exactly why it is a good place to see what an IDE is underneath.

Type a minimal page:

<!DOCTYPE html>
<html>
  <head>
    <title>My first page</title>
  </head>
  <body>
    <h1>Hello</h1>
  </body>
</html>

Save it into your codebase as index.html. The name matters: the main page of a website is always index.html, because that is the file a web server looks for when someone asks for a directory rather than a specific page.

Open it in a browser. That is a web page, and you wrote it in Notepad.

Step 3: move to Linux

Linux gives you more control over the machine, and it is the system you will be working on most of the time once you are programming for a living. Running it in a virtual machine means you do not have to give up the computer you already use.

Once it is set up, the advice I was given and would repeat is to work inside Linux from then on rather than treating it as somewhere you visit.

Step 4: update, then install the tools

Open a terminal with Ctrl + Alt + T.

Update the system first:

sudo apt update
sudo apt upgrade

Install Google Chrome:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
rm google-chrome-stable_current_amd64.deb
google-chrome

Install Visual Studio Code:

wget -O code-latest.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64'
sudo apt install ./code-latest.deb
rm code-latest.deb
code

The rm line in each is just tidying up the installer you no longer need, and the last line launches the program so you can confirm it actually installed.

The rest of the toolkit

That is a working environment: somewhere to write code, somewhere to run it, version control, and a place to keep what you build.