Knowing *how* to ask (die maschine)
Much of the performance you get from a GenAI coding assistant comes down to the quality of your prompts.
Knowing what to ask is important, but knowing how to ask is crucial.
You’ll get bad results if you can’t articulate what you want precisely. That’s great practice and carries over to interacting with humans, too.
Let’s talk about the how:
- Act as [an senior engineer of 10 years]
- Apply [this desired coding principle]
are good ways to start.
Here is a prompt that I use to get better results for complex tasks:
[feature request] +
Act as a senior engineer with 10 years of experience. Analyze the existing codebase, taking into account @file1, file@. Understand the architecture and data flow of the application. Outline an implementation plan before making any changes.
Then, I can highlight some flaws or make course corrections. Only once I get something I like do I ask it to write code.
Otherwise, it will just randomly try things, and that’s a poor way to spend your credits.
Yours,
Taj