Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Gopher's Guide to Vibe Coding

A Gopher's Guide to Vibe Coding

As vibe coding quickly becomes the new buzzword we Gophers could not be left out of this party. In this talk I'm going to share my experiences while vibe coding Go applications. The goal of this talk is to evaluate the "state of art" of vibe coding for production workloads, while proposing a method to improve on its limitations, including the use of tools to address some of the current models' limitations. We are going to discuss the pros and cons of the experience and share tips on how to improve the code generated with emphasis on idiomatic code, maintainability and testability.​

This talk was presented at Gophercon UK on Aug 15, 2025

Avatar for Daniela Petruzalek

Daniela Petruzalek

August 16, 2025
Tweet

More Decks by Daniela Petruzalek

Other Decks in Programming

Transcript

  1. Who am I? Developer Relations Engineer at Google, originally from

    Brazil 󰎙, but living in the UK 󰏅 since 2019. My background is in backend and data engineering. Have been doing Go development (on-and-off) since 2017.
  2. Agenda Introduction to Vibe Coding Types of Coding Assistants AI

    Assisted Developer Workflow Live Demo: Jules & Gemini CLI Practical Tips & A Peek at the Future
  3. A coding approach that relies on LLMs to generate working

    code by providing natural language descriptions rather than manually writing it
  4. Types of Coding Assistants Code Completion Contextual Chat Coding Agent

    Autonomous Traditional IDE autocomplete with “Ghost Code” Gemini Code Assist or GitHub Copilot on VS Code Conversational interfaces on the IDE via chat add-on Gemini Code Assist or GitHub Copilot Chat on VS Code “Fire-and-forget”: completely async Google Jules, Devin AI, GitHub Copilot Agent CLI interfaces with a REPL, context is the entire project, “pairing” Gemini CLI, Claude Code, Aider
  5. Biggest Challenges Today • LLMs are non-deterministic by nature •

    LLM generated code is mostly “not great” • Prototypes and full systems are different beasts • Coding environments are not entirely fit for purpose • Code correctness - does it do what is supposed to do? • How to ensure code quality and maintainability over time
  6. Vibe Coding with the “vanilla” models can be equal parts

    amazing and infuriating… Can we make it better?
  7. Vibe Coding is “TDD on Steroids” • RED: Start with

    a feature request (failing test) ◦ Keep features small ◦ Reduce ambiguity => improve the prompt • GREEN: Make it work (make the test pass) ◦ No code unrelated to the feature should be written • Refactor (only allowed on green) ◦ Code review, test coverage, linters, documentation, …
  8. Improving Response Quality • Give the model more up to

    date / relevant information ◦ Prompt / Context Engineering ◦ Retrieval Augmented Generation (RAG) • Grounding with Tool Calling (e.g. Web Search, APIs) ◦ Model Context Protocol (MCP) ◦ Not only retrieve data, but perform actions
  9. My Current Workflow Business Value Technical Certainty High High Low

    TOP PRIORITY NOT DOING NEEDS RESEARCH NICE TO HAVE
  10. My Current Workflow Business Value Technical Certainty High High Low

    Gemini CLI NOT DOING (or Jules) Gemini CLI + Deep Research Jules SYNC ASYNC SYNC + ASYNC ASYNC
  11. A Good Prompt Template 1. Task: description of what you

    want to achieve, including context, constraints, etc. For example: use SDK x, library y. 2. References: links to documentation, reference implementations, etc. 3. Testing: how to test the successful implementation; example commands with output.
  12. The Prompt Your task is to create a Model Context

    Protocol (MCP) server to expose a “hello world” tool. For the MCP implementation, you should use the official Go SDK for MCP and use the stdio transport. Read these references to gather information about the technology and project structure before writing any code: - https://github.com/modelcontextprotocol/go-sdk/blob/main/README.md - https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle - https://go.dev/doc/modules/layout To test the server, use shell commands like these: ( echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' ; echo '{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}'; echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'; ) | ./bin/godoctor
  13. Typical Error Modes Fully Recoverable Intervention Full Stop! Typos, compilation

    errors (e.g. syntax), edit errors (e.g. duplicate lines) Model usually recovers on its own given enough time Wrong reasoning (e.g. tests vs code), placeholder code, hallucinations Model might recover, but you will be better off giving it a nudge Refactor loops; insisting on not following directions Model will not recover and potentially spend lots of $$$. Take over and course correct
  14. Tips for a Successful Experience • Don't be afraid to

    interrupt the AI. The AI will sometimes propose actions or code that you don't agree with. Cancel and course correct. • Encourage tool use. If the AI seems lost or is making up information, encourage it to use its available tools to do web searches, look for examples, inspect files, etc. • Have you tried turning it off and on again? In the (not so) rare case that the AI is misbehaving, clearing the context and giving it a clean start with a better prompt is often the best option.
  15. A Peek at the Future of Go Go SDK for

    MCP: https://github.com/modelcontextprotocol/go-sdk MCP Support for gopls: https://tip.golang.org/gopls/features/mcp Google Gen AI SDK: https://github.com/googleapis/go-genai OpenAI Go API Library: https://github.com/openai/openai-go Gemini OpenAI Compatibility: https://ai.google.dev/gemini-api/docs/openai
  16. Useful MCP Servers Playwright: navigates web pages, takes screenshots, …

    https://github.com/microsoft/playwright-mcp Context7: retrieves documentation from a crowdsourced repo https://context7.com/ GoDoctor: Go coding assistant https://github.com/danicat/godoctor Speedgrapher: prompts and tools for technical writing https://github.com/danicat/speedgrapher
  17. What About Building Your Own? How to Build a Coding

    Assistant with Gemini CLI, MCP and Go | Google Codelabs
  18. In Summary For successful vibe-coding sessions: • Develop your prompting

    (and story writing) skills • Prioritise your tasks and use asynchronous coding for the less critical ones • Actively manage your context window • Equip your toolbox with MCP servers: find what is useful or build your own (it is easy and fun to do)