Approaching problems the right way
To come back to the wrong ways we see people use generative AI and tools such as GitHub Copilot, we want to show you the right ways as well. Since LLMs use the context of what they know (given by the IDEs) to predict the most likely next word(s), we can use that to give enough context (and not too much) to describe what we want to achieve, but not too much on how to achieve it. We also know that the longer the suggestions are, the lower the quality will be. So, we don’t go for big results in one go.
Let’s take an example. Let’s say you don’t have any code and you want you to build a game. A bad idea would be to simply say, Build Super Mario in Vite.js, as shown in Figure 8.5:

Figure 8.5: Prompt too short with big expectations
As you can see, I prompted "Build Super Mario in Vite.js" in an empty folder. GitHub Copilot generated plenty of files that have sensible names, so the expectations were...