News for hackers. Stuff that matters.
Re:Learn Python the Hard Way by dsego on Friday March 27, 2015 @08:17AM (#9275789)
If you know anything about programming, skip this book. If you don't know anything about programming, also skip this book. It gives you drills without explaining anything. My SO started learning with this book and I could see the book only caused confusion. She completely misunderstood how functions and function invocation work. And his way of teaching boolean logic is to memorize truth tables, wtf?
Re:Learn Python the Hard Way by brudgers on Friday March 27, 2015 @08:52AM (#9275904)
The pedagogy of Learn Python th Hard Way is called 'Direct Instruction'. It has been successful for teaching the very rudiments of diverse subjects. It falls flat once applied to teaching creative intuition or abstract conceptual reasoning. That's why Learn Python the Hard Way is targeted at beginners.

Page 4 of the Shaw-Hanselman interview transcript discusses direct instruction.

http://s3.amazonaws.com/hanselminutes/hanselminutes_0407.pdf

Out of curiosity did your SO learn Python and if so what resources worked particularly well?

Re:Learn Python the Hard Way by puranjay on Friday March 27, 2015 @09:49AM (#9276210)
I felt the same. It was good for the basics, but lost me when it came to objects and classes and more creative parts of programming.

I tried out a few Ruby classes just for the heck of it, and with Ruby, somehow things fell into place.

Re:Learn Python the Hard Way by brudgers on Friday March 27, 2015 @11:11AM (#9276724)
Matz's happiness is closer to mine than Guido's dictatorship and Python is not the language of my soul, either. Though as a card carrying condescending know it all I find Lisps most attractive.
Re:Learn Python the Hard Way by dsego on Friday March 27, 2015 @09:08AM (#9275979)
She is now taking an introductory edX course (Introduction to Computer Science and Programming Using Python).
Re:Learn Python the Hard Way by hgsigala on Friday April 03, 2015 @11:52AM (#9316530)
I took this course. It used Idle when I did it. Got a very high percentage but still do not know how to do much with python. Learned how to use the basic, how to compute Big O, but not really how to "make" anything.
Re:Learn Python the Hard Way by brudgers on Friday March 27, 2015 @09:24AM (#9276066)
Is that the Norvig course where the Python interpreter is in the browser?
Re:Learn Python the Hard Way by dsego on Friday March 27, 2015 @11:56AM (#9277031)
Nope.
Re:Learn Python the Hard Way by brudgers on Friday March 27, 2015 @02:05PM (#9278002)
I was thinking of his course at Udacity not Edx.
Re:Learn Python the Hard Way by las_cases on Friday March 27, 2015 @08:57AM (#9275919)
> She completely misunderstood how functions and function invocation work.

How can that be? I remember learning about functions such as f(x) = ax + b in the fifth grade if I am not mistaken and learning about functions in programming was extremely natural. I studied programming in high school taken from the very basic and nobody had troubles with how functions worked. It was so math like that it was simply a non-issue. I am really interested to understand what the problem was and how did she figure it out eventually.

> And his way of teaching boolean logic is to memorize truth tables

But isn't Boolean algebra based on exactly that? Isn't this the pillar field covered by the mathematical logic, how can it be wrong?

Re:Learn Python the Hard Way by dsego on Friday March 27, 2015 @09:23AM (#9276061)
She understands function on a theoretical level. But keep in mind, she knows nothing about the cpu and jump commands. So, there was no intuition about functions being pieces of code being stashed somewhere for later use. That the interpreter would read a call and jump to that piece of code and send arguments to it. Instead, she developed her own theory of the interpreter reading a function definition and searching for calls in the code. The book did nothing to develop a healthy intuition about the flow of the program.

From the book:

> Learning logic has to come after you do some memorization. I want you to do this exercise for an entire week. (http://learnpythonthehardway.org/book/ex27.html)

Why would you need to memorize that not true == false? All of the others can be deduced by simple reasoning. One example:

    not (True and False)
    True and False is False
    not (False) is True
Instead of teaching people this (basic algebra), he recommends spending a week memorizing stupid tables?

The same thing with spending first ten chapters having people write print statements with convoluted string interpolations. String interpolation is a hard concept to grasp for beginners. Unpacking variables before learning about objects, introducing what he calls "commands" like raw_input(), before even mentioning functions. I could go on and on.

Re:Learn Python the Hard Way by ForHackernews on Tuesday March 31, 2015 @10:41AM (#9296503)
I see what you're getting at, but when you're talking about a high-level language like Python your comments about the CPU and jump commands seem really off-topic. You don't need to know anything CPU instructions or memory management to write competent Python (because that's all handled automatically) and knowing about them doesn't necessarily help you have a better intuitive understanding of Python code (because again, lots of stuff is happening under the hood automatically).
Re:Learn Python the Hard Way by nothrabannosir on Friday March 27, 2015 @09:35AM (#9276130)
No, operators have English names resembling their semantics for that reason. AND(x, y) is only true if x and y are true. OR(x, y) is only true if x or y is true (inclusive). Etc.

If you're just going to remember truth tables, throw those names to the wind. You might as well call them P and Q. But we don't, because OR and AND and XOR make sense.

It looks like he introduces these truth tables (sec 27), where, to be fair, he does say this:

> The terms (and, or, not) actually work the way you expect them to, just like in English.

And then he asks you to practice memorizing the tables until you know them intuitively.

Re:Learn Python the Hard Way by chucksmash on Friday March 27, 2015 @10:30AM (#9276462)
> And his way of teaching boolean logic is to memorize truth tables, wtf?

That seems like an odd thing to single out. I took an "Intro to Logic" course years before I did any CS courses and truth tables were very much used. I believe that they helped ease students not accustomed to thinking precisely about logical propositions into that mode of thought. Why rely on students' intuitions about ambiguous natural language constructs when we can be explicit and also provide an early lesson on the precision required by machine languages?

Re:Learn Python the Hard Way by mekoka on Friday March 27, 2015 @09:26AM (#9276076)
Ah, anecdotes... my nephew is learning from this book and loves it.
Re:Learn Python the Hard Way by joshuapants on Friday March 27, 2015 @08:30AM (#9275837)
I agree. I suggest the Head First series by O'Reilly. They are much more beginner-friendly and the teaching method is based on research and not some crufty old belief that learning should be "hard."