Zed Shaw completely loses his mind

Zed Shaw wrote "Learning Python the Hard Way", a popular book for learning Python. A few days ago, he published this:
learnpythonthehardway.org/book/nopython3.html

Some highlights:
- There's no automated way to correctly convert all existing Python 2 code to Python 3 code, so that must be a conspiracy by the Python developers
- Python 3's incompatibility with Python 2 means that Python 3 is not Turing-complete (yes, he really says this)

Why are people recommending this guy's work? I've looked through his book before and I didn't like it much, but this shows he genuinely doesn't know what he's talking about.

Other urls found in this thread:

docs.python.org/3/library/main.html
hentenaar.com/dont-learn-c-the-wrong-way
twitter.com/NSFWRedditImage

It's like Loomis and RMS, people who have some good things to say but are mostly just memes.

Because they don't know what they're talking about either.

Zed Shaw's books should be called "learn how to print text to the screen, the hard way." I don't even know how you'd learn anything from the book that I skimmed.

I think his only claim to fame is that he 'predicted' Slowloris.

Also, to put it simply, the reason that "Py3" can't translate Py2 code is fundamental bugs in Py2 string handling. The fact that he doesn't know this means he's not anywhere near qualified to be discussing this.

It's probably clickbait though, or something absolutely caked with sarcasm. Or at least I hope it is.

Does Shaw have any good things to say?

Stallman might be a meme, but he's really important anyway. GCC, GNU in general, Emacs (both the TECO and the GNU versions), his AI research, the GPL, and so on are things he did that are really useful even if you don't agree with him. And he's typically not objectively wrong in important ways. Saying that writing proprietary software is morally wrong is an extreme opinion, but it's very clear that it's just an opinion.

On the other hand, saying that Python 3 is not Turing-complete is just completely bogus, and someone who claims that shouldn't be teaching people programming.


It's neither clickbait or sarcasm. He wrote a very popular Python book and this is his justification for not upgrading it for Python 3.

What did he mean by this?

I've used Python for a year and I can appreciate some of it's features.

Magical methods/Operator overloading works very well.
String handling is easier than C/C++, char[] strings.
Easy, readable syntax.
Automatic variable type in declaration.

I actually read Shaw's book when I started learning Python up until the point I felt that his book was garbage and I RTFM the tutorialspoint website and the python website.

Most problem with Python is that in order to learn how to actually use Python, you have to read a lot of source code for projects to get an idea of how you can use Python properly.

It's also not clear on scopes of variables when you use modules inside a project. A global variable can't be used inside a module that is imported prior to the variable being declared, even though it's declared prior to the import. In order to use variables, you should utilize a module as a class and make the variable a property and then import it in the module you want to use it.

I miss that Python doesn't have a proper #include macro or function like require() that just import a file without making it a property. I find that C/C++ code is easily read if you start in the main.c file and just follow the flow of #include commands and the main function; while in Python, I sometimes doesn't even know where the program actually starts because there's no name convention for main.py. And working with Python modules is a cluster fuck especially when Python goes import wildcard.

Indentation scoping should have been optional. Curly brackets in C worked fine.

A global variable can't be used when it's imported before being declared, even though it's declared before import? I think you made a mistake here, or maybe I just misread.

Isn't this really just what from module import * does?

There is, actually. It's main.py. It's more than just a convention, that name gives it special behavior.
docs.python.org/3/library/main.html

I agree that it's really bad form for code that someone else will have to read (but convenient for throwaway scripts or when working interactively), but don't you get the same problems with a #include macro?

Do curly brackets have advantages over indentation scoping? Having both is worse than having either of them.

Why are pythonfags so butthurt about Py3? I learned Python about 2 years ago, and since the website says so and because I did't want to learn something in the process of deprecation, I went with 3. All the grizzled pythonfags at work and online constantly sneer at me and bitch about py3, but won't say what the problem is.

From what I've seen:

Obviously py2 libraries don't work, but in my experience all the useful (and many not) ones have been ported already. I have very rarely seen a truly py2-only library, and it was always been some useless shit that I could easily work around.

There's also apparently some trivial changes to basically how the reference/value distinction is handled, but I'm proficient in some dozen languages, many of them OOP, but also including C and functional, so I don't have any babyduck problems with that. When string1+string2 fails (incidentally happened to me last week) I'm capable of just googling the error message, reading the docs to see what the issue is, and then correcting the syntax to do what I actually want. I'll admit that Python's one way to do things philosophy leads to some silly code sometimes (usually a few unnecessary brackets or line breaks), but it's not like the language forces syntactic monstrosity on the level of Java or Perl-tier garbage.

If your py2 code happens to depend on some obscure old orphan library, or if your sysadmin is gay and won't put py3 libraries on your dev platform, I can see how you might not migrate for that particular project. But why do they get ass devastated about me using py3 for a new project?

I mean sometimes on StackOverflow you ask people for a Py3 update of a Py2 solution and you get passive aggressive bitching as if there's something wrong with that. It's surreal.

It's like 10 screens long and has amazing insights like "the error message is macho and terse", so I think I'll do something more useful with my time, like shitpost and masturbate to anime.

Every time someone recommends LPtHW three people say it's shit

Read it and decide for yourself. For my part, I say its shit.

I like the "Learn to Program x thru Game Programming" books myself.

I went through about a third of the book before finally realizing I learned shitall during that third

It's like Zed Shaw wrote LPTHW as a joke, but no one was getting the joke, so he had to act even more retarded.

hentenaar.com/dont-learn-c-the-wrong-way

There's nothing wrong with it. That's a good thing to do if you want to learn to code in any language.

True. If anything, that's a failure of the learning materials.

I hope you're not implying that this is a recent development.

Lots of good comments on Zed's post in this thread, so I won't rehash everything that's wrong with it. I'll just note that I find his statements like


pretty odd. I'll grant that it has been a while since I've programmed in Python, but I used to use both 2 and 3. In fact, after losing a project I wrote in 2 (a podcatcher for podcasts), I rewrote it in 3. As you might imagine, it didn't involve extensive string handling, but there was some, and I don't remember finding it that upsetting. I had the Py3 docs open in a browser and looked up stuff on Py3 strings as needed.

Zed Shaw kinda fucked off from programming.

He mostly does art full-time since he got burned out by the industry. He updates his books because that's how he gets money to fund his art, but for all intents and purposes he's just not that interested in programming anymore.
He was regularly harassed on reddit and hacker news, first for shitting on RoR, and then for shitting on the people shitting on him for shitting on RoR. He was the catalyst that signaled the downfall of RoR from popular web development projects.

He's also completely anti-politically correct, so a massive sjw trigger magnet.

At this point, I just wish him happiness. The dude went through a lot of shit and clearly doesn't care anymore.

I don't get why people want this shit. You're going to indent your code anyway, right?

I don't really blame him for most of the shit he said in other articles but this one is just stupid as fuck.
You don't get to be right just because you follow up a stupid sentence by proclaiming it as "basic computer science."

Never read his books, don't care.

If you want to learn practical python, work through "automate the boring stuff with python". it's practical programming.

Brainfuck is Turing complete.

...

...

well, it's not actually basic to have that bytecode compatibility.
does he shit his pants and cry like this when he needs to upgrade or manage different ruby version?
and, the effort required to directly translate every edge case isn't worth it, considering the bugs in py2's string handling.
it was just a retarded blog post.

The argument of "code should be indented anyway so lets make it mandatory" falls flat because the only way to make it mandatory is it impose other restrictions such as not allowing line breaks at some points and also not being able to format the code into much more reasonable chunks albeit not the way the compiler expected using indentations

So you sometimes have to put parentheses around something with a line break in it. Big deal.

Can you give a (Python) example of when you would want to indent your code differently?

I think you mean interpreter here.

If it's really that necessary, you could just specify that broken lines should end with \\ like in C strings. I just don't see it being necessary for the other 99.99% of the code.

This is the retard who wrote a tirade against K&R's C and then sabotaged his own C book because he couldn't handle people telling him that he is a retard.

If you must read LPTHW, but there is no point in listening to him past that.

Zed Shaw is lolcow material and pretty much the only reason anyone pays attention to him is the Scrabble score of his name

Even my drunk retarded blog posts aren't that retarded.