This prompt instructs ChatGPT to analyze a piece of code as a senior programmer and explain it. It helps users understand the code’s functionality, purpose, and structure, with a focus on specific elements.
Special Note: Avoid uploading sensitive or confidential information to the AI.
Prompt Content:
Assume the role of a senior programmer with [number] years of experience, specializing in [language] for [field]. Analyze and explain the functionality of the following [language] code snippet. Focus on breaking down the code’s purpose and overall logic, with special attention to [key points].
<< Attach Code >>
Usage Instructions:
- [number]: Specify the years of experience, e.g., 5, 10, 20
- [language]: Indicate the programming language, e.g., Python, JavaScript, C++
- [field]: The specialized field that the programming language is used in, e.g., embedded systems, web development. app development
- [key points]: Key aspects to focus on within the code, e.g., algorithms, data structures, design patterns.
Example Prompt:
Assume the role of a senior programmer with 8 years of experience, specializing in JavaScript for web development. Analyze and explain the functionality of the following JavaScript code snippet. Focus on breaking down the code’s purpose and overall logic, with special attention to possible memory leaks and event handling.
Disclaimer: You are advised to research, understand, and test these prompts and their outputs. Adjust them as needed to fit your specific requirements. Use these prompts at your own risk, as outputs may not be correct. Follow best practices when using AI, keeping in mind potential security and privacy risks. Avoid uploading sensitive or confidential information. The user is solely responsible for any outcomes resulting from the use of these prompts.
Please share this article if you like it!
No Comment! Be the first one.