Appearance
Coding Assistance
AI models are powerful coding partners. Here's how to get the most out of them.
Recommended Models for Coding
- Claude Sonnet 4.6 — Best for complex architecture, code review, and long files
- GPT-5.5 — Strong at debugging and multi-step reasoning
- DeepSeek V4 Flash — Excellent quality at lower points cost
Effective Prompting Patterns
Explain What You're Building
Give context before the code question.
I'm building a Node.js REST API with Express and PostgreSQL. I need to implement JWT authentication middleware that validates tokens and attaches the user to the request object.
Paste the Relevant Code
Don't ask the model to guess. Include the code that's relevant.
Here's my current function. It works but is slow for large datasets. How can I optimize it?
js[your code here]
Ask for Explanations
Rewrite this function and explain each change you made.
Debug with Error Messages
This code throws the following error. What's causing it and how do I fix it?
Error: Cannot read properties of undefined (reading 'map')
Code Review
Review this code for security vulnerabilities, edge cases, and performance issues. Be specific about what to fix.
Use Cases
Writing new code Describe the function, its inputs, outputs, and any constraints. The model writes it; you review and adjust.
Refactoring Paste existing code and ask for improvements: readability, performance, or adherence to a pattern.
Explaining unfamiliar code Paste code you didn't write and ask the model to explain it line by line.
Writing tests
Write unit tests for this function using Jest. Cover edge cases including null inputs and empty arrays.
Documentation
Add JSDoc comments to this file.
Tips
- Break large problems into smaller steps
- If the first answer isn't right, tell the model what's wrong and iterate
- For long files, paste only the relevant section plus surrounding context