Skip to content

16.1   Setting up a programming environment

16.1.1   Install an IDE

We recommend VS Code, a lightweight, open-source integrated development environment (IDE). Visit the VS Code website, then download and install the version for your operating system.

Downloading VS Code from the official website

Figure 16-1   Downloading VS Code from the official website

VS Code has an extensive ecosystem of extensions that support running and debugging code in most programming languages. For example, installing the Python Extension Pack lets you debug Python code. The installation steps are shown in Figure 16-2.

Installing VS Code extensions

Figure 16-2   Installing VS Code extensions

16.1.2   Install a language environment

1.   Python

  1. Download and install Miniconda3. Python 3.10 or later is required.
  2. Search for python in the VS Code Extensions Marketplace and install Python Extension Pack.
  3. (Optional) Run pip install black in a terminal to install a code formatter.

2.   C/C++

  1. On Windows, install MinGW (setup guide). macOS comes with Clang, so no installation is needed.
  2. Search for c++ in the VS Code Extensions Marketplace and install C/C++ Extension Pack.
  3. (Optional) Open Settings, search for the Clang_format_fallback Style formatting option, and set it to { BasedOnStyle: Microsoft, BreakBeforeBraces: Attach }.

3.   Java

  1. Download and install OpenJDK (a version later than JDK 9 is required).
  2. Search for java in the VS Code Extensions Marketplace and install Extension Pack for Java.

4.   C#

  1. Download and install .NET 8.0.
  2. Search for C# Dev Kit in the VS Code Extensions Marketplace and install C# Dev Kit (setup guide).
  3. You can also use Visual Studio (installation guide).

5.   Go

  1. Download and install Go.
  2. Search for go in the VS Code Extensions Marketplace and install Go.
  3. Press Ctrl + Shift + P to open the Command Palette, enter go, select Go: Install/Update Tools, then select and install all the tools.

6.   Swift

  1. Download and install Swift.
  2. Search for swift in the VS Code Extensions Marketplace and install Swift for Visual Studio Code.

7.   JavaScript

  1. Download and install Node.js.
  2. (Optional) Search for Prettier in the VS Code Extensions Marketplace and install this code formatter.

8.   TypeScript

  1. Follow the JavaScript environment setup steps.
  2. Install TypeScript Execute (tsx).
  3. Search for typescript in the VS Code Extensions Marketplace and install Pretty TypeScript Errors.

9.   Dart

  1. Download and install Dart.
  2. Search for dart in the VS Code Extensions Marketplace and install Dart.

10.   Rust

  1. Download and install Rust.
  2. Search for rust in the VS Code Extensions Marketplace and install rust-analyzer.
Share your insights, questions, or suggestions in the comments