Tests
One of the challenges I have been facing in my server project has been testing.
When it comes to using TDD to test for small problems like euler problems or even Tic Tac Toe, TDD seems easier. I believe this is so because most of the problems I have faced are small, modular, and they can be easily identifiable.
In the case of a server and its games, it has been a challenge to make an easy test for what I want to build.
Because of this I have had a hard time changing it.
Whenever I wanted to build something instead of going straight to my tests to make sure everything works, I would run my server and test it out there with print statements.
Now given, this is a way to build my project but clearly, it was not the best. Because when it came to making changes or trying to build upon what I had, the process was always slow and tedious.
Not just that, I was reluctant to try and make changes, because of the current functionality.
I have been stuck holding on to my spaghetti code that was in the process of rotting.
I have been and will continue to test each line of code so I can be comfortable making changes in the future.
Best,
Merl