Friday, December 13, 2019

Debug like a champ!

A major part of writing a library is having proper debug tools. Most developers spend the majority of their development debugging or implementing safety that prevents bugs from happening in the first place. This is doubly triply so for the collision detection library. Just looking at numbers is not going to yield that great of a benefit. The computations quickly become out of control with no telling where the data is going bad. Even trivial calculations on a large scale can make anyone's mind go numb. What can you do to debug in a timely manner and also check for edge and corner cases?

A debug renderer. No one wants to just look at numbers changing. That's boring. A debug renderer to draw the data in a way that's more intuitive is useful. It goes beyond useful. It saves your time and your life. To me, it's almost as important as the unit tests and should be growing beside it. I started creating the debug renderer at the beginning of the month and have it printing unit tests for me. I can see the negative and positive test cases and then snapshot the values into my unit tests and move on to bigger things like implementing the functions to pass the unit tests I just created.


No comments:

Post a Comment