{"id":1682,"date":"2024-12-12T10:43:04","date_gmt":"2024-12-12T02:43:04","guid":{"rendered":"https:\/\/www.fanyamin.com\/wordpress\/?p=1682"},"modified":"2024-12-13T09:25:30","modified_gmt":"2024-12-13T01:25:30","slug":"programming-prompts","status":"publish","type":"post","link":"https:\/\/www.fanyamin.com\/wordpress\/?p=1682","title":{"rendered":"Programming prompts"},"content":{"rendered":"<table>\n<thead>\n<tr>\n<th>#<\/th>\n<th>Prompt<\/th>\n<th>Variable<\/th>\n<th>Example<\/th>\n<th>Category<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>You are an expert in {language}, please explain how the {function} works in {language} in a simple and understandable way<\/td>\n<td>language, function<\/td>\n<td>You are an expert in Python, please explain how the list comprehension works in Python in a simple and understandable way<\/td>\n<td>learn<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>You are an expert in {language}, please show me best practices for writing {function} in {language} in a simple and understandable way<\/td>\n<td>language, function<\/td>\n<td>You are an expert in JavaScript, please show me best practices for writing functions in JavaScript in a simple and understandable way<\/td>\n<td>learn<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>You are an expert in {language}, please write a {function_name} function for {function_desc}. It accepts {input_parameters} and returns {output_result}<\/td>\n<td>language, function_name, function_desc, input_parameters, output_result<\/td>\n<td>You are an expert in Java, please write a calculateSum function for adding two numbers. It accepts int a, int b and returns int<\/td>\n<td>code<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>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)<\/td>\n<td>language, function, feature<\/td>\n<td>You are an expert in Python, please recommend a suitable framework for web development about REST API that following 4L principle<\/td>\n<td>design<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>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<\/td>\n<td>language, function<\/td>\n<td>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<\/td>\n<td>code<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>You are an expert at system design and architecture, please tell me how to design a {system} for {business}. The technology stack is {technologies}.<\/td>\n<td>system, business, technologies<\/td>\n<td>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<\/td>\n<td>design<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>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.<\/td>\n<td>language<\/td>\n<td>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.<\/td>\n<td>code<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>You are an expert of {language1} and {language2}, please convert the below code snippet from {language1} to {language2}:<\/td>\n<td>language1, language2<\/td>\n<td>You are an expert of PHP and Python, please convert the below code snippet from PHP to Python:<\/td>\n<td>code<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>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.<\/td>\n<td>language, frameworks<\/td>\n<td>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.<\/td>\n<td>code<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>You are an expert in {language}, please optimize the following {language} code for '{explain}' to make it more {purpose}:<\/td>\n<td>language, explain, purpose<\/td>\n<td>You are an expert in C++, please optimize the following C++ code for performance to make it more efficient:<\/td>\n<td>code<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>You are an expert in {language}, please review the following {language} code for code smells and suggest improvements:<\/td>\n<td>language<\/td>\n<td>You are an expert in JavaScript, please review the following JavaScript code for code smells and suggest improvements:<\/td>\n<td>code<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>You are an expert in {language}, please teach me how to fix {issue} of the following {language} code which is for '{explain}':<\/td>\n<td>language, issue, explain<\/td>\n<td>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:<\/td>\n<td>code<\/td>\n<\/tr>\n<tr>\n<td>13<\/td>\n<td>You are an expert in {language}, please refactor the given {language} code to improve its error handling and resilience:<\/td>\n<td>language<\/td>\n<td>You are an expert in Java, please refactor the given Java code to improve its error handling and resilience:<\/td>\n<td>code<\/td>\n<\/tr>\n<tr>\n<td>14<\/td>\n<td>You are an expert in {language} and {domain}, please suggest for designing an effective data model for {project} which is for {explain}:<\/td>\n<td>language, domain, project, explain<\/td>\n<td>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:<\/td>\n<td>design<\/td>\n<\/tr>\n<tr>\n<td>15<\/td>\n<td>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<\/td>\n<td>language<\/td>\n<td>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<\/td>\n<td>test<\/td>\n<\/tr>\n<tr>\n<td>16<\/td>\n<td>You are an expert in {language}, please write unit tests for the following code that is for {explain} using {framework}<\/td>\n<td>language, explain, framework<\/td>\n<td>You are an expert in JavaScript, please write unit tests for the following code that is for a calculator using Jest<\/td>\n<td>test<\/td>\n<\/tr>\n<tr>\n<td>17<\/td>\n<td>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:<\/td>\n<td>language, domain<\/td>\n<td>You are an expert in Java and web development, and you are also a professional document writer, please write documentation for the code below.<\/td>\n<td>code<\/td>\n<\/tr>\n<tr>\n<td>18<\/td>\n<td>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.<\/td>\n<td>language, domain, framework<\/td>\n<td>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.<\/td>\n<td>design<\/td>\n<\/tr>\n<tr>\n<td>19<\/td>\n<td>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<\/td>\n<td>language, domain, explain<\/td>\n<td>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<\/td>\n<td>operation<\/td>\n<\/tr>\n<tr>\n<td>20<\/td>\n<td>You are an expert in {language} and {domain}, please write a script for {purpose} by {tool} that is to {explain}<\/td>\n<td>language, domain, purpose, tool, explain<\/td>\n<td>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<\/td>\n<td>code<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p># 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 [&hellip;] <a class=\"read-more\" href=\"https:\/\/www.fanyamin.com\/wordpress\/?p=1682\" title=\"Permanent Link to: Programming prompts\">&rarr;Read&nbsp;more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1682","post","type-post","status-publish","format-standard","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1682"}],"collection":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1682"}],"version-history":[{"count":2,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1682\/revisions"}],"predecessor-version":[{"id":1684,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1682\/revisions\/1684"}],"wp:attachment":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}