Paco Hope #resist<p>More lessons learned using an <a href="https://infosec.exchange/tags/ai" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ai</span></a> <a href="https://infosec.exchange/tags/chatbot" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>chatbot</span></a> to help write code. (See <a href="https://infosec.exchange/@paco/114316516639964570" rel="nofollow noopener noreferrer" target="_blank">my original post</a> for some of the other observations).</p><p>First, <em>watch out for vibe coding</em>. I start off asking it to do things I know and things I could double check if I wanted to. And it's really easy to start asking it to do things that I <strong>don't</strong> know how to do, and that I <strong>can't</strong> check.</p><p>Second, save checkpoints. I'm inviting the <a href="https://infosec.exchange/tags/LLM" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LLM</span></a> to modify the code files. Sometimes it modifies unrelated stuff that <strong>used to work</strong> and makes it not work, or makes it different. I ask it to calculate alt text, and it changes how the histogram is plotted. As I iteratively get things working, I do a <code>git add</code> to capture a working version. A couple times I let it make a series of changes and by the time I got to the last change, it had clobbered some intermediate states that were working, and I didn't have a copy of the code that was there previously. At each incremental step, VS Codium can use git information to highlight which lines have changed due to the most recent modifications.</p><p>Last, it goes without saying, I <strong>must</strong> go in behind it and clean things up. A funny thing it tends to do is get really attached to adjectives. I wanted my trend line to be yellow, and in order to be clear, I prompted with "add a 15-minute moving average trend line that is bright yellow". Everywhere it mentioned this trend line (in comments, in the alt text) it always said "a bright yellow trend line" instead of just "a yellow trend line". When I asked it to make the histogram bins "exactly one minute" (again, trying to be unambiguous), it then labels everything like the X axis label and the alt text with the phrase "exactly 1 minute" instead of just "1 minute".</p>