4 ms·
Magic is not jargon. Magic has a special form of non-locality. To look for the cause of "magic" one must either pray to some god or roll the dice and read the
by nixpulvis 5y ago
Magic is not jargon.
Magic has a special form of non-locality. To look for the cause of "magic" one must either pray to some god or roll the dice and read the tea leaves. If hunting down the source of understanding feels like this, we call it magic.
Jargon can be carefully laid out and taught. Common practice can be learned and maintained.
Magic is a word invoked to intentionally tell you not to learn and to stop asking questions. It's insulting to the very nature of the programmer, who must ask these questions in order to understand the systems they are trying to describe.
As for the quote, which everyone has heard by now: "Any sufficiently advanced technology is indistinguishable from magic."
This is a cynic's perspective, which while valuable to a point, does not alone lead to that which we desire. We read this quote and think, ah yes, that is how I feel... I wish things were better.
- samatman 5y agoYou stripped the use/mention distinction from what you were replying to; the result is at most a digression. "Magic" is in fact jargon, contrasting other meanings of the word with jargon itself is irrelevant to that.
- nixpulvis 5y ago'"Magic" is an example of jargon when [...]' This was my primary challenge. Either you accept everything as jargon, or you actually read my reply and consider my perspective. I'm not offering a crisp definition, I'm merely adding some addition flavor which is at odds with the parent's as I understand.
- a4isms 5y agoMy perspective as detailed in the full message is that the sense in which meta-programming in Ruby is magic is more akin metaphorically to prestidigitation than to the supernatural. In that sense, it does not imply "stop asking questions," nor does it imply "there is no answer." To me, it implies, "This may look like a supernatural entity is involved, but that's just a trick we're pulling. If we pull back the curtain, we'll find there's a little man with some levers and we'll see how it's done."
- nixpulvis 5y agoWhy pull tricks at all? Ruby is about being nice, not tricking us. Tricks are fundamentally shocking and uncomfortable at first. Many people like this from time to time, but it shouldn't be the intent of our programs. The programs should be written in a way that helps the reader learn. If that involves some clever reveals and abstraction / hiding then so be it. The best lessons are taught in stages.
- a4isms 5y agoThat's how Ruby meta-programming works, just as that's how inheritance works, just as that's how function calls work. They're mystifying at first, then you learn how to use them without looking under the hood, then you learn exactly how they work, then you start making your own. The word "trick" is associated with prestidigitation. Unless you're entering the Underhanded C context, these "tricks" are more like magicians showing EACH OTHER how to do things. "Here's how to make flowers appear out of your top hat." "Ah!"