News for hackers. Stuff that matters.
Re:Education of a Programmer by euske on Sunday April 02, 2017 @10:52PM (#14020306)
One thing I'd add to these principles: I always emphasize when I teach programming that there's no magic. There's always a reason behind everything and regular folks like you can understand it. There are people (even among tech community) who like to say something is "magic" or "beyond one's comprehension", but don't take their words seriously. Mysticism is just intellectual laziness. Don't indulge in it.
Re:Education of a Programmer by adrianratnapala on Sunday April 02, 2017 @11:57PM (#14020504)
I'm pretty sure this is not going to help "ordinary" people. Unless they already think like you and me.

When I was a kid, I wanted to know how all the black boxes worked -- one of my greatest days was when my father explained the internal combustion engine well enough that cars no longer seemed like magic.

Later I noticed that many people -- especially when talking about electronics -- would ask "How does it work?", when they actually meant "How do you use it?" I thought this was just a quirk of the Australian dialect, but as I gained more experience with people, I realised it was really an aspect of human thought.

To most people, knowing "how it works" is no more than being familiar enough with the magic spells that you can use them with confidence.

Re:Education of a Programmer by jomkr on Monday April 03, 2017 @04:51AM (#14021425)
Isn't "the magic spells that you can use", exactly how we (programmers) use interfaces.

I trust that the interface, be it the C++ standard, or boost::whatever, is well enough tested that I don't need to know "how it works".

It would be nice to know how everything works but there is only finite time in the working day.

Re:Education of a Programmer by Berobero on Monday April 03, 2017 @11:37AM (#14023577)
Is it truly possible to have a solid understanding of the interface and its use, though, without having a reasonable insight into, at least, the likely implementation of something?
Re:Education of a Programmer by aynsof on Monday April 03, 2017 @05:20PM (#14027252)
I'm sure this isn't what you meant, but how about something like movement? I've met doctors who know anatomy like the (ahem) back of their hand, but they couldn't perform coordinated physical tasks to save their life.
Re:Education of a Programmer by sullyj3 on Monday April 03, 2017 @09:15PM (#14028754)
Yes, that's the whole point of abstraction, to reduce cognitive load by ignoring irrelevant implementation details.
Re:Education of a Programmer by swiley on Monday April 03, 2017 @06:43AM (#14021816)
This is why some people don't like languages with big runtimes/standard libraries like C++.
Re:Education of a Programmer by eru on Monday April 03, 2017 @06:48AM (#14021839)
I don't see how that relates?

You can understand the source of your libraries just fine, but still be grateful that they are usually hidden behind interfaces that let the compiler help you spot silly mistakes.

(OK, less so in C++, more so in eg Haskell.)

Re:Education of a Programmer by alsetmusic on Monday April 03, 2017 @02:43AM (#14021019)
> To most people, knowing "how it works" is no more than being familiar enough with the magic spells that you can use them with confidence.

It's necessary to see beyond chosen words. I might ask how a computer program works and it could mean "how do you use it," or "how does it function." The other party has to infer my meaning.

I don't think you can take a phrase that is common in your life and apply it to everyone else. Words / phrase have different meanings in different contexts for different people.

Re:Education of a Programmer by braveo on Monday April 03, 2017 @12:13AM (#14020562)
It's a matter of time and importance.

Sure, I'd love to live forever so I could take the time to fully understand everything, but unfortunately I have to optimize my time, and learning the ins and outs of an engine just isn't that important in my day to day life.

Re:Education of a Programmer by adrianratnapala on Monday April 03, 2017 @01:36AM (#14020791)
A little defensive no?

While I tried to convey my own excitements and my dislikes, I was careful in my comment not to say that everyone most like the same things.

What I will say though is that there is a difference between known how a thing works and how to use it. Very often you only need the latter. But thinking that it equals the former is just an error.

Re:Education of a Programmer by braveo on Monday April 03, 2017 @02:34PM (#14025669)
My post wasn't defensive, it was pointing out that treating things like "magic boxes" is a purely rational decision, not an inherent character flaw in people.

But then you find a way to try and turn even that into a flaw of some sort, and continue with your narrative that it's somehow a problem that people don't take the time to fully understand everything they use.

Re:Education of a Programmer by contingencies on Monday April 03, 2017 @06:02PM (#14027630)
This week I've started reading The Design of Everyday Things after HN recommendations, and the author makes a distinction between objects themselves, and their 'conceptual models', which may differ for the designer and the user. A single user may even have multiple, conflicting conceptual models of a device and its use. These are sourced from what he calls the 'system image', or overall set of information available about the device including past experience, appearance, sales literature, manuals, websites, advertising, etc. Needless to say, people can operate successfully on an incorrect mental model as long as it serves its purpose.

PS. Australian here. Yes, people do speak like that, but I agree with your conclusion.

Re:Education of a Programmer by d0mine on Saturday April 08, 2017 @04:35PM (#14068866)
A model that you need to use a device can be much simpler than a model that you need to fix the device if it is broken which in turn may be simpler than a model required to build the device from scratch, etc.

I saw "how does it work" used as "how to use it" on American TV https://www.youtube.com/watch?v=MEFXhopARyw

Re:Education of a Programmer by adrianN on Monday April 03, 2017 @03:35AM (#14021170)
> To most people, knowing "how it works" is no more than being familiar enough with the magic spells that you can use them with confidence.

I like the (literal) treatment of this topic in Harry Potter and the Method of Rationality.

Re:Education of a Programmer by eriknstr on Monday April 03, 2017 @10:51AM (#14023132)
>Harry Potter and the Method of Rationality

Never heard of it before. For anyone else interested; http://www.hpmor.com/

Re:Education of a Programmer by adrianratnapala on Monday April 03, 2017 @04:40AM (#14021393)
Yes, and Hermoine is in no way stupid. Personally I find her more intigent the Harry (even in HPMoR). But that's probably because I finder her to be more rational than Elizer Yudkowsky.
Re:Education of a Programmer by loup-vaillant on Monday April 03, 2017 @02:50PM (#14025860)
Which version of Hermione are your referring to? Eliezer did write one of them after all…
Re:Education of a Programmer by adrianratnapala on Monday April 03, 2017 @04:17PM (#14026736)
Eliezer's one.
Re:Education of a Programmer by bittercynic on Monday April 03, 2017 @12:29AM (#14020603)
One of my greatest days also, but my take was that the explanation was good all along and I was finally able to understand.
Re:Education of a Programmer by adrianratnapala on Monday April 03, 2017 @01:21AM (#14020756)
Sorry, I didn't mean to dis my dad there. He explained it as soon as he thought I would be able to understand it.

What I meant by "well enough" is that the explanation that he gave -- or even the one that I now have in my head -- is nowhere near the truth. Engines are complicated, and I will never truly understand them. But at least they can be demystified.

Re:Education of a Programmer by dwringer on Sunday April 02, 2017 @11:08PM (#14020355)
Ah, but don't forget Clarke's three laws:

1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.

2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible.

3) Any sufficiently advanced technology is indistinguishable from magic.

Re:Education of a Programmer by fjdlwlv on Monday April 03, 2017 @05:47PM (#14027504)
#1 is a complicated way of saying that almost everything that a distinguished elderly scientist has an opinion about is possible. Did Clarke really believe that truly impossible things will cause elderly experts to be unsure? Or did he really just mean "almost everything is possible"?
Re:Education of a Programmer by crispyambulance on Monday April 03, 2017 @09:03AM (#14022421)
Saying that something is "magical" is often merely short-hand for "this behavior would take too much time or effort to figure out right now, let's not get lost in the weeds and just continue along with our objectives."

Admittedly, some technical folks are apt to take words literally and don't response well to the usage of the word "magic/magical" even when its meant in a figurative sense.

Re:Education of a Programmer by eriknstr on Monday April 03, 2017 @10:47AM (#14023106)
While I agree that the person that is using the word "magic" might often do so for the reason that you say, I think it is better to state it as "an implementation detail" rather than using the word "magic". Not because you and I don't understand what is meant but because by using that word we give power to the idea that something is beyond comprehension when that is not what we meant.
Re:Education of a Programmer by fjdlwlv on Monday April 03, 2017 @05:48PM (#14027511)
People who believe magic exists don't believe magic is beyong comprehension
Re:Education of a Programmer by Baeocystin on Monday April 03, 2017 @02:41AM (#14021008)
I agree to an extent, but when explaining things to beginners, there genuinely are elements that are 100% impossible to understand until earlier, building-block concepts are firmly under one's belt.

And knowing that there are hard limits on understanding is important. It is almost reassuring: yes, you don't (and can't) understand x right now, but you will be able to when you enhance your mental models! Learning is powerful! Contrast that to "you can understand anything just as you are" which is a dangerous attitude, IMO, because it teaches that students don't need to change. But what is learning, if not that?

Re:Education of a Programmer by TheAceOfHearts on Monday April 03, 2017 @02:02AM (#14020884)
There's no magic, but sometimes there's no real reason behind why something is the way it is. Sometimes a developer just picks a path because they had to solve a problem, and they didn't think deeply about it. I understand that your explanation if focused more on how everything can be understood, but I think it's worth making this slight clarification for some cases.
Re:Education of a Programmer by suyash on Monday April 03, 2017 @02:07AM (#14020904)
You make a good point. Let's replace the word 'magic' with 'abstraction' as 'magic' is quite overloaded. Yes, there is a place and time for abstraction in computer programming but as developers gain experience they should start piercing the layers of abstraction to understand the whole picture.
Re:Education of a Programmer by emodendroket on Sunday April 02, 2017 @11:52PM (#14020492)
When people say something is "magic" they don't mean it is literally inexplicable.
Re:Education of a Programmer by sbuttgereit on Monday April 03, 2017 @12:32AM (#14020606)
I'll usually call some technology thing "magic" when I mean to say that something is useful to me, but that its usefulness to me doesn't require me to understand it at any deep level (or even shallow level sometimes). Wifi is kind of like that: very useful to me, I use it every day... have almost no understanding of the ins/outs... it's PFM (pure fucking magic) to me. And I don't have much interest in learning about it more than than I know.... I've got other fish to fry. Same thing about my car's motor: I only know the most theoretical background of internal combustion engines... have me diagnose an engine problem? Ha! Everything in front of the firewall and under the hood may as well been conjured by Merlin himself.

Life is short. I spend it miserly on those things I have to or want to care about and wifi and car engines aren't those things (now).

Re:Education of a Programmer by suyash on Monday April 03, 2017 @02:09AM (#14020912)
There is no excuse for not to understand the so called 'magic' even at a very superficial level. There are tons of blogs, videos, how to articles, books etc. Just search on YouTube and I am sure you will understand most of anything in just a few minutes.
Re:Education of a Programmer by adrianN on Monday April 03, 2017 @03:37AM (#14021174)
The excuse is that there are literally billions of things that one could thrive to understand at least superficially, but the typical human life has only 4500 weeks.
Re:Education of a Programmer by barsonme on Monday April 03, 2017 @02:39AM (#14020990)
entirely depends on the definition of "understand".

superficial understanding you'll forget in a couple weeks? sure. but nothing more, unless you're some sort of savant.

Re:Education of a Programmer by 3131s on Monday April 03, 2017 @07:21AM (#14021969)
I hear the words "magic" and "magical" used in the Python community to mean that a particular module or framework does not expose its inner workings and does a lot of work behind the scenes that is not transparent to the programmer.
Re:Education of a Programmer by ue_ on Monday April 03, 2017 @08:24AM (#14022226)
I feel as though Django is described as 'magic' quite a lot, and frameworks with apparently little magic (like Flask) aren't accused of it so much. The 'magic' trend has carried over to Common Lisp with frameworks like Clack supporting similar 'magic' to Flask.
Re:Education of a Programmer by emodendroket on Monday April 03, 2017 @09:42AM (#14022668)
Right, yeah. I mean, depending on your philosophy that might be good or bad, but I don't think it's literally expressing a mindset that "nobody could understand how this works, just don't touch it."
Re:Education of a Programmer by projektir on Monday April 03, 2017 @12:18AM (#14020577)
Indeed, I often use the term "magic" to describe something that happens for very arbitrary reasons or through an extremely complex and counter intuitive set of steps. I.e., code that uses gotos, hard-to-understand reflection, or code/language that has a large amount of esoteric assumptions and rules in the background.
Re:Education of a Programmer by allendoerfer on Monday April 03, 2017 @02:10AM (#14020915)
I call implicitly executing code magic. It is not like I could not comprehend it, but I should not have to, it should be obvious. I use the word to describe bad interfaces, giving me this feeling of little control.

Big fan of The Zen of Python.

Re:Education of a Programmer by nikofeyn on Tuesday April 04, 2017 @01:27AM (#14029725)
people calling something "magic" within a context of computers and mysticism are two totally unrelated things. people don't literally think something is under the influence of a supernatural force.

and you may claim there is a reason behind everything, but good luck finding the reason. no one will ever find the reason for every single bug, issue, problem, etc. they come across. so just because there might exist a reason, the fact that it can't be practically found makes that stance a bit mystical itself.

Re:Education of a Programmer by huherto on Monday April 03, 2017 @12:05PM (#14023920)
Adding to this advice. Sometimes it is easy to blame the compiler, O.S., etc. In may experience it has been my own fault 98% of the time. Specially when using very popular software tools.