At the end of the day spend an hour or two going back and refactoring the code that I wrote for the day.
Write tests.
how about writing test before starting code? so you wont mess up your feature after refactoring the code.
1. I have a feature idea.
2. Come up with a plan on how to build this feature.
3. Write tests.
4. Began implementing the feature.
5. At the end of the day spend an hour or two going back and refactoring the code that I wrote for the day.
TDD has been something I've been trying to adapt to but I've been having a hard time getting into the habit of it. But yes, you are right I should be writing the tests first. This is something I'll continue to work on and try to build into a habit.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
how about writing test before starting code? so you wont mess up your feature after refactoring the code.
TDD has been something I've been trying to adapt to but I've been having a hard time getting into the habit of it. But yes, you are right I should be writing the tests first. This is something I'll continue to work on and try to build into a habit.