The question I ask myself in these situations is " how did I know that I got it right "
I wrote a lot of code in my career, and almost all of this didn't work the first time. Almost every time I go back and change the code to refactor, change functions, performance or fix bugs, I broke it again. TDD protects me from me (thank god!).
In the case of the generated code, I do not feel obligated to check the code. That is, I trust the code generator. However, I want to check my inputs on code generators. Exactly how to do this, it depends on the situation, but the general approach is to ask yourself how I can make a mistake, and then figure out how to verify that I understood correctly.
Maybe I'm writing an automated test. Maybe I will check something manually, but this is pretty risky. Maybe something else. It depends on situation.
Jay bazuzi
source share