hello-algo/en/docs/chapter_appendix/installation.md

3.9 KiB

Programming environment setup

Install IDE

We recommend using the open-source, lightweight VS Code as your local Integrated Development Environment (IDE). Visit the VS Code official website and choose the version of VS Code appropriate for your operating system to download and install.

Download VS Code from the official website

VS Code has a powerful extension ecosystem, supporting the execution and debugging of most programming languages. For example, after installing the "Python Extension Pack," you can debug Python code. The installation steps are shown in the following figure.

Install VS Code Extension Pack

Install language environments

Python environment

  1. Download and install Miniconda3, requiring Python 3.10 or newer.
  2. In the VS Code extension marketplace, search for python and install the Python Extension Pack.
  3. (Optional) Enter pip install black in the command line to install the code formatting tool.

C/C++ environment

  1. Windows systems need to install MinGW (Configuration tutorial); MacOS comes with Clang, so no installation is necessary.
  2. In the VS Code extension marketplace, search for c++ and install the C/C++ Extension Pack.
  3. (Optional) Open the Settings page, search for the Clang_format_fallback Style code formatting option, and set it to { BasedOnStyle: Microsoft, BreakBeforeBraces: Attach }.

Java environment

  1. Download and install OpenJDK (version must be > JDK 9).
  2. In the VS Code extension marketplace, search for java and install the Extension Pack for Java.

C# environment

  1. Download and install .Net 8.0.
  2. In the VS Code extension marketplace, search for C# Dev Kit and install the C# Dev Kit (Configuration tutorial).
  3. You can also use Visual Studio (Installation tutorial).

Go environment

  1. Download and install go.
  2. In the VS Code extension marketplace, search for go and install Go.
  3. Press Ctrl + Shift + P to call up the command bar, enter go, choose Go: Install/Update Tools, select all and install.

Swift environment

  1. Download and install Swift.
  2. In the VS Code extension marketplace, search for swift and install Swift for Visual Studio Code.

JavaScript environment

  1. Download and install Node.js.
  2. (Optional) In the VS Code extension marketplace, search for Prettier and install the code formatting tool.

TypeScript environment

  1. Follow the same installation steps as the JavaScript environment.
  2. Install TypeScript Execute (tsx).
  3. In the VS Code extension marketplace, search for typescript and install Pretty TypeScript Errors.

Dart environment

  1. Download and install Dart.
  2. In the VS Code extension marketplace, search for dart and install Dart.

Rust environment

  1. Download and install Rust.
  2. In the VS Code extension marketplace, search for rust and install rust-analyzer.