-
Define Your Goal
Clearly state what you want to build or solve.
Example: “Create a REST API endpoint for user registration.” -
Break Down the Problem
Divide the goal into smaller, manageable tasks.
Example: “Set up routing, handle input validation, connect to the database, write tests.” -
Ask for Best Practices
Prompt the LLM for recommended patterns, libraries, or approaches.
Example: “What’s the best way to structure a Go REST API project?” -
Start with Explicit Prompts
Request code, explanations, or templates for each sub-task.
Example: “Generate a handler function for user registration in Go.” -
Review and Understand
Read the generated code, ask for explanations, and make sure you understand each part.
Example: “Explain how this handler validates input.” -
Adapt and Experiment
Modify the code to fit your needs, and try alternative prompts to see different solutions.
Example: “How would this look using a different validation library?” -
Test and Validate
Ask the LLM to generate tests, then run and review them.
Example: “Write a unit test for the registration handler.” -
Refactor and Optimize
Request suggestions for improvements or optimizations.
Example: “Suggest improvements for error handling in this function.” -
Document and Comment
Use the LLM to help document your code and decisions.
Example: “Write a docstring for this function.” -
Reflect and Iterate
After completing the task, reflect on what worked, what didn’t, and how the LLM helped.
Example: “What could be improved in this workflow?”
Summary Rule:
- Start by following best practices and explicit prompts (“play by the book”).
- As you gain confidence, experiment, adapt, and trust your own judgment (“play by your heart”).