May 17, 2023
Our Best Coding Prompt Ideas for ReadyRunner or ChatGPT
ChatGPT-Powered assistants like ReadyRunner are almost like a senior developer with unlimited patience, happy to help you out 24/7. Below are some ideas of the kinds of things you can ask for.
Before we start, a few good tips to remember:
- GPT-4 is much better at code generation than GPT-3.
- Always be careful running code you didn't write, whether from the web or AI. Read and understand it first, don't blindly trust it.
- Use ReadyRunner's system prompts to specify the programming language you are working in, that way you don't need to always clarify the language.
Coding Prompt Ideas
Implement a tricky function/algorithm
When you come across an algorithm you could implement, but don't feel like trying to remember high school geometry, just explain the inputs and outputs:
Bookmarklet
Explain error messages
Programming error messages can be confusing, to get a readable explanation and possible solutions, you can try saying something like this:
Type '{ a: number; }' is not assignable to type '{ a: number; b: string; } | { c: number; }'. Type '{ a: number; }' is not assignable to type '{ c: number; }'. Property 'c' is missing in type '{ a: number; }'.
Build a command line game
For simple cases, you can ask for an entire program to be built. In this case a command-line game. I actually used this because my young kids wanted to play it:
- computer chooses a number and does not display it to the user
- user can guess a number
- computer will indicate if the number was too high, too low, or correct
- if the number was correct, the user wins and the game shows "you guessed the number, it was X. Press return to start a new game" (X should be the actual number)
Ask for changes
Don't forget that you can continually ask for changes and modifications if what you get is not what you wanted. Here's some ideas:
Ask for code written using a specific framework, or ask for no framework.
If the code doesn't work, you can often just ask for it to be fixed.
Convert code from one language to another
Try converting a snippet of code between any two langauges, in this case Python to Javascript.
(paste your code here)
Convert data from one format to another
Converting unstructured data into structured data, or converting data between data formats is an underrated technique, try things such as the following:
(paste XML code here)
(paste product list here)
Ask to be taught
Think what you could learn if you had unlimited help from an expert. What would you ask? AI assistants are very capable of answering technical questions and providing code examples.
Remember to be careful when asking for questions which you don't know the answer to. AI language models will sometimes make up realistic sounding answers that are incorrect.