Programming prompts

Table of Contents
# Prompt Variable Example Category
1 You are an expert in {language}, please explain how the {function} works in {language} in a simple and understandable way language, function You are an expert in Python, please explain how the list comprehension works in Python in a simple and understandable way learn
2 You are an expert in {language}, please show me best practices for writing {function} in {language} in a simple and understandable way language, function You are an expert in JavaScript, please show me best practices for writing functions in JavaScript in a simple and understandable way learn
3 You are an expert in {language}, please write a {function_name} function for {function_desc}. It accepts {input_parameters} and returns {output_result} language, function_name, function_desc, input_parameters, output_result You are an expert in Java, please write a calculateSum function for adding two numbers. It accepts int a, int b and returns int code
4 You are an expert in {language}, please recommend a suitable framework for {function} about {feature} that following 4L principle (Lots of people use it, Lots of learning materials, Lots of successful cases, License is free) language, function, feature You are an expert in Python, please recommend a suitable framework for web development about REST API that following 4L principle design
5 You are an expert in {language}, please explain what is the correct syntax for {function} in {language} in a simple and understandable way with examples language, function You are an expert in Ruby, please explain what is the correct syntax for loops in Ruby in a simple and understandable way with examples code
6 You are an expert at system design and architecture, please tell me how to design a {system} for {business}. The technology stack is {technologies}. system, business, technologies You are an expert at system design and architecture, please tell me how to design a CRM system for a retail business. The technology stack is .NET design
7 You are an expert in {language}, please complete the following code snippet according to the code comments and provide a complete set of unit test cases. language You are an expert in C#, please complete the following code snippet according to the code comments and provide a complete set of unit test cases. code
8 You are an expert of {language1} and {language2}, please convert the below code snippet from {language1} to {language2}: language1, language2 You are an expert of PHP and Python, please convert the below code snippet from PHP to Python: code
9 You are an expert in {language} and {frameworks}, please use {frameworks} to generate CRUD code of corresponding controller, service and repository classes for the following entity classes. language, frameworks You are an expert in Java and Spring, please use Spring to generate CRUD code of corresponding controller, service and repository classes for the following entity classes. code
10 You are an expert in {language}, please optimize the following {language} code for '{explain}' to make it more {purpose}: language, explain, purpose You are an expert in C++, please optimize the following C++ code for performance to make it more efficient: code
11 You are an expert in {language}, please review the following {language} code for code smells and suggest improvements: language You are an expert in JavaScript, please review the following JavaScript code for code smells and suggest improvements: code
12 You are an expert in {language}, please teach me how to fix {issue} of the following {language} code which is for '{explain}': language, issue, explain You are an expert in Python, please teach me how to fix the memory leak issue of the following Python code which is for a web scraper: code
13 You are an expert in {language}, please refactor the given {language} code to improve its error handling and resilience: language You are an expert in Java, please refactor the given Java code to improve its error handling and resilience: code
14 You are an expert in {language} and {domain}, please suggest for designing an effective data model for {project} which is for {explain}: language, domain, project, explain You are an expert in SQL and finance, please suggest for designing an effective data model for a banking project which is for transaction processing: design
15 You are a {language} interpreter/compiler, please execute the following {language} code, and tell me the execution result, or something wrong if there are any errors of syntax or logic language You are a Python interpreter/compiler, please execute the following Python code, and tell me the execution result, or something wrong if there are any errors of syntax or logic test
16 You are an expert in {language}, please write unit tests for the following code that is for {explain} using {framework} language, explain, framework You are an expert in JavaScript, please write unit tests for the following code that is for a calculator using Jest test
17 You are an expert in {language} and {domain}, and you are also a professional document writer, please write documentation for the code below. You should include detailed instructions to allow a developer to understand and execute easily, also explain what the code does, and possible vulnerabilities that exist in this code: language, domain You are an expert in Java and web development, and you are also a professional document writer, please write documentation for the code below. code
18 You are an expert in {language} and {domain}, please explain the architecture of {framework} and main workflow in a simple and understandable way, also provide some UML diagrams and examples, so that I can have a deeper understanding. language, domain, framework You are an expert in Java and web development, please explain the architecture of Spring Boot and main workflow in a simple and understandable way, also provide some UML diagrams and examples, so that I can have a deeper understanding. design
19 You are an expert in {language} and {domain}, please add metrics and log for the following {language} code that {explain}, so that I can measure its performance and easy troubleshooting language, domain, explain You are an expert in Python and data analysis, please add metrics and log for the following Python code that processes large datasets, so that I can measure its performance and easy troubleshooting operation
20 You are an expert in {language} and {domain}, please write a script for {purpose} by {tool} that is to {explain} language, domain, purpose, tool, explain You are an expert in Python and data science, please write a script for data cleaning by Pandas that is to prepare data for machine learning models code

Comments |0|

Legend *) Required fields are marked
**) You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Category: 似水流年