Good Code Tells the Truth
pragprog.com
pragprog.com
A couple of programmers I know have been reading philosophy (in particular epistemology) and applying principles from it to their coding - I was hoping the article would talk about how code really can be improved by making it Truthful in a stricter sense.
but if you give me a couple of weeks, I'll see if I can find time to start
"That means brevity. As Seneca said, “Truth hates delay.”"
"An unnecessary global variable is not just an invitation to "bugs; if it’s overexposed, it’s lying"
"If it’s a playlist, call it a playlist. Don’t call it a set. Tell the truth."
The connection here is shallow: the author has merely found a way to work truth into each description. Maybe it's better to just accept that there are multiple axes of goodness (which further makes us realise sometimes they are in conflict).
DRY is a great principle, but not following it is not the same as lying.
I think he is saying that you can't trust a global variable as it could be not what you think it is (and thus lying) because of it's scope.