| ▲ | layer8 an hour ago | ||||||||||||||||
> coding for situations that either do not happen or are unlikely to happen. Not coding for situations that “do not happen” is exactly what creates vulnerabilities. But I also don’t think that such code is the main source of complexity in LLM-generated code. | |||||||||||||||||
| ▲ | eithed 33 minutes ago | parent | next [-] | ||||||||||||||||
An example to what I'm talking about: I have application that takes two inputs from request. I've put in validation on request values to deny values that are greater than 100. In my code I'm adding these values. LLM can say "cater for addition of these two numbers, because they might go over MAX_INT and result in overflow". This is a situation that won't happen. LLM can recommend - add assertions. That's unnecessary. | |||||||||||||||||
| |||||||||||||||||
| ▲ | ShadowOfThePit 11 minutes ago | parent | prev [-] | ||||||||||||||||
I vibe-slopped a small and local forms application for my family. I explicitly mentioned that fact to the LLM. Yet, I removed 2/3s of the code, because it triple-checked that every file really existed and was valid, that the input form was less than a million bytes in size, that there were propper HTTP status codes for everything, and that every possible error from reading data was eagerly checked and caught. Like come on, a grand total of three people will ever look at it. | |||||||||||||||||