Here’s a breakdown of Simon Willison’s article on effectively using LLMs for coding:
Keywords: LLMs, AI-assisted programming, code generation, software development, prompt engineering
Overview: In this article, Simon Willison shares his experiences and insights on how to effectively use Large Language Models (LLMs) for coding. He emphasizes that coding with LLMs is not always easy and requires a strategic approach. He provides practical tips, including setting realistic expectations, managing context, providing clear instructions, and rigorously testing the generated code. Willison argues that LLMs can significantly boost development speed and amplify existing expertise, enabling developers to tackle more ambitious projects. He also touches on using LLMs to understand existing codebases.
Section Summaries:
- Set reasonable expectations: LLMs are advanced autocomplete tools, not perfect project implementers. Use them to augment your skills, like an over-confident pair programmer, but be aware of their potential for mistakes.
- Account for training cut-off dates: LLMs have a training cut-off date, affecting their knowledge of libraries. Consider this when choosing libraries, favoring stable and popular ones, and provide recent examples for newer libraries.
- Context is king: Managing the context of your conversation with the LLM is crucial. Start new conversations to reset context, and use tools that allow you to pre-populate context with relevant code and documentation.
- Ask them for options: Use LLMs to explore potential implementation options and research available libraries. Be mindful of the training cut-off date when evaluating suggestions.
- Tell them exactly what to do: For production code, treat the LLM like a digital intern, providing detailed instructions and function signatures. This approach saves time and ensures code correctness.
- You have to test what it writes!: Testing the generated code is essential to ensure it works correctly. This is a critical responsibility that cannot be outsourced to the machine.
- Remember it’s a conversation: LLMs can refactor code without complaint, so use follow-up prompts to refine the initial output. A bad initial result is a starting point for improvement.
- Use tools that can run the code for you: Tools that can run and iterate on code in a safe sandbox are invaluable. This allows for rapid experimentation and debugging.
- Vibe-coding is a great way to learn: Embrace “vibe-coding” to explore the capabilities of LLMs and build intuition for what works. Throw absurd ideas at them and iterate until they almost work.
- A detailed example using Claude Code: Willison provides a detailed example of using Claude Code to build a colophon page for his tools website. He demonstrates his authoritarian prompting process and highlights the speed of development.
- Be ready for the human to take over: LLMs are not a replacement for human intuition and experience. Be prepared to step in and finish the project when necessary.
- The biggest advantage is speed of development: LLMs significantly boost development speed, enabling developers to ship projects they wouldn’t have time for otherwise. This accelerates learning and allows for more experimentation.
- LLMs amplify existing expertise: Effective use of LLMs relies on existing coding experience and knowledge of relevant tools and technologies. They amplify existing expertise rather than replacing it.
- Bonus: answering questions about codebases: LLMs are great at answering questions about code. Dump the code into a long context model and start asking questions to quickly understand a new codebase.
Related Tools:
- ChatGPT: https://chatgpt.com/
- Claude: https://claude.ai/
- Claude Projects
- Cursor: https://www.cursor.com/
- VS Code Copilot
- ChatGPT Code Interpreter
- Claude Artifacts
- ChatGPT Canvas
- Windsurf: https://codeium.com/windsurf
- Aider: https://aider.chat/
- Claude Code: https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview
- files-to-prompt: https://github.com/simonw/files-to-prompt
- LLM: https://llm.datasette.io/
- llm-gemini: https://github.com/simonw/llm-gemini
- monolith: https://github.com/Y2F/monolith
References:
- AI-enhanced development makes me more ambitious with my projects: https://simonwillison.net/2023/Mar/27/ai-enhanced-development/
- Everything I built with Claude Artifacts this week: https://simonwillison.net/2024/Oct/21/claude-artifacts/
- Using custom workflows with GitHub Pages: https://docs.github.com/en/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages
- Hallucinations in code: https://simonwillison.net/2025/Mar/2/hallucinations-in-code/#qa
- JavaScript OCR application: https://simonwillison.net/2024/Mar/30/ocr-pdfs-images/
- Andrej Karpathy coined the term vibe-coding: https://simonwillison.net/2025/Feb/6/andrej-karpathy/
- files-to-prompt tool: https://simonwillison.net/2024/Apr/8/files-to-prompt/
- three more examples in this recent post: https://simonwillison.net/2025/Feb/14/files-to-prompt/
- deeply inhuman: https://simonwillison.net/2025/Mar/2/kellan-elliott-mccrea/
- boring technology: https://boringtechnology.club/
- dogfooding: https://en.wikipedia.org/wiki/Eating_your_own_dog_food
Original Article Link: https://simonwillison.net/2025/Mar/11/using-llms-for-code/
source: https://simonwillison.net/2025/Mar/11/using-llms-for-code/