I've observed a lot of folks (including me) struggle in our initial attempts to get copilot write the code we want. The common entry barrier in such cases, is "prompting".
With all the attention prompt engineering is getting in recent times, developers tend to think,
"How do I come up with the most effective prompt, that'd make copilot write the code that I have in mind?"
As it turns out, arriving at the right prompt, in itself, is an iterative process. So, you're never going to get the prompt right in first place always going to take a few attempts before copilot spits out the code you expected.
I think, we should simply take all this fuzz about prompt engineering (for copilot) out of our heads and just keep coding. Copilot will tag along with you. You don't have to think about the prompt that you'd need to write. Just focus on what you need to build.
I've found working with copilot in this mode more useful than prompting it to generate code, for two reasons:
1) When you prompt, copilot may generate a code that may not necessarily fit into your style of coding. Every developer has their own style of coding and it is as unique as their signature.
2) When you prompt, it takes significant amount of time in reviewing the code, since you are not yet in the coding mode. This is a subtle difference and takes a hit on developer experience.
Without prompting, It just feels like working with an invisible pair. Just that the pair often hogs the keyboard and completes the code before you could :) . It definitely made me go faster than I would've done it myself.
In this mode, you are always on the flow. You don't get into the prompt - review - accept / reject cycle. You keep churning the code out, copilot comes along with its suggestions, which you take less time to accept / reject since you are already neck deep into it.
In my opinion, while I was in the prompt - review - accept / reject cycle, copilot was taking a lot of focus away from the thing being built. Without prompting, copilot became a trusted ally and helped me build what I wanted, the product remained in the primary focus. And that's what a great tool does.
To sum it up, a tool doesn't need to do great things. It just need to do simple and useful things. In that aspect, I must admit that copilot is a really good tool to have in a dev's toolkit.
Top comments (0)