3 ms·
This is code rot, which is a different problem. But even code rot can be mitigated somewhat with this discipline. Which of these changes is easier to justify:
by kstenerud 8y ago
This is code rot, which is a different problem.
But even code rot can be mitigated somewhat with this discipline.
Which of these changes is easier to justify:
countCustomers(list)
incrementCustomersScore(list, n)
// where "list" is to change type from "list of customers" to "list of sales domains"
VS
countCustomers(customers)
modifyCustomersScores(customers, scoreDelta)
// where "customers" is to change type from "list of customers" to "list of sales domains"
Code is a map to what the computer is supposed to do. Making things familiar and easily navigated just makes sense. Good code requires good U/X, just like good websites require good U/X. It's just something you do to make your users have a better time using your stuff.