He who sacrifices clarity for correctness deserves neither
-
-
Replying to @wycats
In cases where correctness matters, though, correctness is often *really hard to achieve*. As an extreme example, avionics software is unclear because they have to guarantee *every single line of code* matches a requirement. Should they sacrifice correctness for clarity?
1 reply 0 retweets 1 like -
Replying to @Hillelogram
In that case, it would be unclear to leave out those mission-critical requirements. The domain matters a lot -- be as clear as your domain of discourse requires.
2 replies 0 retweets 2 likes -
Replying to @wycats
I think, then, the claim doesn't provide us any explanatory power: in all cases you could argue "it'd be unclear to sacrifice correctness". Would you be willing to provide an example of where code could not be made clearer without being made less correct, and this is a problem?
1 reply 0 retweets 0 likes -
Replying to @Hillelogram
The claim (a riff of a paraphrase of an old quote) is that when confronted with what appears to be a hard tradeoff between clarity and correctness, work hard to avoid sacrificing clarity. Quite often, people concerned with correctness ignore clarity.
2 replies 0 retweets 0 likes -
Replying to @wycats
The opposite is true too, though: I've run into cases where people are concerned with how nice things look and how 'readable' the code is at the cost of making it hard to test, document, or analyze. It's about finding optimum point, which is a hard question.
1 reply 0 retweets 1 like -
Replying to @Hillelogram
Yep. I agree completely. I think people give up too easily, confuse "pretty" with "clear" (which has domain-specific meaning), and confuse explicit with correct. Clarity means being explicit about important distinctions and abstracting unimportant details. Again, domain specific
1 reply 1 retweet 1 like
Example: by default, Rails signs and verifies cookies using bcrypt. This is more correct than making every app make an explicit decision about whether to use signed cookies, and if so, which encryption to use. Explicit is not always the same as more correct.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.