5 ms·
In practice, at work, I haven't found people using magic to describe code that they don't understand, but rather code that uses obscure or somewhat hidden featu
by placeybordeaux 11y ago
In practice, at work, I haven't found people using magic to describe code that they don't understand, but rather code that uses obscure or somewhat hidden features to try and do things in a smart way.
For instance if a method relied on it being modified at run time by it's caller to ensure sanity of it's input I would call it magical.
- braythwayt 11y agoI hope you appreciate that the word “magic” is relative to the person using it. For you, it’s self-modifying code. But to someone else, it’s mapping. And to a third person, it’s monkey-patching. And to a fourth person, it’s lazy evaluation of infinite streams, and to a fifth person, it’s ...
- jschwartzi 11y ago...and the point is that magic is a word that's often used alongside readability to deride source code that isn't done the way you would have done it.
- braythwayt 11y ago“Intuitive equals familiar”—Jef Raskin