Say Precisely To Get Exactly
when working with AI, say precisely what you want to get exactly what you want
š This idea came to me yesterday as I was thinking about how I collaborate with AI coding assistants, why I find myself so much more productive when working with them, and maybe why others donāt share my keen interest in this new style of programming.
These days, for the most part, I now write prose instead of code. Iām fine with this. Perhaps the enthusiasm gap in other developers is an unwillingness to write plans instead of programs.
Submitting a prompt to an AI coding assistant is easier than editing a file for a compiler. At least, this is true for meāand this is the crucial point. The need to precise rather than exact delivers the productivity boost. Itās far simpler to provide a precise description of an algorithm, a function, or an API surface area in prose than it is to write it exactly, line by line, in code. This implies that I know what I wantāthat Iām not just vibing an end result. I still care about the details for how things in my programs are accomplished. I watch the AI do everything it does, and I stop it in its tracks when I see it stray off track. Overall, my aim is to be precise in communicating what I want so the AI can write the exact lines of code needed.
I understand that this change in working is not necessarily easier for everyone. I like writing, and I enjoyed the experience of writing Creative Selection, my book about my experiences working at Apple. I wrote one thousand new words every day during the first draft of my book, and most days, I found that was achievable by lunchtime. (For reference, this post is about 440 words).
Such a facility with prose composition is a requirement when communicating with AI. Be precise in words, and the assistant can (much of the time) respond with exact code. But be general or ambiguous, and thereās far less hope for good results.
Indeed, this often happens to me. When it doesāwhen I donāt get what I want even though I think I asked for itāI blame myself rather than the AI, because, itās likely that:
- I wasnāt sufficiently clear, or
- I tried to do too much at once, or
- I left something undone in the previous step, or
- I asked for something illogical or ill-conceived, orā¦
You get the idea. As much as ever, itās incumbent on me as a developer, to say what I want. In clear and cogent writing.