Hacker News new | past | comments | ask | show | jobs | submit login

Slightly similar lesson I learned when developing games (and other 3d apps). Make sure your debug-output is so good that you don't have to start the debugger before you already have an idea what's going on. Simple stuff like - your 2d and 3d cursor positions can be printed on screen always. You can add lines and polygons which are visible for debugging in your code with a single line (and you only comment them out afterward and don't remove them as you will need them again). When developing things like A* - make sure you can print every value on screen easily. Adding all those kind of easy debug-outputs is usually worth it over and over again and still it often only gets added to a project after people get stuck on the algorithms for too long. So right problem in 3D-development: debug output first.



If/then guards are better than commenting out code, so you can toggle debug at runtime, or hardcode a constant to get an optimized production build that skips the if-check.


You need both. The thing with easy debug-output is that you start using it so much that you simply get too much stuff on the screen at the same time if you keep it all enabled.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: