12 Tweets 48 reads Mar 20, 2023
10 super useful ChatGPT prompts for developers (save 100+ hours):
1. Convert your code to specific code guidelines
Prompt:
"Rewrite the code below following the Google style guidelines for javascript. {enter code}"
2. Write code tests
Prompt:
"Write test cases for the main edge cases that could happen to the below code snippet. First outline the test cases you'll write. Second, write the test cases in javascript using the Jest framework. {enter code}"
3. Write code comments
Prompt:
"Regenerate the code snippet below, but please include comments to each line of code {enter code}"
4. Code your web app
Prompt:
"I will provide some specific information about web app requirements, and it will be your job to develop an architecture and code for developing a secure app with Golang and Angular. {enter web app requirements}."
5. Execute queries
Prompt:
"The database contains tables named "Products", "Users", "Orders" and "Suppliers." I will type queries, and you will reply with what the terminal shows. I want you to reply with a table of query results in a single code block."
6. Git commands generator
Prompt:
"I want you to act like a Git commands generator. I'll explain to you what I need you to do and you will provide me with the right Git command. My first requirement is, {I want to push the example.txt file to the branch name example-branch}"
7. How-to guides
Prompt:
"I will provide you with basic steps of an app functionality {enter steps} and you will come up with an engaging article on how to do those basic steps."
8. Generate Readme Files
Prompt:
"Generate documentation for the code below. You should include detailed instructions to allow a developer to run it on a local machine, explain what the code does, and list vulnerabilities that exist in this code. {enter code}"
9. Code translator
Prompt:
"Translate this code from JavaScript to Python {Enter code}"
10. Code explainer
Prompt:
"What will the following code snippet do {enter code}"
Thanks for checking out this thread.
Follow @Prathkum for more exciting threads like this one. 😁

Loading suggestions...