4 ms·
Code Prion - n. a really bad idea dressed-up as a good idea thereby becoming contagious in a way that never seems to die out. n. memes adopted as a religion b
by rhettinger 16y ago
Code Prion -
n. a really bad idea dressed-up as a good idea thereby becoming contagious in a way that never seems to die out.
n. memes adopted as a religion by the clueless because "it seems like a great idea" while drowning-out the opposition because the arguments against are subtle.
* "Our object model makes it hard to implement NaNs" -- famous last words before adding hundreds of if_special() checks to your code and transforming your object model into something that defeats your ability to reason about programs by undermining common notions of equality as being reflexive, symmetric, and transitive. If you doubt that identity-implies-equality, then you're infected.
* Most ideas for pre-commit hooks are code prions. If your process depends on crippling a developer's ability to make a check-in, then you're infected.
* "Our dynamic language doesn't implement static language feature X". If you think Ruby and Python need Enums and Interfaces, then you're infected. Those features cost nothing in compiled languages and often only serve to overcome the limitations of those languages.
* "We're making everything clean and pure by deprecating everything we don't like anymore." Hey, it only takes you ten minutes to add the deprecation, who cares if it consumes hundreds of hours of user-time to update their programs or if they stick with an old version just to avoid your deprecation hassles. Better to just document it as obsolete than to inflict pain on a large user base. (By the way, authors of books will hate you too -- it makes their books go out-of-date prematurely). If you think of published APIs as mutable, then you're infected.
* If you think self.assertLessEqual(x, y) is the right way to spell, "assert x<y", then you're infected. Get nose.py or py.test and live free.
* "Everybody knows eval() is an egregious security hole, so you should never use it." Learn to differentiate between trusted and untrusted code; otherwise, your fear will keep you from using your most basic and powerful tools. This code prion is chonic and progressive -- eventually you'll find yourself unable to write "import collections" because someone might have stolen you ssh key, logged into your machine and added their own collections.pyc file which would appear to run normally but actually emails your mother's secret porridge recipe to wikileaks. If you think eval() is evil, you're infected.