Is vars() the most useless Python built-in ever?

Rick Johnson rantingrickjohnson at gmail.com
Fri Dec 11 17:13:16 EST 2015


On Tuesday, December 1, 2015 at 10:49:19 PM UTC-6, Ian wrote:
> > It's a well know fact that GvR was inspired to create
> > Python from his experiences working with a language
> > called ABC -- and ABC was designed *EXCLUSIVELY* to be a
> > beginners language.
> Which is exactly what made ABC itself unsuitable for Guido's purpose, which
> was to create an *applications* language with better productivity than C to
> support users of Amoeba, the OS that he was working on at the time.

The key word here is "productivity". Intuitiveness and productivity have a synergy like peas and carrots! One cannot be productive if one is fighting an unintuitive interface. Could you drive with your toes? How about your tongue? 

Sure, even the most atrocious interface can be "learned", but what i cannot understand, except in the case of you being a contrarian, is why you would argue *AGAINST* intuitive interfaces? And believe it or not, *SYNTAX* is an interface! As are paradigms! 

> > Even a noob can intuit what is going on here. First we
> > have an *OBJECT* named "stdout, and we can extrapolate
> > that stdout is an abbreviation for StandardOutput. Next,
> > we see a method called "write", and, if our IQ is above
> > room temperature, then we can extrapolate what that
> > method will do.
> 
> This is absurd. You postulate a beginner so rank that they can't understand
> what "print" means, yet you expect them to intuitively know:
> 
> 1) what an object is;
> 
> 2) what a method is;
> 
> 3) that a method is identified by placing a period between the object and
> the name of the method;
> 
> 4) what "output" is in the context of programming;
> 
> 5) and not be confused about what makes the output "standard".

You accuse me of Reductio Ad Adsurdium, yet you commit the same offense, and then put words in my mouth?

Of course i don't expect a "rank noob" to understand these concepts *immediately*, however, the learning curve will be greatly reduced, and the depth of knowledge greatly expanded, when a clear path of consistent intuitiveness is baked-into the learning process -- it's all about breadcrumbs my dear boy, breadcrumbs!

THE PRINT FUNCTION HAS TWO MAJOR ISSUES IN THE CONTEXT OF INTUITIVENESS:

(1) When laymen consider the word "print" (in the context of computing), they first think of "sending a document to a printing device". LIKE IT NOT, "PRINT" IS A CONCEPTUAL CHAMELEON! It does the worst thing it can do, it distracts! 

(2) The path to the underlying process is not even remotely clear. LIKE IT NOT, PRINT IS "MAGIC SYNTAX". 

Of course the noob is not going to immediately intuit every atomic component of `stdout.write("blah")`, however, the road signs are there, and all he need to do is follow them. In fact, by learning from my example, not only will the noob learn the "magic" that exists under the hood, he will also learn a vital lesson (while dissecting the components) about the power of "divide and conquer". 

If we were to create a thought exercise that juxtaposes your argument with mine, we would find a great example in the "search for hidden treasure". You expect the noob to go into a dessert without a map and dig holes until he locates the treasure or dies of exhaustion. Whereas i will not only give the noob a map, i will draw a clear path on the map to the destination -- all he need to do is navigate! I don't know what's more absurd: your argument, or your ego?

> You're describing this as if your hypothetical beginner were learning
> Python in a vacuum. In reality, people learn from a teacher, or a book, or
> at minimum a tutorial.

Hmm. I'll bet you create teeny tiny variable names and then write a paragraph to describe them. Does the concept of "Self Documentation" mean anything to you? And, when correctly designed, the only tutorial that is needed is the the syntax! Heck, we are not writing assembly code here man, we're writing Python code for Guido's sake!

> Here's how you teach somebody what "print" does: instruct them to type
> print("hello world") at the interactive prompt. Note that Python writes
> "hello world" as a result. If they really want, they can check their
> printer and see that nothing came out. That's it. The student now
> understands what "print" means.

Yes, the timeless method of "trial and error" is expected if you're a trail blazer and there exists no previous knowledge, however, when this sort of teaching paradigm is used in areas where the processes have been previously dissected, it reflects a sadistic nature within the teacher. I'm of the opinion that learning "old tech" should be as intuitive as possible, and that, as knowledge spreads, we all prosper. However, you seem to adopt the teaching methods of a drunken and disorderly college sorority house captain. Students are not pledges to be tortured. They are our the future. And when we undermine them, we undermine our ourselves. 

 PUT THAT IN YOUR INTERPRETER AND RUN IT!



More information about the Python-list mailing list