Skip to content

Instantly share code, notes, and snippets.

@rafiramadhana
Created July 10, 2025 17:10
Show Gist options
  • Select an option

  • Save rafiramadhana/a16923de3b05b3b9aa3c559881593f62 to your computer and use it in GitHub Desktop.

Select an option

Save rafiramadhana/a16923de3b05b3b9aa3c559881593f62 to your computer and use it in GitHub Desktop.
Steps to Build LLM Coding Intuition

Steps to Build LLM Coding Intuition

  1. Define Your Goal
    Clearly state what you want to build or solve.
    Example: “Create a REST API endpoint for user registration.”

  2. Break Down the Problem
    Divide the goal into smaller, manageable tasks.
    Example: “Set up routing, handle input validation, connect to the database, write tests.”

  3. 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?”

  4. Start with Explicit Prompts
    Request code, explanations, or templates for each sub-task.
    Example: “Generate a handler function for user registration in Go.”

  5. Review and Understand
    Read the generated code, ask for explanations, and make sure you understand each part.
    Example: “Explain how this handler validates input.”

  6. 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?”

  7. Test and Validate
    Ask the LLM to generate tests, then run and review them.
    Example: “Write a unit test for the registration handler.”

  8. Refactor and Optimize
    Request suggestions for improvements or optimizations.
    Example: “Suggest improvements for error handling in this function.”

  9. Document and Comment
    Use the LLM to help document your code and decisions.
    Example: “Write a docstring for this function.”

  10. 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”).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment