Hacker News new | ask | show | jobs
by CamperBob 6150 days ago
This is good advice, but the best way to do it is paradoxical. Before you even run the code, debug it in your head. Pretend you ran it, and it failed in whatever way that you'd expect it to, assuming it were going to fail. You will find that this exercise causes you to hold yourself accountable, in ways that the traditional edit-compile-test cycle does not. When you truly hold yourself accountable, the silly mistakes will happen less often.