AI Coding Cheatsheet
What works in May 2024 | Download PDF
First presented by Ray Myers at Mendercon 2024, questions and suggestions welcome as we flesh this out!
Low-Risk Code Gen
- Human in the loop
- Prototyping / Greenfield
- Boilerplate
- Test-Driven Development (Ping Pong “Pairing”)
Insight
- Question answering (kinda)
- Semantic Search on docs and code
- Commit Messages / PR summary
- Low-level doc generation
- Troubleshooting help (stack traces)
Safe Modifications
- Tool-assisted refactoring
- Adding type-hints
- Backfilling Tests
- Dark launches
- Formal Methods
Incantations
- Command-line invocations
- Regex (Regular Expressions)
- LaTeX
- Markup and styling
- Repetitive edits
Hazards
- LLM-output is untrusted
- Vendor data risk
- Magical thinking
- Anthropomorphizing
- Unsustainable practices
- Ignoring the craft
Making It Better
- Prompting
- Small Steps
- Tools / Feedback
- RAG (Retrieval Augmented Generation)
- Fine-tuning
- Better models ($$$)
Learn More
Practical Examples
- 19 Tips for Coding Faster with ChatGPT - Daniel Feldman
- Can AI help me refactor legacy code? - Nicolas Carlo
- Can AI help me write tests on legacy code? - Nicolas Carlo
Going Deeper
- Learn Prompting - Prompting tutorial
- The Mechanized Mending Manifesto
- Turbo Refactoring