4 ms·
When I write code with AI, I do it only by speech recognition since I have busted hands. As a result, I have a different experience than most developers. I've s
by rickydroll 2y ago
When I write code with AI, I do it only by speech recognition since I have busted hands. As a result, I have a different experience than most developers. I've spoken about it here before, but my model for software development has changed as I have gained more experience with the tools. These notes overlap with the author's experience with cursor but I think there's some additional useful information.
I'm increasingly convinced that if you write code using AI, you never want to touch the code. You want to edit or change your project by modifying the prompt. If you modify the code, you need to feed that back into the AI model so that it learns how you work and doesn't lose your changes.
I have forced AIs to generate specific code by telling them the code I want them to use. Fortunately, they will take the correction and apply the logic behind the change throughout the code I'm working on, which is usually the right thing to do.
I haven't figured out what to do about this, but checking your code to git loses the context held in the AI system. I'm also not sure you want to preserve the AI context because, at times, there seems to be value in starting over, especially if you change your approach to a problem.
Don't be afraid of trashing your current context and starting over again. You've learned enough to know how to change your prompts and what information to add or delete to get a better result. It's much faster to re-create from a new prompt than edit code and force the AI system to work how you want it to.
Pay attention to what the system is trying to tell you. Sometimes, it knows better than you what needs to be done. It does this because you may not consciously understand all aspects of your problem, but it appears that unconscious information is somehow encoded in your prompt chain, and the AI system can see that and act on it.
Pay attention 2: It may teach you a new technique or trick. I've had more than one occasion when I look at the code I get and say, "That's not right," but after I dig into it, I see that it was right but used in an idiom I was not familiar with.
Try different AI systems because you will get different responses to the same prompt, and you might like one result better than the other.
If you're using speech recognition to generate a prompt, using Grammarly to fix recognition errors and reword your prompt gives you better results.
Reproducibility is a problem. I have fed the same prompt into an AI system but with a new context, and usually, I get the same result, but not always. The fix has been to feed the original code into the system to remind it what it was thinking about.