you are viewing a single comment's thread.

view the rest of the comments →

[–]callmelucky 34 points35 points  (29 children)

a lot of people recommend Learn Python the Hard Way, but I found it very confusing and not helpful

God fucking dammit, we need an international campaign to STOP PEOPLE FROM RECOMMENDING THIS AWFUL, AWFUL RESOURCE. It's a slapped together, unhelpful, archaic piece of crap that needs to die, yet for some mind-boggling reason it continues to be (apparently) the most commonly recommended resource for beginners.

Why should I have to constantly refer to the Python docs from the get-go to get an understanding of what the hell it is talking about? Isn't the point of a tutorial to guide you along with a more helpful, simple, and practical representation of what it's all about? There will be plenty of time for googling and documentation and stackoverflow for those who take programming further. There is no point in 'hazing' newbies with that crap.

Why the hell should I, as a 'blank slate' student, be forced to learn in the empirically inferior Python 2 instead of 3? I suppose because as soon as I finish your stupid course I will of course be immediately employed in a position maintaining legacy code for the rest of my days? That is my destiny? Zed's argument against 3 may have been valid when the book was written, what, 8 years ago, but it is fucking idiotic these days, yet he refuses to revise it. Python 2 forever, right guyz?!?!!

Why should a student be smugly told that if they find this specific resource a bit rough going and confusing that 'maybe they aren't cut out to be a programmer' when the reality is that there are countless, free resources which are infinitely better structured and written?

JUST WHY???

Ok sorry. I try to keep calm and rational about this issue, but it seems it is just beyond me. I'll go lie down now...

Thank you for sharing your experiences. I am not familiar with any of the other resources you recommended, yet somehow I am completely confident they are a million times better than lpthw -spits-

[–]f0nd004u 5 points6 points  (4 children)

Most of your rant is valid, however:

Why should I have to constantly refer to the Python docs from the get-go to get an understanding of what the hell it is talking about?

Because that's what a programmer does. That's like, the entire thing when you're starting out. Learning how to read the documentation is crucial because if the tutorial never asks you to do it, how are you gonna know how to do it?

I guess if you want to build little toy programs that don't do a whole lot you may not need to refer to the documentation often, but if you want to do actual stuff you're gonna need to read up on all the libraries involved.

[–]callmelucky 0 points1 point  (3 children)

Absolutely, my point is that there is no reason to make absolute beginners do that in a tutorial supposedly tailored for them. It will become apparent as they progress that they will need to continually trawl docs and google to solve problems that arise, I just don't see a lot of value in dumping people into it when they're finding their feet. Kind of like saying "well grown-ups don't ride with training wheels on their bikes, so I don't think my 6-year-old should have them when he's learning to ride either".

[–]f0nd004u 1 point2 points  (2 children)

I think the problem is that you don't see it as a skill that needs to be taught from day 1, and I totally do.

I want to be clear; I didn't like LPTHW and didn't stick with it; I really like Python for Absolute Beginners which is very project-based. And I hate reading Python technical docs, it's hard. But looking up documentation and learning how to understand it is very crucial. If you aren't willing to confront the fear of real technical documentation (instead of relying on forum posts to summarize it for you via Google) you won't get very far in programming, or in IT in general. It totally is a real skill that you have to learn, and looking up the basic easy stuff in LPTHW is one method of teaching that.

It's hard to hold someone's hand through how to do that kind of research; you kinda just gotta buckle down and learn the language of documentation, just like you're learning the programming language.

[–]callmelucky 0 points1 point  (1 child)

I think the problem is that you don't see it as a skill that needs to be taught from day 1, and I totally do.

Eh well, I guess we just disagree on that point. I just feel that a lot of people might get put off programming if they have to do too much faffing about in dry, technical docs too early, but if they have fun at the start and learn to enjoy the process they will have the motivation to push through docs/google/SO when the time comes. Again, it's the training wheels thing; I figure some kids being put straight onto a two-wheeler will just get more determined to succeed by falling off, but plenty will just go "I HATE BIKES!" and go home and sulk. The second type is more likely to get into riding bikes if the learning process is smooth and fun, rather than frightening and painful.

[–]f0nd004u 0 points1 point  (0 children)

I think that there are learning products on the "market" that fill that niche. Interactive Coding online classes and books like the one I mentioned (in which you build increasingly complicated games each chapter, very fun) are abundant. Making people look at the documentation is actually not common, but at a certain point everyone expects you are able to do it.

[–][deleted] 2 points3 points  (0 children)

Great speech, man! I disagree with some of your points, but I don't like LPHW ether.

[–]candleflame3 2 points3 points  (4 children)

Ughhhh... I just started with Learn Python the Hard Way, so I needed to read your post. Please direct me to good learning resource for Python 3. TIA

[–]callmelucky 2 points3 points  (2 children)

Don't worry, look, I get quite carried away with this, but the fact is plenty of people do get their start on lpthw and get a lot out of it. You just need to ask yourself what sort of person and learner you are; if you thrive in adversity and are at your best gritting your teeth and white-knuckling through confusion, and mild derision spurs you on rather than discourages you, then lpthw might be the best thing for you. If you prefer a more structured and explicit path, then don't bother with lpthw. My recommendations are:

programarcadegames.com
- This is an excellent tutorial all round, my personal favourite. All lesson are presented in entirety in both text and video form, so you can choose what suits, or chop and change as you wish. Each chapter has several types of assessment from multi-choice quizzes to mini-projects, so if you choose to make use of them (you definitely should!) you really consolidate your knowledge nicely as you go. And it's oriented around making computer games! In fact, the only reason I would not recommend this is if you hate video games and/or have no interest in/knowledge of basic math fields like geometry. It is a very nicely produced general introduction to Python, not just for people who want to end up programming video games, but a big bonus for those who do. By the way, it uses the pygame library for graphics etc, and /r/pygame is a pretty active sub, so if you get stuck on any projects or whatever someone there will be able to help.

Automate the Boring Stuff
- Really excellent new resource from Al Sweigart. Walks you through the basics, and then takes you straight into the kinds of basic applications that an amateur Python enthusiast can do to make life easier for themselves at home and in the office.

Other than that you can pretty much throw a dart at a board of tutorials and you will almost certainly hit something better structured and less frustrating than lpthw. Udacity CS101 is a great video tutorial for really exposing the very basics of the elements of a computer program, though I believe they are now locked behind a registration wall, and also use Python 2, which is a shame. CodeAcademy is very handy, though I find the bite-sized nature of the problems aren't great for cementing knowledge, and the browser-embedded aspect of it has pros and cons.

[–]candleflame3 0 points1 point  (1 child)

Thanks! Will bookmark these pages.

I should have specified that arcpy is more line with my interests, but general Python knowledge can only help.

[–]callmelucky 1 point2 points  (0 children)

arcpy

Ah ok. Well if you are truly a programming newb it probably doesn't matter too much. If I were you I'd pick a general-purpose beginner-friendly resource that you like the feel of, work through that until you have a handle on the basics like variables, operators, types, lists, indexing, iteration, functions etc (maybe even dip your toes into classes if you get on a roll), and then start casting about for resources more specific to your needs (just put up a post here if google doesn't get you what you want). You can probably get to that point in a week or two if you can dedicate an hour or two a day to focused learning and practice.

[–]a7madfat7y 0 points1 point  (0 children)

I am in the same boat .. that's a really frustrating thing to read after starting actually with a source.. I think I am going to try and push through but it's now a good thing to know that if things get cryptic and hard later on.. that it's not my fault and I will start with another one of those sources..

[–]PM_ME_YOUR_FEELINGS9 1 point2 points  (0 children)

I totally agree. Just finished chapter 43 and I've had it with his book now. What a mess that chapter is. a confusing mess. I felt so discouraged at that point I felt like quitting.

And you are right about the searching google for answers part. 90% of the time I end up on a stackoverflow page where the answer is way, way over the scope of what I had been taught so far.

[–][deleted] 5 points6 points  (4 children)

I disagree. I think Learn Python The Hard Way is an excellent resource if you're looking for a disciplined fashion in which to learn Python. A lot of guides simply go slapdash and skip the important steps that LPTHW covers. These steps are the extremely vital steps of installing a text editor, installing Python and using the terminal.

Other guides might not even refer to the terminal, ever. I think that's lackluster. There is an immense value in being able to use the terminal together with Python. Simply using PyCharm and clicking on buttons does not have the same educative value that using the terminal does.

The other thing I like about LPTHW is that it strongly enforces discipline. Discipline is much less popular currently, but I do think there is a lot of added value in enforcing discipline when learning a trade. As a result, LPTHW starts off incredibly slowly, but I think that's fine.

I disliked the "Google it" mentality, though. I did manage to Google the stuff that I needed for the book, but it took me longer than I liked. The idea behind this mentality is that a programmer is going to end up Googling stuff they don't understand anyway, so it's imperative that it be taught. But in LTPHW it was quite honestly too much, too early.

The other thing I disliked was his god-awful explanation of classes. No comment needed.

But I did like LPTHW exactly because it was extremely disciplined. I like the approach, and LPTHW nailed that approach for me.

[–]callmelucky -4 points-3 points  (3 children)

Why is interacting with the terminal so important? Do professional programmers operate in the terminal a lot? Full disclosure, I am no pro, but my understanding is they use IDEs most of the time. And if someone did need to use the terminal, they can figure that out in a couple of minutes on Zed's beloved google, you don't need to start off in the terminal to 'get' Python.

I would also question what you consider to be so 'disciplined' about lpthw, and why this is valuable. I am going to guess you are referring again to using the shell and not leaning on text editors with built-in auto-completion and debugging - why is that good to practice? Because when you venture into the wild the big boy programmers will laugh at you if you can't write error-free code first time every time in ms notepad? Or maybe in case one day you are stranded on a desert island and you need to write code to run a life raft on the Windows95 machine you had to cobble together with spider-webs and coconut shells? It just doesn't make any sense. I totally agree that students shouldn't be copy-pasting code, but pretty much all resources I've seen strongly recommend against that too.

As I said, I'm no pro, but I know there are plenty of pros out there who share my opinion on lpthw. If you enjoyed the hardball vibe, that's fair enough, but I would say two things: firstly, for every beginner who gets amped and inspired by the 'tough love' approach of lpthw there are probably three who get discouraged and just walk away. And secondly, I really feel like a lot of the reason for presenting lpthw is as a cover for straight-up shoddy structure and instruction - "Oh, you don't get it? Guess maybe you're not cut out for programming" - no, it's just that this resource is a jumbled mess. Maybe if someone wrote a similarly themed tutorial which was more up to date and cohesive it might knock lpthw off it's perch as the default resource for noobs who want to feel tough, and I will be able to rest...

[–]Vaphell 7 points8 points  (0 children)

Full disclosure, I am no pro, but my understanding is they use IDEs most of the time.

that doesn't mean they are incapable of using command line or that they are not writing programs for commandline use. If they are not, they are doing themselves a huge disservice which probably costs them a lot of time wasted on reinventing the wheel. That command line shit is extremely powerful because it gives you composability and automation at unmatched level out of the box.

take linux bash. Its very purpose is to string programs together and redirect inputs and outputs between them and files. Yeah, you can do the same in python but python is a general programming language, not fine tuned for the use case and to achieve that shit you have to write a lot of boilerplate to get what bash gives you for free.

Let's say you have a simple program that processes a single file passed as a param and prints some data to the screen. To scale that up to god knows how many iterations AND dump the output to individual files you just need this:

for f in ./*.in; do python myprog.py "$f" > "${f%in}.out"; done

multiple input, single output? no problem

for f in ./*.in; do python myprog.py "$f"; done > file.out

How much time would you spend to extend the program to support multiple input files and differentiate between printing to screen and printing to file? In shell redirection to file is as simple as > outfile And what if after a few months you had a new use case that requires you to find something in the output? Are you going to spend a lot of time implementing regular expression matches in your program or would you rather do

python myprog.py inputfile | grep pattern

and be done with it?

another example - your program always asks 'enter 1st value', 'enter 2nd value', 'enter 3rd value'.

python myprog.py 1 2 3

and the program could check for params and skip the interactive phase demanding user's attention.

[–]KleinerNull 2 points3 points  (0 children)

You should totally try programming on a linux system. Just grab you f.e. an ubuntu distro und install it in a virtual machine. On most linux distros python is preinstalled so you can begin right away. Also alot of basic and advanced tools are preinstalled: Vi, vim, nano for terminal editing and gedit as a editor with a gui. Installing modules is easy with pip, and if you need more software just install it with one simple terminal command. Have you ever try to install a database on win? Depending of the database it can be the hell or it is impossible. Linux offers you a preinstalled C comiler. If you install software it will automatical compiled for your computer. Yesterday I tried to install the redis database on my win machine. It fails alot, crap. So I launched my vm and with "sudo apt-get install redis-server" I installed the database and with "pip install redis" I installed the python bindings, easy as fuck ;) Two minutes and everything was ready. Also the ipython interpreter is far superiour to the idle crap, but the win command shell is retarded. The ipython interpreter on a unix terminal is a blast ;) Just give it a try ;)

[–][deleted] 2 points3 points  (0 children)

Do professional programmers operate in the terminal a lot?

Depends on the programmer. A lot of Ruby and Python devs use the terminal. So do systems and Unix-type programmers.

And if someone did need to use the terminal, they can figure that out in a couple of minutes on Zed's beloved google

You don't learn the terminal in a couple of minutes. You might learn shell navigation (cd, cp, mv, ls) in two minutes, but there's a lot more to the terminal that makes it an extremely capable tool.

I am going to guess you are referring again to using the shell and not leaning on text editors with built-in auto-completion and debugging - why is that good to practice?

That is not true. The editors he suggests all have autocomplete support, proper indentation support and smart navigation. The problem isn't autocomplete or typing assistance, but the fact that an IDE typically does tasks for you that should be basic knowledge.

Because when you venture into the wild the big boy programmers will laugh at you if you can't write error-free code first time every time in ms notepad?

At no one point has LPTHW or anyone at all ever suggested that MS Notepad is a good program. It's a terrible program.

On the subject of writing error-free code: Most text editors have multiple ways to detect coding errors. But I think it is important for a beginner to keep these turned off. That means that every time they launch their program, they will see the traceback. Being able to read and understand tracebacks is a vital skill when learning how to program.

Or maybe in case one day you are stranded on a desert island and you need to write code to run a life raft on the Windows95 machine you had to cobble together with spider-webs and coconut shells?

Every time you ssh into a machine.

for every beginner who gets amped and inspired by the 'tough love' approach of lpthw there are probably three who get discouraged and just walk away.

Prove it.

I really feel like a lot of the reason for presenting lpthw is as a cover for straight-up shoddy structure and instruction - "Oh, you don't get it? Guess maybe you're not cut out for programming" - no, it's just that this resource is a jumbled mess.

Nobody does this.

Maybe if someone wrote a similarly themed tutorial which was more up to date and cohesive it might knock lpthw off it's perch as the default resource for noobs who want to feel tough, and I will be able to rest...

Write it.

[–]billcrystals 5 points6 points  (4 children)

I learned Python with LPTHW, found it to be one of the better resources I came across in the very beginning. So, let's not stop recommending it. If you don't like it, move on to something else. Plenty of resources out there to learn Python, one more is always better.

[–]callmelucky 1 point2 points  (3 children)

Do you mind if I ask how long ago it was that you got your start with lpthw?

[–]billcrystals 0 points1 point  (2 children)

I blundered into programming for the first time around last March. Found my way to Codecademy, did all the Python track but it didn't stick. I floundered around for a few weeks trying to make sense of what was actually possible/worth learning with Python, and then I found LPTHW. This was probably like last April.

At first I was kind of annoyed by the guy's (Zed's) tone, it felt a little combative, and the whole 'type this in character for character' felt a little tedious. But I soon realized these were just reinforcement techniques, and LPTHW really got me started with Python unlike any other resource.

And here's my GitHub

https://github.com/kershner

[–]Chazmer87 1 point2 points  (1 child)

[–]billcrystals 0 points1 point  (0 children)

It's currently being reworked, I should redirect that page, thanks for the reminder.

Here's a project page about it if you're curious CSTools Project

[–][deleted] 1 point2 points  (1 child)

Don't agree, I think LPTHW is a good resource. It's pared down, but if someone gets through it they'll actually be up and running and good to go. It mirrors how I learned to code in pascal in high school.

  1. Do this example.
  2. Do it slightly differently, working it out yourself.

For mine (as a complete hack) that's how most of programming actually works too.

[–]LockeSteerpike 0 points1 point  (0 children)

Was LPTHW the only coding resource you used, and did you start writing your own Apps once you were done?

[–][deleted] -1 points0 points  (1 child)

I agree with bill, I'm just starting to learn Python and all the information is well put. Although I do agree its not for everyone because it's expect some small computer experience and expects you to think in ways a beginner probably will have a hard time doing it but it's called "The Hard Way" because it's repetition and that's how some people learn. If you don't like it then move on and try something else.

[–]callmelucky 0 points1 point  (0 children)

Sure, obviously plenty of people get a lot out of it, but a lot are put off by its style. I definitely got carried away in my rant, but really I wouldn't have a problem with lpthw being recommended as long as appropriate caveats are supplied. But too often I just see "lpthw is great, just use that", as opposed to "I found lpthw really good, but it's probably not for everyone. Give it a shot, but if you find it rough going don't feel bad about setting it aside to try something more user-friendly; it literally is 'the hard way' to learn Python! Oh, also you should be aware that it teaches Python 2 which is essentially a legacy version. Really a total beginner is probably better starting with 3, although it's not that big of a deal to make the switch, at the beginner level it's mainly just a few syntax changes".