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

> If you know the code works then there is no benefit of running it. If you need to execute it it is only because you don't know if it works correctly

People make mistakes. You have to run the code. Do you submit PR's without running code? If not, then we're agreeing. Making code simple enough to reason about without executing is a great goal, but you cannot replace running code.

> You can't keep 10k lines of code in your mind and tell if it works correctly, but maybe you can split it into multiple modules and make sure each works correctly, separately.

But ultimately they need to work together, and that's the most important part. Again, you need to run the code here.

> when I have written a module that I am just not sure works correctly, I refactor it so that it is easier to tell if it does what it should be doing.

This is a good goal, though again, I hope you run the code. You don't know what you don't know.



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

Search: