FORM NOT VOID, MIND NO CORE

Chapter 2: Preparation

2026.08.10

Sharpening the axe never delays the woodcutting. Before you begin AI coding, prepare your tools and environment first.

2.1 What You Need

To get started with AI coding, you need only three things:

  1. An AI coding tool—This book uses Claude Code as its working example.
  2. A code editor—VS Code, or any editor you are comfortable with.
  3. A terminal (command-line tool)—For running commands.

If you already use these tools in your day-to-day development work, you can skip most of this chapter and jump straight to Section 2.5.

2.2 Installing the AI Coding Tool

What Is Claude Code

Claude Code is an AI coding assistant developed by Anthropic. It is not a plugin, but an "AI programming partner" that runs in your terminal. You tell it what you want to do in natural language, and it can understand your project structure, read files, write code, and run commands.

Installation Steps

The steps below use macOS as an example. Windows and Linux are installed similarly; for the specific differences, please refer to the official documentation.

Step 1: Install Node.js

AI coding tools iterate quickly; installation methods and version requirements follow the official documentation. The steps below reflect the generic installation path at the time of writing and may differ from the latest method you encounter (for example, an official native installer that does not depend on Node.js is now available).

Claude Code requires Node.js 18 or higher. If you have not installed it yet:

# Install using Homebrew (macOS)
brew install node

# Verify the installation
node --version
# Output should resemble: v18.17.0 or higher

Step 2: Install Claude Code

# Install globally
npm install -g @anthropic-ai/claude-code

# Verify the installation
claude --version

Step 3: Obtain an API Key

  1. Visit console.anthropic.com.
  2. Sign up for or log in to your account.
  3. Create a new key on the API Keys page.
  4. Copy the key and store it somewhere secure.

Step 4: Configure the API Key

# Set the environment variable
export ANTHROPIC_API_KEY=your_key_here

It is recommended to add this line to your shell configuration file (~/.bashrc, ~/.zshrc, and so on) so that it is configured automatically every time you open a terminal.

Verifying the Installation

Create an empty directory, enter it, and run:

mkdir hello-ai
cd hello-ai
claude

If you see the Claude Code welcome message, the installation was successful.

2.3 Choosing a Project Directory

The AI coding tool works in your current directory. It is recommended that:

  • Each project gets its own dedicated directory—Do not mix all your code together.
  • The project directory should be a git repository—So you can always roll back to an earlier version.
  • Keep directory names clear and concise—Use English, with no spaces.
# Good practice
mkdir my-todo-app
cd my-todo-app
git init

2.4 Understanding Your Workspace

Once you launch Claude Code, you will see a terminal interface divided into these main areas:

  1. Input area—Enter your requirements here, as if typing in a chat window.
  2. Output area—AI responses, generated code, and command execution results are displayed here.
  3. File area—The AI can read from and modify any file in your project directory.

You can converse with it as you would with a colleague. Describe your requirements in natural language, and it will understand and carry them out.

2.5 Three Basic Principles

Before you begin, keep these three principles in mind. They will spare you a great deal of trouble.

Principle 1: Think Before You Act

This is the most important principle of all. Why? Because the AI cannot read your mind. When you say "build an order system," you have a complete business flow in your head—who places the orders, what an order contains, how the status progresses. But all the AI sees is a single sentence; it can only "guess" the most likely implementation from its training data. And the guess may differ from what you want by a mile.

So before telling the AI to "start writing code," ask yourself three questions:

  1. What am I doing? (Is the requirement clear?)
  2. How will I do it? (What technology, what structure?)
  3. How will I know when it is done? (What are the acceptance criteria?)

If you cannot answer these three questions, you are not ready yet. Take the time to think it through; do not rush the AI into writing code. These five minutes of thought can save you five hours of rework later.

Principle 2: Move in Small, Fast Steps

Do not ask the AI to complete an enormous feature all at once. Break it into several small steps, and verify each step as soon as it is done.

Why? Because the more complex the task, the higher the chance of error. A "user registration feature" may involve database migration, API endpoints, parameter validation, frontend forms, and error handling. If you let the AI write all of it in one go and then verify, you might discover that the API's response format does not match what the frontend expects, or that the database field naming diverges from the backend code style. At that point, changing anything sets off a chain reaction across the whole system.

If you break it into 5 small milestones, each one can be completed and verified in about 10 minutes—even if a milestone goes wrong, you lose at most 10 minutes of work, not an entire feature's worth of code.

Principle 3: Verification Is Not Optional

AI-generated code may look right but harbor hidden problems. Because the AI is a probabilistic model, every token it produces is "the one with the highest probability in the current context." This means its code is almost always syntactically correct, yet logical errors, edge cases, and security risks are not visible at a glance.

Just as you would not sign for a package without checking it first, do not commit AI-generated code without verifying it. Verification is not mistrust—it is basic engineering discipline.


Chapter Summary

With your preparation done, you will not be interrupted during the development that follows. The three basic principles are the most important safeguards for a beginner—think before you act, move in small fast steps, and never skip verification—and each one rests on the underlying logic of how AI coding works. Now that your tools and environment are ready, the next chapter takes up the core method of this book: the Six-Step Workflow.