---
title: "How to Read a G-Code Print in an Interview Test"
description: "Handed a program printout in an interview? Read it in a fixed order: units and mode first, then setup, then the moves. Here is the method that keeps you calm."
url: https://gcodepractice.com/journal/how-to-read-a-g-code-print-for-an-interview-test/
canonical: https://gcodepractice.com/journal/how-to-read-a-g-code-print-for-an-interview-test/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-06-02
updated: 2026-06-02
category: "Practice"
tags: ["interview", "reading", "program", "test prep"]
lang: en
---

# How to Read a G-Code Print in an Interview Test

> **TL;DR** When an interviewer hands you a G-code printout, read it in a fixed order rather than line by line in a panic: first the setup block (units G20/G21, mode G90/G91, work offset G54), then the spindle and tool setup, then the motion line by line, watching the modal state carry forward. Narrate as you go. A fixed scanning order plus fluent code recall makes reading a print straightforward.

Being handed a program printout and asked "what does this do?" is a classic interview moment. The trick is to read it in a fixed order rather than panicking down the page line by line. A program has a structure, and reading it in that structure makes it explain itself.

## Read it in this order

1. **The setup block.** Units (`G20` or `G21`), positioning mode (`G90` or `G91`), and the work offset (`G54` to `G59`). These govern everything after, so read them first.
2. **Spindle and tool.** The tool call and tool change, and the spindle start (`M03`) with its speed.
3. **The motion, line by line.** Now read the moves, watching the modal state carry forward, a `G01` stays active until changed, as covered in [modal vs non-modal G-codes](/journal/modal-vs-non-modal-g-codes/).
4. **The ending.** Spindle off (`M05`), retract, and program end (`M30`).

Narrate as you go. Saying "millimeters, absolute, work offset 1, tool 2, spindle on at 1500" out loud shows the interviewer your method, not just your answer.

## What to read at each stage

| Stage | Look for | Codes |
| --- | --- | --- |
| Setup | Units, mode, offset | `G20`/`G21`, `G90`/`G91`, `G54` |
| Spindle/tool | Tool change, spindle on | `M06`, `M03`, `S` |
| Motion | Rapids and feeds | `G00`, `G01`, `G02`/`G03` |
| Ending | Spindle off, end | `M05`, `M30` |

## Practice the method

The order only works if each line is instant, so build recall of the [common G-codes](/journal/common-g-codes-for-cnc-beginners/) and [common M-codes](/journal/common-m-codes-for-cnc-beginners/) with [beginner CNC code practice](/journal/beginner-cnc-code-practice/), and practice on [the most basic G-code program example](/journal/most-basic-g-code-program-example-ever/). For the surrounding interview, see [will a machine shop test my G-code knowledge](/journal/will-a-machine-shop-test-my-g-code-knowledge/). A free tool like [G-Code Sprint](/g-code-practice/) makes each line instant so the order does the rest.

## Bottom line

Read a G-code print in a fixed order: setup first, then spindle and tool, then motion line by line, then the ending. Narrate as you go. A consistent order plus fluent recall turns a scary printout into a straightforward read.

## Sources

- [LinuxCNC G-code reference](https://linuxcnc.org/docs/html/gcode/g-code.html)
- [Wikipedia: G-code](https://en.wikipedia.org/wiki/G-code)
- [CNCCookbook: G-code and M-code cheat sheet](https://www.cnccookbook.com/g-code-m-code-cnc-list-cheat-sheet/)

## Frequently asked questions

### How do you read a G-code program quickly?
In a fixed order: first the setup block (units, positioning mode, work offset), then the spindle and tool setup, then the motion line by line. Track the modal state as it carries forward. A consistent order beats reading randomly under pressure.

### What should I look for first in a G-code printout?
The setup: units (`G20` or `G21`), positioning mode (`G90` or `G91`), and the work offset (`G54` to `G59`). These govern how every following line is interpreted, so reading them first means the rest makes sense.

### How do I get better at reading G-code for an interview?
Practice scanning real programs in the same order every time, and drill the codes so each line is instant. A free tool like G-Code Sprint builds the recall; then reading a print is just applying it in order.

*G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.*

---

Source: https://gcodepractice.com/journal/how-to-read-a-g-code-print-for-an-interview-test/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
