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

I would like it to debug my own code. You are more aware of the artificial nature of the variables you create, so it’s not as world-breaking to inspect their contents.

I saved a `health_change` variable in my code, and decided what to do based on that, but the warrior did the wrong thing. I wanted to see if my variable was being set correctly by printing it each turn, but I couldn’t. My normal tool for understanding what was going on is missing, so I was forced to guess at the bug. I finally got it to work by reversing the order of two terms in my formula for `health_change`, but it was a lot harder to understand what was going on when I could only guess at or simulate the values of the variables.




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

Search: