Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 7
    You make a very good point in your second paragraph. I've experienced that before, but articulating it is very helpful. Commented Feb 5, 2017 at 17:14
  • 7
    Third case = bingo. I work mostly in legacy code, and there are projects where 80% of the work is just fixing places that made assumptions. I like this answer as is, but I would add that it's sometimes okay to cover such an impossible edge case by setting up a graceful failure with an exact and detailed error message, especially when you're in a time crunch. Commented Feb 6, 2017 at 17:52
  • I like to log exceptions that say "[Error description] According to the specification [version] signed off by [person who signed it off] this can't happen." Commented Feb 13, 2017 at 5:53
  • But since there was no test case for it before, the code (assuming the specs was to replace the previous) shouldn't have to fit new test cases in that iteration. And if there is no test for that corner case already it should be a new ticket/task to be done, not a code review feedback imo. Commented Feb 13, 2017 at 11:25