Learn Go with AI · Free online book

Introduction

In short: Why learn to write Go yourself when an AI can write it in seconds? This introduction explains who the book is for, what you'll build (Tracker, a small expense tracker) and how every chapter uses the SURE loop: Specify, Use the AI, Review, Explain.

You can ask an AI to write a Go program today, and a few seconds later you’ll have one. So why learn to write it yourself?

Because the AI doesn’t have to live with the code. You do. When the program breaks next week, when someone asks “why does it do that?”, or when the AI confidently gets something wrong, a “Sure!” won’t help. Someone has to understand the code, and I want that someone to be you.

Why I wrote this book

I’ve been writing code for more than 20 years, in C++, Java, Ruby on Rails and Go. Looking back, I was lucky to start when help was hard to find. There was no AI to ask, so when something broke, I had to dig through the code myself until I understood how it was built. It was slow, and often frustrating. But it gave me a skill I rely on every day now: when an AI writes code for me, I can tell whether it’s right, and whether it will cause problems later.

Developers starting today have a very different experience. The AI writes the code, it usually works, and features ship fast. That’s a real gift, but it has a hidden cost. Small design mistakes and quick decisions pile up, and nobody notices until the code is hard to change. By then, fixing it is painful and expensive.

I see this when I ask junior developers, “Why did you write it this way?” Sometimes the honest answer is, “I don’t know. The AI wrote it.” That isn’t their fault. The tools changed faster than the way we learn.

I still believe the fundamentals matter. You need to understand the code you keep. That doesn’t mean giving up AI. It means keeping it as a tool in your hands, instead of handing it everything and hoping for magic.

So I turned what I do into a few simple steps that any new developer can follow: the SURE loop. Specify, Use the AI, Review, Explain. It lets you build real things with AI and get a little smarter every time you do. This book teaches it through Go, one chapter at a time.

Who this book is for

This book is for junior developers, and for anyone newer to programming, who want to learn Go with an AI assistant from the first page. You don’t need to know Go. If you’ve written a little code in another language, that helps, but the book walks you through every step, starting with installing Go.

If you already program for a living and want a way to learn a new language with AI without handing it your judgment, you’re welcome too.

What you’ll build

You build one project through the whole book: Tracker, a small expense tracker. It uses only Go’s standard library, with no framework and no database server.

By the end, you’ll have a tested, concurrent web API, organized into packages, with one command that checks it all, and you’ll be able to explain every line of it.

How to use this book

Every chapter follows one loop, the SURE loop: Specify what “done” means, Use the AI, Review the code, and Explain it in your own words. Chapter 1 shows you how it works, and Appendix C puts it on two facing pages you can keep open while you work. There’s one rule:

Each chapter has the same parts: a Mission (the next piece of Tracker), Must know (a few facts the book states itself, so you can check the AI against them), the four SURE steps, and an optional Practice exercise. The AI’s job grows as you do. It starts as your tutor, becomes your pair, and ends as the implementer, while you write the tests and review its code.

A few tips:

  • Read the chapters in order. Each one builds on the Tracker you finished in the one before.
  • Type the code yourself, especially in the early chapters. It feels slow, and that’s on purpose.
  • Expect the AI’s answers to differ from mine. Its wording changes every time. The Must know facts and your tests are what you check it against.
  • Type long lines as one line. On a small screen, a long command or line of code may wrap onto the next line. Type it as one line.
  • Try the Practice exercises before you look anything up. The answers aren’t in the book. They’re on the web at bogie-go.com/go-with-ai/answers.

The appendices are there when you need them. Appendix A sets up your tools and your AI assistant, Appendix B covers just enough Git, Appendix C is the SURE loop at a glance, and Appendix D collects every review checklist in one place.

What you need

You can read the whole book online at bogie-go.com/go-with-ai.

The AI will say “Sure!” to almost anything you ask. This book teaches you to ask it back, and to mean it when your answer is yes. Let’s start.

Roonglit Chareonsupkul
Bangkok, November 2026