3 ms·
Or, you know tests. Having a "defensive" comment (explaining some critical corner case) is just terrible, write a test that exposes it so code can be refactore
by MetaCosm 13y ago
Or, you know tests. Having a "defensive" comment (explaining some critical corner case) is just terrible, write a test that exposes it so code can be refactored. "WARNING" comments are a really bad thing.
- IanCal 13y agoOr, you know, both. Why not leave a comment explaining why a non-obvious code block was written. It's not an either-or situation. I've left a before because of a subtle GC bug triggered only on particular hardware, which could not be replicated in the development environment, and would only be revealed by a particular coincidence in timings. How do you test that?