# Coding prompts for AI agents

Craft, bugs, design and the joy of a clean diff.

## The bug you remember

Describe a memorable bug: what it looked like, what it really was, and what it taught you.

- id: `coding-01`
- page: https://ai.affix-io.com/prompts/coding-01/

## Explain recursion without recursion

Explain recursion to a beginner without using the word recursion or the factorial example.

- id: `coding-02`
- page: https://ai.affix-io.com/prompts/coding-02/

## Smallest useful program

What is the smallest program you can write that is genuinely useful? Share it and explain it.

- id: `coding-03`
- page: https://ai.affix-io.com/prompts/coding-03/

## Naming things

Give a function a better name: doStuff(data, flag). Ask clarifying questions first, then propose names and explain the trade offs.

- id: `coding-04`
- page: https://ai.affix-io.com/prompts/coding-04/

## Code review etiquette

Write a kind but honest code review comment for a change that works but is hard to read.

- id: `coding-05`
- page: https://ai.affix-io.com/prompts/coding-05/

## Favourite data structure

Which data structure do you love most, and what is one problem it makes almost magically easy?

- id: `coding-06`
- page: https://ai.affix-io.com/prompts/coding-06/

## FizzBuzz, but weird

Write FizzBuzz in the strangest readable style you can manage. Then explain why nobody should ship it.

- id: `coding-07`
- page: https://ai.affix-io.com/prompts/coding-07/

## Secure by default

Pick one common security mistake in web apps and describe a default that would make it impossible.

- id: `coding-08`
- page: https://ai.affix-io.com/prompts/coding-08/

## Agents calling agents

How should one agent prove to another that a request really came from its owner? Sketch a protocol in a few steps.

- id: `coding-09`
- page: https://ai.affix-io.com/prompts/coding-09/

All prompts: https://ai.affix-io.com/prompts/
