Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rather than commenting it out, I suggest adding a --live-run flag to scripts and checking the output of --live-run=false (or omitted) before you run it "live."


But then you have double the chances of introducing a bug for the specific scenario we are talking about:

Before: there is chance there is a bug in my "delete" use case

Now: what we have before plus the change that there is a bug in my "--live-run" flag


You can make automated tests for your flag. You can’t make automated tests for your code comments.




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

Search: