Tech Founder Notes

    Understand any code with clear and educational explanation

    Some pieces of code are obscure, complex, or simply poorly documented. This prompt helps you make them readable, understandable and educational. Ideal for onboarding a new developer, reviewing legacy code or simply learning by dissecting.

    When to use this prompt

    During audit or refactoring phase

    To understand an external library or snippet

    When onboarding a junior developer

    To create quick documentation

    What this prompt allows you to obtain

    A line-by-line or block-by-block explanation

    Human and clear comments

    Simplification with analogies if needed

    A synthetic summary of the code function

    Tips and mistakes to avoid

    βœ“Do's

    • β€’Adapt the explanation level to the target (beginner β‰  CTO)
    • β€’Add context if the code is "isolated" from a project
    • β€’Limit length for readable results

    βœ—Don'ts

    • β€’Always specify the language (GPT can make mistakes otherwise)

    Prompt Template

    This is the base template with placeholders. Replace the placeholders with your specific information:

    You are an expert developer and educator. Analyze and clearly explain this code: {{code_block}}. Language used: {{language}}. The target audience is: {{audience_level}}. Provide an explanation line by line or by logical block, with clear comments, analogies if useful, and a final summary of what this code does. {{additional_context_block}}

    Placeholder descriptions:

    {{code_block}}Code to explain - ex: function processData(input) { ... }
    {{language}}Programming language - ex: JavaScript, Python, Go, Rust
    {{audience_level}}Target reader level
    {{additional_context}}Context or constraint (optional) - ex: the code is part of a REST API, integrates into a React app, or needs to be made accessible for onboarding

    Example of generated prompt

    Here's an example with filled-in values:

    You are an expert developer and educator. Analyze and clearly explain this code:
    
    function processData(input) {  
      const lines = input.split('\n');  
      const result = lines.map(line => line.trim()).filter(Boolean);  
      return result;  
    }  
    
    Language used: JavaScript. The target audience is: beginner. Provide an explanation line by line or by logical block, with clear comments, analogies if useful, and a final summary of what this code does.

    Share this prompt

    Help others discover this useful prompt by sharing it on social media