Programming guide

Write a clear prompt so AI writes useful code

Write a structured prompt with goal, context, constraints and output format so an AI assistant produces code that fits your project first time.

Estimated time: 10–20 minutesUpdated: 28 September 2026

Use this guide whenever you ask an AI assistant to write or change code and keep getting answers that do not fit. Have a short description of your project, the language and framework you use and any relevant code or error messages ready.

Step by step

  1. State the goal in one sentence

    Start with what the code should do from the user's point of view, for example: add a form that saves a customer's name and email. Avoid vague requests like make it better. A clear goal stops the AI guessing.

Members

The rest of this guide is for members

This guide continues with 4 more sections. Unlock this guide and all 207 ABCDayZ guides with checklists, troubleshooting and next steps.

£3.99 for 1 month or £29 for 12 months. One payment, no automatic renewal.

Unlock all guides

Already a member on another device? Open your personal access link. Bought Programming with AI? Your first month is included.