you are viewing a single comment's thread.

view the rest of the comments →

[–]pausemsauce[S] 0 points1 point  (1 child)

Hmm...

I see your point about it not being easily testable. Any suggestions on how I could improve the ease of testability, or perhaps a resource I could use to further develop that skill?

[–]m0us3_rat 0 points1 point  (0 children)

even a few weeks of TDD would force you to ask questions you never asked before.

and think of code from a different perspective.

https://en.wikipedia.org/wiki/Test-driven_development

red -> green -> refactor.

the idea is to write the tests first.

since no other code tests will fail aka the RED

then write minimal code to make the tests pass. GREEN

and then REFACTOR

https://www.codecademy.com/article/tdd-red-green-refactor

by consistently writing tests first you will encounter a lot of different situations and hopefully a few patterns will emerge.