If you're not doing TDD, write the name of the tests before coding.
Why?
* It helps you to understand the problem and the solution;
* I tend to write more test scenarios and cover more cases when I don't need to write the tests right away. I write the names, the actual test it's a problem for my future me;
* You don't have to think and remember of all the scenarios after writing the code, just do what the name says.
* No one actually does TDD lol - jokes a part, TDD might be annoying in some complex cases IMO.
* It helps you to understand the problem and the solution;
* I tend to write more test scenarios and cover more cases when I don't need to write the tests right away. I write the names, the actual test it's a problem for my future me;
* You don't have to think and remember of all the scenarios after writing the code, just do what the name says.
* No one actually does TDD lol - jokes a part, TDD might be annoying in some complex cases IMO.