top of page
< Back

ChatGPT Developer Cheat List

ChatGPT Developer Cheat List

ChatGPT Developer Cheat List


📝 Writing Code

  1. Write a C# Function: Write a C# function to accomplish [TASK].

  2. Create a React Component: Write a React component to perform [TASK].

  3. Craft a Dockerfile: Write a Dockerfile optimized for [FRAMEWORK].

  4. Regex Pattern: Create a RegEx pattern to fulfill [REQUEST].

  5. Convert JSON to C# Class: Create a C# class based on this JSON object: [JSON].

Examples:

  • Write a C# method to fetch items from a database and print them. Include TODO comments for areas like data connections.

  • For my .NET project, write a GitHub Action to review pull requests, running both tests and linting the code.



🛠 Debugging / Testing

  1. Code Error: I wrote this code: [CODE]. I got this error: [ERROR]. What does it mean and how can I fix it?

  2. Write Component Test: Write a test that ensures [FUNCTIONALITY] works for this React component: [CODE].

  3. Method Testing: Write a test for this specific method: [CODE].

  4. Exploratory Testing: I'm doing exploratory testing. How can I potentially break this code: [CODE]?

Examples:

  • How can I set up unit tests for a Blazor project using bUnit?

  • What does the System.ArgumentOutOfRangeException error mean?


🤔 Understanding Code

  1. Code Functionality: What does this piece of code do? [CODE]

  2. Function Purpose: Explain the purpose of this [LANGUAGE] function: [FUNCTION].

  3. Concept Comparison: Compare [CONCEPT] and [CONCEPT] in [LANGUAGE].

  4. Keyword Explanation: What does [KEYWORD/OPERATOR/etc] do in [LANGUAGE]?

  5. Library Recommendations: What libraries can meet [REQUIREMENTS] in [LANGUAGE]?

  6. Best Language/Framework: Which programming language or framework is most suited for [IDEA]?

Examples:

  • Can a Dictionary become out of order in C#?

  • What does "static" do in C#?


🌟 Tips

  1. Infinite Code Generation: If you are generating a lot of code and it doesn't finish, type "continue."

  2. Context Matters: The more context you give, the better the results you'll receive.

  3. Short & Sweet: When asking for explanations, request them to be "short and concise."

  4. Refactoring Aid: When refactoring, ask for unchanged code to be omitted for easier reading.


📚 Documenting Code

  1. ReadMe: Write a readme file for this project: [DESCRIBE PROJECT].

  2. ERD Diagram: Write the Mermaid code for an entity-relationship diagram for these classes: [INSERT CLASSES].

  3. Architecture Diagram: Write the Mermaid code for an architecture diagram for this solution: [DESCRIBE SOLUTION].

  4. Code Comments: Insert comments in this code: [CODE].

  5. Step-by-Step Comments: For this [CODE], add a comment for each step explaining its purpose.

Examples:

  • Write instructions for running a .NET project to be included in the README.


♻️ Refactoring Code

  1. Code Splitting: Refactor this code into multiple methods: [CODE].

  2. Performance: How can I refactor this code for better performance? [CODE].

  3. Readability: How can I refactor this code for better readability? [CODE].

  4. Function Parameter: Add a parameter to this function to add [FUNCTIONALITY]: [CODE].

  5. Promises: Convert this callback-based function to use Promises: [CODE].


👀 Code Review

  1. Error Handling: How can I improve the error handling in my [LANGUAGE] code? [CODE].

  2. Code Reuse: Are there any opportunities for code reuse or modularization in my [LANGUAGE] project? [CODE].

  3. Code Improvements: Review this code and suggest areas for improvement: [CODE]



Explore Other Learning Resources

White Structure

MidJourneyPromptGuide

MidJourney is a powerful tool for generating images, and crafting effective prompts is essential to get the results you desire. Here's a comprehensive guide on how to use the parameters effectively and write compelling prompts:

bottom of page