It's normal from the beginning. Why not? A piece of code has to be repeated many times.
First of all, forget the grammar mistakes, and the editor can check them.
Secondly, logical errors can be found in the review theory, so how to ensure them can be guaranteed by testing the code. Therefore, test cases should be written before functional code.
I hope it helps you and I wish you something.
(1