> AI coding assistants bias towards assuming the code they're working with is correct, and that the person using them is also correct. But often neither is ideal!
That's why you should just write tests, before you write the code, so that you know what you are expecting with the code that is under test is doing. i.e Test driven development.
> And you can absolutely have a model second-guess your own code and assumptions, but it takes a lot of persistent work because these damn things just want to be "helpful" all the time.
No. Please do not do this. These LLMs have zero understanding / reasoning about the code they are outputting.
Recent example from [0]:
>> Yesterday I wanted to move 40GB of images from my QR menu site qrmenucreator . com from my VPS to R2
>> I asked gemini-2.5-pro-max to write a script to move the files
>> I even asked it to check everything was correct
>> Turns out for some reason the filenames got shortened somehow, which is a disaster because the QR site is quite basic and the image paths are written in the markdown of the menus
>> Of course the script already deleted 40GB of images from the VPS
>> But lesson learnt: be very careful with AI code, it made a mistake, couldn't even find the mistake when I asked it to double check the code, and because the ENDs of the filenames looked same I didn't notice it cut the beginnings off
>> And in this case AI can't even find its own mistakes
Just like the 2010s with the proliferation with dynamically typed languages creeping into the backend with low-quality code, we now will have vibe-coded low-quality software causing destruction because their authors do not know what their code does and also have not bothered to test it or even know what to test for.
> But lesson learnt: be very careful with AI code, it made a mistake, couldn't even find the mistake when I asked it to double check the code, and because the ENDs of the filenames looked same I didn't notice it cut the beginnings off
Don't test code in production.
Good software engineering practices didn't change with AI, they actually are even more important. levelsio is a quite successful entrepreneur but he is not an engineer.
Moreover, he's also not a good person to look for at how to apply AI! He picks the simplest possible thing to build with an extremely narrow focus to maximize revenue and minimize work. It's precisely the right way to analyze tradeoffs in his shoes as a solo entrepreneur. But I would imagine that few of us who work for larger organizations would apply a similar mindset to software development.
That said, we all test in production, it's just a question of how deliberate and principled we are about it :D
> That's why you should just write tests, before you write the code, so that you know what you are expecting with the code that is under test is doing. i.e Test driven development.
I've tried this too. They find ways to cheat the tests, sometimes throwing in special cases that match the specific test cases. It's easy to catch in the small scale but not when in a larger coding session.
> No. Please do not do this. These LLMs have zero understanding / reasoning about the code they are outputting.
This is incorrect. LLMs do have the ability to reason, but it's not the same reasoning that you or I do. They are actually quite good at checking for a variety of problems, like if the code you're writing is sensitive to memory pressure and you want to account for it. Asking them to examine the code with several constraints in mind often does give reasonable advice and suggestions to change. But this requires you to understand those changes to be effective.
That's why you should just write tests, before you write the code, so that you know what you are expecting with the code that is under test is doing. i.e Test driven development.
> And you can absolutely have a model second-guess your own code and assumptions, but it takes a lot of persistent work because these damn things just want to be "helpful" all the time.
No. Please do not do this. These LLMs have zero understanding / reasoning about the code they are outputting.
Recent example from [0]:
Just like the 2010s with the proliferation with dynamically typed languages creeping into the backend with low-quality code, we now will have vibe-coded low-quality software causing destruction because their authors do not know what their code does and also have not bothered to test it or even know what to test for.[0] https://twitter.com/levelsio/status/1921974501257912563