The big lesson here is that you should actually test the code you write and also write automated tests to check any code generated by an LLM that the code is correct in what it does.
It is also useless to ask another AI to check for mistakes created by another LLM. As you can see in the post, both of them failed to catch the issue.
This why I don't take this hype around 'vibe-coding' seriously since not only it isn't software engineering, it promotes low quality and carelessness over basic testing and dismisses in checking that the software / script works as expected.
Turning $70 problems found in development into $700,000+ costs in production.
There are no more excuses in not adding tests.
It turns 10 lines of code which is perfectly fine to reason about into 100 lines of unreadable code full of comments and exception handling.
Or you create elaborate System Instructions, since it adheres to them pretty well.
But out-of-the-box, Gemini's coding abilities are unusable due to the verbosity.
I've even gone so far to tell it that it must understand that I am just a human and have limited bandwidth in my brain, so it should write code which is easy to reason about, that this is more important than having it handle every possible exception or adding multiline comments.
In which case, it should simply be considered unusable. Like, the sensible response to "tool is so inadequate that there is no reasonable way to make sure its output is safe" is to _not use that tool_.
qwertox•1mo ago
turtleyacht•1mo ago
qwertox•1mo ago
I mean, look at the printout. It shows that it created the remote file with the truncated filename, then deletes the local file with the correct filename.
turtleyacht•1mo ago