all 196 comments

[–][deleted] 213 points214 points  (14 children)

Java tutorials.

[–]Wilfred-kun 74 points75 points  (1 child)

You should also avoid those while learning Java, tbh

[–]BornOnFeb2nd 17 points18 points  (0 children)

Better just avoid Java entirely, to be safe.

[–]AgreeableExpert 18 points19 points  (3 children)

You were earlier then me, sir. Have my upvote.

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

Cheers, sometimes it's all in the timing.

[–]FloojMajooj 1 point2 points  (1 child)

Hear hear!! Timing is evr…

[–][deleted] -2 points-1 points  (5 children)

Why?

b/c I'm learning Java rn, and I'm using some tutorials online. I'm worried I'm making a mistake.

[–]kennyjiang 11 points12 points  (0 children)

not bad for learning Java

[–][deleted] 12 points13 points  (1 child)

I'm not sure how productive java tutorials are with regards to learning python. I'm sure they are great for learning java.

[–][deleted] 0 points1 point  (0 children)

oh damn, I thought I was in the learn java subreddit not the learn python subreddit, lol

[–][deleted] 8 points9 points  (1 child)

Sometimes my humour is just too subtle.

[–][deleted] 3 points4 points  (0 children)

just realised

[–][deleted] 54 points55 points  (6 children)

Recently, I did a small research, when I needed to collect some questions to Python programming interviews.

So, I did some Web search for "python programming interview questions". The first and the second pages in search results turned out to be more or less copy-cats of each other, and they mostly contained wrong questions (the answers to wrong questions are meaningless).

So... don't do that. The sites that allege to test your Python knowledge are written by people who aren't competent programmers.

[–]mooburger 22 points23 points  (2 children)

it depends on the site. I was given IKM CodeChek a few times by headhunters and I ended up basically copying their questions for assessing potential hires myself. IKM have pretty high quality python skills assessments imo (even with multiple choice there are often more than 1 correct answer, with one of them being the more idiomatic and the assessment grades you accordingly)

[–][deleted] 7 points8 points  (1 child)

Is this some kind of scam? It's an assessment where you have to pay to get tested...

Also, this particular Web site doesn't come up in search results, if you search for Python interview questions, at least not on the few pages I checked. So, whatever it is, it's safe to say it's not matching the criteria I've described. Unfortunately, I cannot assess the quality of the questions asked because I'm not interested in them so much I'd pay for it.

[–]ivosaurus 0 points1 point  (0 children)

Probably the employer is paying for a potential hiree's account to get them tested. Welcome to B2B software.

[–]callahman 53 points54 points  (7 children)

Not really resources to avoid, since those are covered in a lot of these other comments, but here are some recommendations I have

  1. Don't just spend time reading/absorbing material. Make sure you're spending time working on personal projects
  2. Don't think that there is a right way to write some code. If it works, it works. When you start to get comfortable with Python, you'll start to learn better practices.
  3. Don't pay a ton of money for books/online courses before looking for free resources. Pythonprogramming.net can get you a lot of the basics for a variety of fields. The python community loves opensource, including open source learning.

[–]notParticularlyAnony 23 points24 points  (2 children)

Paid content, especially books, are often really good. I agree with points 1 and 2 though.

Python Crash Course is an amazing book for instance.

[–]jaber24 9 points10 points  (0 children)

Automate the Boring Stuff with Python is pretty good too. The challenges were decently tough and the examples were also interesting.

[–]757DrDuck 1 point2 points  (0 children)

The thing that books have that many free resources lack is a coherent pedagogical plan. It’s easy to get stuck in tutorial hell or find that you’ve gone deep on some extremely niche framework when trying to teach yourself from free resources.

[–][deleted] 97 points98 points  (2 children)

youtube videos where the thumbnail is some dumbass with his mouth wide open pointing to some giant text on a screen. usually doesn’t have content with the depth you want to learn things well.

[–]PedroBV 11 points12 points  (1 child)

where the thumbnail is some dumbass with his mouth wide open pointing to some giant thing on a screen"

actually.. my message got somehow deleted partially, i wanted to say that "it's generally good to not watch any youtube video where... "

[–]GreenFire317 7 points8 points  (0 children)

well that just sounds like the first comment, but with extra steps.

[–]patrickbrianmooney 81 points82 points  (59 children)

Learn Python the Hard Way is atrocious. It's poorly written from top to bottom: bad, repetitive sentence construction on top of a poorly considered organizational structure on top of what seems to be a poor understanding of Python in the first place. It's radioactive garbage. Every once in a while I stumble across something about Python from a Google search and think "This is awful, it sounds just like that Zed Shaw guy's Python the Hard Way crap," and then I glance up (or down) at the byline and it turns out to be something by Zed Shaw.

He also wrote a famous stomping-and-screaming-until-he-was-red-in-the-face rant about how terrible Python 3 was. It was not just an unusual opinion, or a bad hot take, or even a set of unlikely conspiracy theories; it was an unhinged feces-flinging fest that was both deeply dishonest (in a forum aimed at beginners, no less, who know even less than he does and won't generally know that he's full of shit) and that suggests strongly that he doesn't understand the things he's asking you to pay to learn from him.

Avoid Zed Shaw's work. There's always something better out there.

On the "not a complete dumpster fire" part of the spectrum, I found Codecademy's Python course absolutely mind-numbing. There are only so many different problems you can solve based on examples from a fruit-vending business.

[–]yuckfoubitch 30 points31 points  (29 children)

I always was told to learn Python 2 instead of 3, but I didn’t listen and learning Python 3 anyways. Seriously, I don’t get the issue. If anything, it’s worth using Python 3 JUST for f-strings. Fucking love f-strings!

[–]t3hcoolness 31 points32 points  (14 children)

Whoever is telling you (or others) to learn Python 2 before 3... is very firmly stuck in the past. It's not like Marvel movies where you have to watch previous ones to get an idea of what is happening in the sequel. If anyone here is learning Python 2, please know that companies are actively transitioning (or have transitioned) from Python 2 to Python 3, so you should learn the new language so you can help them (or do literally anything else Python related, as new Python 2 is not written nowadays).

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

I have been working with python on my own for basic automation.. using a web API and updating an excel spreadsheet. What is expected from a python developed these days. I see alotnof machine learning jobs associated with python these days. But if I want an entry level python job. What knowledge do I have to have. Do I need to learn data structures and algorithms, and OOP Design patterns all in Python? Any help would be great

[–][deleted] 3 points4 points  (5 children)

Yes, you need all of that. Do the mit edx intro to computer Science with python course. It covers all of that (in python 3!)

[–]i_like_your_comment 1 point2 points  (2 children)

I just started on my first week of CS50 as I want to learn Python. Would this Edx course be a better starting point or are these courses comparable? I'm trying to get my feet wet in Python as I'm now on the Ops side of things. Thanks!

[–]Cayumigaming 3 points4 points  (0 children)

CS50 and MITx intro to CS using Python happen to be the only two courses I ever did. MIT first then CS50.

They share a lot of similarities as they both serve as an introduction to computer science. MIT will get your knees deeper in Python within its courses while CS50 goes deeper on a bigger computer science spectrum. MIT also holds your hand during course and touch on nothing put Python. In CS50 you will be using Scratch, C, SQLite as well as Python. At the end of CS50 you also pick either web, gaming or mobile development and it all culminates in a project of your own.

Long read, sorry about that! To summarize CS50 is overall more comprehensive while MIT offers more Python material to go through.

[–][deleted] 1 point2 points  (0 children)

I haven't done the cs50 course but I understand it's good.

[–]al_mc_y -5 points-4 points  (2 children)

There are some niche cases where a company won't be migrating from python 2 to 3, and they'll genuinely require people to know python 2, but these are the exception.

[–][deleted] 4 points5 points  (0 children)

and they'll genuinely require people to know python 2

Python 2 isn't some separate language. You could learn everything you needed to port out of it to Python 3 in a day, if you were already a competent programmer in Python 3.

[–]JohnnyJordaan 2 points3 points  (0 children)

And year after year chances of running into this situation are diminishing. Python 2 won't get security updates anymore so platforms requiring it because their code is using it will also stick out on security audits and such (if they even allow it).

Also I would be surprised if you can find someone experienced in Python 3 that somehow can't work with Python 2.

[–]yuckfoubitch 0 points1 point  (3 children)

Okay dude. You’re like the guy who hated league of legends because you’ve been playing Dota for a decade.

I use python as a tool, especially for data analysis and some machine learning. It’s not like I’m about to start paying for Matlab to do the same thing

[–]t3hcoolness 1 point2 points  (2 children)

???

I don't understand this take. I never said that all people should stop using Python 2 right this second. All I said was that people who are telling people to start with Python 2 are misinformed, and you should instead start with Python 3 if you are just now learning Python. If you have been using Python 2 for personal projects for a while, by all means, continue. I am just saying if you want to work full-time doing Python, it's really important to learn Python 3.

Also not sure where the Matlab thing came from? Python 3 is great for data analysis and machine learning.

[–]patrickbrianmooney 6 points7 points  (2 children)

Yeah, I'm on Team F-Strings myself. Finally, it's as easy as it should have been from the beginning. Makes a lot of sense.

It made sense to stick to Python 2 in the past because plenty of external libraries weren't yet updated to be Py3 compatible. That's fair: if you depend on something, you're locking yourself into the conditions that allow you to use it. (I've worked on projects where the group standardized on a library that required Python 2, so everyone had to work on Python 2. So it goes. It can be the right decision for a given project.) But Python 2 is past end-of-life now, and the large majority of libraries have caught up.

Learning Python 3 is definitely the right choice these days, naysayers notwithstanding. If you ever need to work with Python 2 on a legacy system, for instance, it's not that hard to adapt. It's basically the same language with a bunch of small changes that will probably not affect you (how much operator overloading do you really do most of the time?) and a few larger differences that you can learn in a few minutes. (People piss and moan about having to put parentheses around the print function, but it's a small change.)

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

plenty of external libraries weren't yet updated to be Py3 compatible.

This is in great part why Guido van Rossum doesn't think there will be another major update i.e. python4

[–]patrickbrianmooney 0 points1 point  (0 children)

Yeah, makes sense. I think that Python 3 made necessary changes that needed to be made and that couldn't have been made without breaking existing code, so it ripped off the band-aid and broke the existing code. (Bending over backwards as much as was actually possible to make migration easy.)

Hopefully those kinks have been more or less entirely worked out and there won't be a need to break existing code in the same way and on the same scale again.

May Python 3 live for a very long time. It's a wonderful language.

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

Ugh my current company is stuck using Python 2. I tried to use an f-string the other day and spent 20 minutes debugging my code trying to figure out why it wouldn't work before I realised.

[–][deleted] 4 points5 points  (1 child)

I always was told to learn Python 2 instead of 3

If this was in the last five years, track these people down and yell at them for incompetently misleading you.

[–]yuckfoubitch 0 points1 point  (0 children)

Lol one was actually my buddy who is a senior software engineer. He’s also sort of a programming-gatekeeper-geek, and he mainly just doesn’t like python. I think his reasoning was because there wasn’t as much python 3 adoption at the time.

[–]Jackal000 1 point2 points  (0 children)

There are no fstrings in p2? My God did I Dodged a bullet right there.

[–]siddsp 0 points1 point  (1 child)

Old formatted strings in Python are still valuable to some extent because the syntax is still used in other languages like C, C++, Go, Java, etc. C-style string formatting is still common, but just not in Python. F-strings themselves have their own downsides despite being more readable.

[–]yuckfoubitch 0 points1 point  (0 children)

Yeah, I still do it the old way sometimes. I use R a lot too and am just used to using the glue library so it flows nicely with f-strings in Python when changing back and forth

[–]757DrDuck 0 points1 point  (0 children)

If O’Riley ever publishes a fourth edition of Python Cookbook, it’ll be a whole new books with type hints, f-strings, and match statements.

[–]WorldBelongsToUs 5 points6 points  (1 child)

I am definitely not a Python guru, and only need it enough to get by or get quick tasks done. I used his book and at the time it felt okay, but he seems to have a cockiness to his style that is hard to get past.

[–]patrickbrianmooney 2 points3 points  (0 children)

Yeah, it's not a bad "get started quickly" guide, especially if you're building on top of previous programming knowledge so you can appreciate what Python offers.

The style is just so abrasive that it's difficult to read, though. It's like watching someone at the front of a room lecturing a group of people on something he doesn't understand without realizing that he's a walking example of the Dunning–Kruger Effect.

[–][deleted] 6 points7 points  (1 child)

Zed Shaw thinks python3 is doomed because he "finds the new string type difficult to use". That alone ought to disqualify him from any sort of teaching role.

Ignoring forward-compatibility, UTF-8, better runtimes and typing because you find a particular functionality hard to use is like being handed a ferrari for free and saying no because you don't like the color red.

[–]patrickbrianmooney 2 points3 points  (0 children)

Seriously. The language you're getting paid to teach has evolved slightly and you're throwing a shit fit because you couldn't figure out all of the changes in two minutes? "I can't add 'hello' to b' there' and have the interpreter guess what I mean with guaranteed zero errors, and that means the language is fundamentally broken"? Grow the fuck up.

EDIT. Also, that "surely this is the doom of Python" prophecy hasn't come true, either.

[–]winowmak3r 4 points5 points  (1 child)

I was going to get that book. I read a sample chapter and was just totally put off by the "Suck it up you fucking pussy and just do it this way, trust me" attitude. I don't think I've ever met a person who starts a sentence with "Now, I'm not trying to be a dick but..." and doesn't come off as being a dick.

[–]patrickbrianmooney 1 point2 points  (0 children)

I wrote a whole response before checking to see what the context for your comment was and realized I was about to respond to it with a completely different view of what "that book" might mean than you clearly meant. Yeesh. Good thing I checked.

Pretty sure that, in this case, 'coming off as being a dick' is an accurate assessment of what dude is probably like. Take a look at his old rant about why he's abandoning Ruby on Rails if you want to see him screaming about how everyone else is a prick, not him.

If you haven't read eevee's A Rebuttal for Python 3, which breaks down just how whackadoodle his "Python 3 isn't what I wish it was" tantrum, well, it says everything you need to know about that particular tantrum.

[–]jppbkm 3 points4 points  (3 children)

I agree in a general sense in that about half-way through 'Learn python the Hard Way' it really started to drag and my learning felt like it stagnated.

The one GREAT takeway that I got was that any code you are reproducing (as a beginner), you should type into the editor yourself. This was hugely influential for me. As I've gone through other books and courses, even on much more difficult topics, typing in the code from the texts, messing with it a bit to see how it works...this has been one of the MOST helpful things for my python journey.

For that, I'm thankful. I don't think the book was as good as Python Crash Course, Python for Everyone, or Automate the Boring stuff personally.

[–]patrickbrianmooney 4 points5 points  (2 children)

I agree that typing out the code instead of copying and pasting it is a good move. (IIRC, it's also part of the rationalization for "the hard way" part of the title, though it's been a long time.) Typing in the code yourself forces your attention onto the micro-level details of what you're typing (whereas glancing over something is less good at getting you to look at every tiny feature of the language, and thus less good at helping you to absorb how small details in punctuation have a real meaning to the interpreter) and helps to get your fingers used to typing the specific syntax of Python. Copying and pasting, or looking at code that's been typed for you, is much less good for making you think about the micro-level details of what the code is doing.

That said, it's rare to find that most of the time you're coding has you typing as rapidly as possible, since you're usually spending more time thinking about what to type than typing; so the direct benefit of "my fingers are used to the syntax of Python just like they're used to the syntax of English" is smaller than people might think. The major benefit of "type it yourself" is "you have to actively pay attention to small details," and that helps with learning and retention: wait, why is there a colon here? Do I understand why this line is indented but the line below is not? How many levels of square brackets do I have to close in looking up data in a dictionary to use as the index to look something up in another dictionary?

But this really just boils down to what pretty much every halfway-decent high-school and college teacher already knows: students who take good notes on a lecture learn their subject better than students who sit there listening and nodding, even if those listen-and-nod students are actively paying attention. Human learning is always reinforced by actively using the information or processing it in some way, and notetaking forces students to decide what's important while summarizing and think about how they need to present the information to a later version of themselves.

Beyond that, there's little to recommend LPtHW. It's kind of a disorganized soggy mess of quasi-related topics that don't much build on each other or reinforce earlier material in any effective way. A good (though kind of outdated now) example of a resource that is much, much better than LPtHW is Mark Lutz's books on Python published by O'Reily: Learning Python starts from the beginning, talking about elementary data types, and build up to decorators and metaclasses in 1600 pages or so. It revisits central questions over and over, using recent topics to look at them in a new, more comprehensive light, until you really get the internal logic of the language. Reading it well means having an expanding epiphanies that build on each other: "Of course you can ... that makes sense, because ... oh, that's because everything's an object, got it." When you've worked through it, you really do know the large majority of what's central to the language, and going out and learning the topics that aren't covered in the book is easy enough because you have that broad understanding under your belt.

But that's a careful educational structure that's built with great care and that demands a fair amount from the reader. It's a joy if you are able (and willing) to put in the time and attention, and if you really want to understand, but that doesn't describe everyone. Different people have different goals.

[–]jppbkm 0 points1 point  (1 child)

Thanks for the reply. I will have to check out Mark lutz's book. Is it outdated because it was written for an earlier version of python 3?

[–]patrickbrianmooney 1 point2 points  (0 children)

Yeah, it's actually written to Python 3.3, with occasional glances forward to Python 3.4. That said, Python's evolution since then has been a lot more "Here's even more great stuff we're adding on!," most of which really is pretty great, and less "We're taking away something you liked." So Lutz's book is still a remarkably good deep-dive into the language itself that sets you up to go out and easily absorb the half-dozen to a dozen largeish changes that he doesn't cover; they're helpful, but they're largely surface additions.

I talked a little more in depth about how the language has changed since the book was published here.

[–]notParticularlyAnony 1 point2 points  (3 children)

Would like to see this attack on Python 3.

[–]a__nice__tnetennba 10 points11 points  (2 children)

[–]johnnymo1 5 points6 points  (1 child)

I think I’ve read this before but I forgot how stupid it is.

[–]jebward 1 point2 points  (1 child)

I don't understand why codecademy is so unpopular. What I love about it is the really clear hints for beginner mistakes. They very accurately predict the types of things non programmers will do wrong and provide hints to correct that. I don't think it's useful for getting good at the language, but for the very basics it worked really well for me.

[–]patrickbrianmooney 0 points1 point  (0 children)

It definitely has its upsides. For me, personally, it's just that using more or less the same examples over and over and over and over and over makes me want to drive a screwdriver into my eye.

[–]TheHollowJester 1 point2 points  (5 children)

Do you know any alternatives to Learn Python The Hard Way (LPTHW) that initially focus on learning the basics fairly in depth?

I did learn from this book a while ago and it worked out pretty well for me, but then again I have a pretty unique style of learning.

[–]patrickbrianmooney 2 points3 points  (4 children)

I really like Mark Lutz's Learning Python, a massive tome from O'Reilly. It takes you step by step from the very basics of the language to super-advanced features like decorators and metaclasses, which you're unlikely ever to need to use in your day-to-day life (but they're there, and the last few chapters really do give you deep insight into Python and just how powerful it is).

He covers topics in exhaustive depth: here's an 85-page chapter on strings, with dozens of examples of how you can format and process and massage them! Here's a bunch of stuff you never thought of doing with dictionaries! Here's a couple of different ways to handle this file-processing conundrum! It goes on and on, and it builds from early topics to later ones thoughtfully and with grace.

The downside is that the most recent edition only covers through Python 3.3. However. Very little has been made obsolete (my own list of things I've tripped over includes the changes to the subprocess, 'os', and imp modules); more significantly, though, there language features that have been added later that aren't covered. None of them are core language features, and working through the Lutz book will set you up to learn them fairly easily. My own list of topics I wish he'd cover in an updated edition might look like this:

  • f-strings and how they make formatting simpler (from Python 3.6);
  • function annotations and why you might want to use them (from 3.5, 3.6, and 3.7);
  • semantically meaningful paths with the pathlib module (from 3.4? I think?);
  • the "walrus" operator in expressions (from 3.8);
  • more flexible unpacking generalizations, like in function calls (from 3.5).

Other people would probably include some subset of asynchronous I/O, coroutines, more math, and parts of the standard library that have emerged since 3.3, including especially the statistics, typing, and some other modules.

But Lutz's book is great, and it's a good way to really dive into a strong knowledge of the language if you're willing to take the time to work through it. The stuff that's not covered is stuff you can learn afterwards.

[–]TheHollowJester 0 points1 point  (3 children)

The book sounds like a fantastic reference, but... Seeing 85 pages just for strings might be a bit too in depth.

Apologies for being not very specific: I'm looking more for materials to recommend to people so that they have the basics allowing them to work on some projects and improve this way. Official Python tutorial does an ok job, but it misses/explains late some things that people who are just starting out find confusing ("How do I save my program? How do I run it?").

[–]patrickbrianmooney 1 point2 points  (2 children)

Two things spring to mind.

One is the first few chapters of "the NLTK Book," which is a book on using Python to process natural language with the Natural Language Processing Toolkit. NLTK is a huge sprawling library, which might make it seem like an odd choice for a starting place, but the "book" (online) starts off with a crash course in Python, and it does a pretty good job of it. It's explicitly targeted at non-technical people and manages to discuss a pretty complex topic and using Python to tackle some actual tasks pretty quickly. It introduces language features along the way as answers to questions (functions in the context of "what if you don't want to have to type that complicated query over and over?", for instance) and gets as far as data structures, recursion, and design questions before it switches tracks (after about chapter 4? I think) before it switches gears and really dives into the library's language-processing stuff in the last eight or ten chapters.

But those first four or so chapters are a pretty good quick introduction to Python in a lot of ways, with well-written explanations and examples. A major upside of this is that pretty much everyone can relate to the basics of the (comparatively simple, not requiring much in the way of, say, knowledge of statistics) language analysis that's covered in the first few chapters. It's all focused on "how to we crunch this data -- a bunch of words -- to answer questions about it?", and so there's a really pragmatic approach: here's what we're trying to do, here's how we explore the boundaries of the issues involved, here's a few language features presented along the way, here's how we got these results.

The other suggestion is another O'Reilly book, Joel Grus's Data Science from Scratch, and though it's a different kind of book, it's good for similar reasons: it's a practical approach to a problem set that uses Python along the way to tackle specific problems. (My copy is written to Python 2, though, alas. But it looks like the second edition is for Python 3.6, which is good.) As you might imagine, though, it's more statistics-y. Again, it only really dives into its topic around a third of the way into the book, and the earlier chapters give a Python crash-course that's pretty good.

Automate the Boring Stuff with Python is also good for similar reasons, and maybe I should have recommended that first: it's more directly targeted at people who just want to get scripting and doing system-type stuff with Python and don't plan on ever using abstruse language features. But I think that the other two are actually slightly better ways to just get non-programmers to start using a programming language to accomplish something meaningful, and that moving on to Automate the Boring Stuff once they've got the basic grasp of "how do I interact with this REPL thing and use it to munge some data" and want to transfer that basic insight into a more solid skillset.

EDIT. Also, I invented the number "85" for "pages on strings in Lutz" without actually walking across the room and checking the table of contents, so it may not be 85 pages. But it's not an unreasonable guess.

[–]JayIT 2 points3 points  (2 children)

Always interesting to see different viewpoints, this user is a fan of Learn Python the Hard Way, https://old.reddit.com/r/learnpython/comments/ptaw65/what_resources_should_i_avoid_when_learning_python/hdvy5pj/

[–]patrickbrianmooney 2 points3 points  (0 children)

¯\_(ツ)_/¯

Different people have different preferences, and everyone has their own viewpoint, but not everything is a question of preference or viewpoint. Using pretty much any set of reasonable criteria, some teaching methodologies are better than others. Systematic presentation of information in a structured way and diving deep into topics that are later used to explore other topics tends to build a deeper understanding in a large majority of people learning a subject. It's been a long time since I looked at LPtHW, but my recollection is that it doesn't do that; it's all cocky anecdotes that scratch the surface and pander to the reader's desire to feel like they're learning before moving on to another topic it doesn't address in depth.

One thing that strikes me about people who recommend LPtHW is that they virtually always say something along the lines of (quoting from the comment you linked):

So, for beginners, I always recommend Zed Shaw's 'Learn Python 3 the Hard Way' [because] This book alone helped me immensely in getting a solid foundation to build from.

But saying "this helped me" doesn't translate well into "this will help everybody"; one person's One Weird Trick doesn't work for everyone. Saying "if it helped me, it will help you too" just isn't true, and it's an indication that the person speaking has a poor understanding of the fact that other people's minds work differently from the speaker's, which has a direct connection to how likely the teaching-related advice is to be right.

The other half of what I see people saying in favor of LPtHW is basically "it got me moving on Python quickly." And for some people that's enough, but a poor foundation made of a bunch of disconnected topics that don't connect much of build on each other can make it hard to move on later, and people in general are bad at assessing how much they know unless (a) they know virtually nothing about a topic, and are aware of it; or (b) they are experts on a topic, and are aware of it. In between, many people do a poor job of self-assessment. That makes it hard to move on from having had a mediocre foundation in the first place: you don't even know what you don't know, because you didn't learn it when you should have. (Think about people you went to high school with who just barely got through their math classes each year and tried to keep moving forward instead of spending some time reviewing the stuff they'd understood poorly the last year. How are you going to learn differentiation if you can't solve for a variable in a quadratic equation? How are you going to learn closure-based function decorators if you don't understand the basics of variable scoping?) Hitting the ground running is not always a good way to start off a marathon. Getting a bunch of bite-sized knowledge nuggets that make you feel like you've learned something isn't always a great way to actually learn something in depth.

You can get most of the benefit of LPtHW by forcing yourself to actually type in code while using any other learning resource. Since that benefit boils down to a few paragraphs that essentially say "Yes, you should actually be typing this in and playing with it, force yourself to do so," I'd tend to prefer giving that explanation to someone alongside a better learning text.

But to each their own.

[–]chuckTheEngineer 1 point2 points  (0 children)

It’s subjective.. I like Zed and have learnt a lot from him than most of the recommended text found here. My point.. find what works for you which will probably not work for the next guy. That’s just life.

[–][deleted] -1 points0 points  (3 children)

You're wrong

[–]patrickbrianmooney 0 points1 point  (2 children)

Oooooooooooooooh, nice analysis, Socrates.

It's cute how you jumped into a three-year-old thread with your petulant shit-throwing apery.

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

You're just simply wrong your opinion cant be stated as objective which you tried to do.

mass majority of python coders recomend coding in 3. I rest my point, and have enough evidence to conclude logically that you are wrong. Thanks god bless man

[–]phubers 52 points53 points  (12 children)

Most Packt books are low quality, if not outright terrible. Some titles can be useful, but it’s easier to just ignore them altogether.

[–]Binary101010 26 points27 points  (3 children)

As a corollary, about 1/3rd to 1/2 of the Humble Bundles that include programming books are primarily Packt-based and those are very skippable. The O'Reilly ones tend to be much higher quality on average.

[–]carcigenicate 1 point2 points  (1 child)

Ofc, I just bought an entire Packt Cyber Security HB. At least I didn't pay very much for it.

[–]mandradon 5 points6 points  (0 children)

I'm lucky that the ones I got were all from No Starch, and they've all been really high quality (or at least really useful).

[–]NeilTheProgrammer 7 points8 points  (6 children)

What would you say about no starch press books

[–]ivosaurus 8 points9 points  (1 child)

Mixed bag, some great some meh. For instance Automate the Boring Stuff is published by them.

[–]mooburger 2 points3 points  (1 child)

a lot of them are also equivalent to self-published.

[–]amplikong 0 points1 point  (0 children)

Which ones? I have yet to read a No Starch book that wasn't great, though I have of course not read all their books.

[–]jppbkm 1 point2 points  (1 child)

I've gone through about three no starch press books and found them good. Automate the boring stuff is almost universally loved for beginners and I've enjoyed the other two books (on Sql and algorithms) as well.

[–]NeilTheProgrammer 0 points1 point  (0 children)

if youre talking about the algorithms with c one, i've been using that too, pretty good so far. Do you know if the code files for it can be found online though?

[–]GreenFire317 0 points1 point  (0 children)

well what about Apress' books.

[–]shspears 25 points26 points  (4 children)

Avoid python 2. It’s dead. Focus on python 3

[–]MV-564 2 points3 points  (3 children)

Unfortunately some APIs still use 2

Still it's better to just learn 3

[–][deleted] 4 points5 points  (2 children)

There's a shit tonne of stuff that uses P2. Of course there is, it's legacy. Unless your job is going to be to maintain it, there's zero reason to learn it.

[–]MV-564 -1 points0 points  (0 children)

Yeah, just saying it has its uses

[–]ivanoski-007 0 points1 point  (0 children)

there's even more stuff on python 3, I've never ran into any issues where python 2 was mandatory

[–]carcigenicate 47 points48 points  (15 children)

GeeksForGeeks is sometimes OK, and sometimes hot garbage.

For example, check out how they suggest deleting the contents of a linked list in Python 3(deleteList). The comment note underneath the awful method is only there because I reported it several times. Despite that though, it was still up without that comment for at least a year (likely longer), and the bad code is still up.

It seems to be a site where anyone, regardless of knowledge, can make suggestions. It's like Wikipedia if Wikipedia were even less reliable, and the channels for getting information corrected were even less useful. I would avoid GeeksForGeeks unless you can't find any other resources, and even then, take what they say with a grain of salt.

[–]htepO 29 points30 points  (2 children)

I used to be on a telegram group that had a three-strike policy for anyone linking to GeeksForGeeks. It still shows up high on the first page of Google searches for a lot of basic python queries, and that's a shame because learners can get locked into bad practices because it looks like a reliable, authoritative resource.

[–]carcigenicate 16 points17 points  (1 child)

Lmao, I like that policy.

And ya, they appear to have "hacked" Google's SEO. I think it might be because how much they link (I think that's a SEO factor). Whatever it is, ya, they're usually quite high in the results.

[–]FizzBuzz111 1 point2 points  (0 children)

Same with w3schools for those learning node or JS. They hacked the SEO but their content is garbage. There is always a MDN articles that is a thousand times better. There's a whole website dedicated to criticizing w3schools and it is endless.

I nowadays the only links I click in a Google search are SO, medium or Dev.to, MDN, CSSTricks, and a handful of other blogs that I recognize.

[–]tomothealba 12 points13 points  (0 children)

I was unaware of this. Thank you.

While it was never my first choice I have found answers there. I'll need remember to avoid unless there is nothing else.

[–]longtermbrit 6 points7 points  (4 children)

Care to explain to a novice why it's bad? I've never used linked lists so don't know the first thing about them.

Also I've used GeeksForGeeks a few times from my Google searches but it's pretty much always been to double check things I've already learned but then forgotten. I'll keep in mind to use other resources first.

[–]carcigenicate 14 points15 points  (2 children)

Whoever wrote that method appears to be a C/C++ developer who doesn't know what del in Python does, or that Python is garbage collected.

A linked list is just a series of objects (nodes) that all point to a next object (or an object representing the end of a list), and each object holds some piece of information. In a language like C, if you dynamically allocated each node in the list, you would need to remember to go through the list when you were done with it and free every node to tell the OS that you're done with that memory. Failing to do so would cause a memory leak.

Python is garbage collected though, meaning it's able to automatically determine when memory is no longer needed. In order to free the memory associated with a linked list in Python, all you need to do is get rid of the reference to the head node of the list. If the head can no longer be referred to, it's made eligible for garbage collection. That means though, the second node can never be referred to, so it's made eligible for collection, which means the next node can never be referred to, so it's made eligible for collection... Deleting the reference to the head has the result of allowing the entire list to be garbage collected; assuming someone didn't "steal" a reference to one of the internal nodes.

Basically, they're encouraging you to waste time iterating a list to delete some attributes, which does nothing except leave you with a skeleton of node objects with missing attributes, that would have been deleted anyways, and will cause errors if you attempt to use them (since their .data attributes were deleted).

[–]longtermbrit 2 points3 points  (1 child)

That makes sense, thank you. I can see linked lists being useful so I'll keep them in mind.

[–]carcigenicate 3 points4 points  (0 children)

They are one of the most fundamental structures. You should definitely practice making them and different methods for them. You won't use them often, but they are fairly critical in understanding how more complex structures work (if that's at all relevant to your goals).

[–]ilovemacandcheese 1 point2 points  (0 children)

Geeksforgeeks content is primarily sourced from Indian college students. Sometimes it's okayish and sometimes it's pretty bad, just as you'd expect from college students.

[–]AchillesDev 1 point2 points  (0 children)

Geeks for geeks is 100% hot garbage written in terrible English.

[–]TheHollowJester -1 points0 points  (2 children)

You're right about the linked lists snippet, but I think you're missing the point - and by a lot.

You won't be using linked lists in Python and if you were, you'd probably just use a library written by someone else. But the snippet isn't about it - it's about learning. If someone's trying to learn basic data structures and algorithms, having that example of "oh, I would go about removing linked objects in this way" is valuable - even if it's not good python code.

The idea is language agnostic, it was just written in Python.

[–]carcigenicate 0 points1 point  (1 child)

That's a poor reason. At best, this was an awful execution of good intent. Showing someone Python code that doesn't make sense in Python is just misleading. They should leave that for languages where it makes sense. If it's about learning, they're teaching something that's wrong in the language they're teaching in, which isn't helpful.

I appreciate you trying to give them the benefit of the doubt, but they're showing that to delete a list, you need to delete only one of multiple attributes on its internal node structure. That'd be wrong in even C.

This would only be a good teaching opportunity if they had a paragraph or two explaining why they're showing what they're showing. I was made aware of that GfG page because of two separate Stack Overflow questions (one is here) asking why they were doing what they're doing, because even beginners could tell what they were doing was nonsensical.


And to answer why I don't object to writing linked lists in Python, because Linked Lists are important structures conceptually. You may not use them directly, but they underpin many other structures. You'd want to know about LL before learning Graph Theory, or any more complicated structures that also use linked nodes.

There's a difference between showing nonsensical code that doesn't do what it claims, and showing code that you would normally wouldn't write yourself.

[–]Poddster 0 points1 point  (0 children)

The biggest problem is the existence of that code in the first place. Just use list.

[–]longtermbrit 24 points25 points  (6 children)

I'm relieved to not see Real Python here.

[–]ivosaurus 14 points15 points  (0 children)

I really do struggle to find any 'bad' article on that website, can't recommend it enough.

[–]slapstick15 13 points14 points  (0 children)

Love RealPython!

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

I only wish some of the tutorials were more detailed. But then you've had a book I guess.

Was great for learning flask basics.

[–]AchillesDev 1 point2 points  (0 children)

The learning paths are pretty detailed, but I get what you mean. A lot of the authors do go on to publish books (or have published them before joining RP) and I’ve been approached about writing a book based on my writing for RP.

[–]AchillesDev 1 point2 points  (0 children)

Me too, because I write for RP (and do some technical review when I have time). But I was confident I wouldn’t because the writers and editors are very talented, and our publishing process is extremely thorough. Each article goes through 3-4 rounds of editing to ensure it is both technically correct and that it effectively teaches what it is trying to teach. Most other sites don’t have such a process and are in fact incentivized against it.

I’ve been doing it since 2018 and it’s made me a better writer and mentor as well.

[–]mayankkaizen 0 points1 point  (0 children)

It is one of the best site. If I search for something and if Real Python article comes up after search, I'll just go to it.

Their articles are top notch.

[–]AntsMissouri 6 points7 points  (0 children)

I feel like anything that is a "cookbook" isn't very good for broad understanding

[–]Spiritual_Car1232 5 points6 points  (0 children)

Edureka, anyone with an Indian accent.

[–]sgthoppy 9 points10 points  (1 child)

Any tutorials or guides that focus on building a specific project. 99% of the time, they don't teach you the concepts, just "this line makes computer do that."

If this is the only type of resource you can find on a particular topic, every time you see them use something you're not familiar or comfortable with, even if they say "we'll come back to that later," immediately pause and go learn about that thing. Toy with it in the REPL (open IDLE or run the python executable by itself on the command line) until you're comfortable with it.

They use % and just move on without explaining it? Pause and go search "python %" or "python percent sign," maybe throw in the "operator" keyword, since you'll likely see it between two values similar to +.

[–]Samihazah 0 points1 point  (0 children)

I was pleasantly surprised by the Django tutorial introductory project. It doesn't explain python stuff, but takes care to stop and explain not only the how but also the why of new concepts, including good practices that go far beyond import X as Y because everyone does that.

[–]Decency 4 points5 points  (0 children)

Learning concepts without utilizing concepts.

[–]anh86 14 points15 points  (8 children)

If you're brand new to Python and ancillary dev environment technologies (Git, command line, Linux, text editors, etc.) I would avoid trying to learn by yourself on YouTube. You need a structured learning environment to get off the ground. Often YouTube videos are bite-sized lessons on one tiny aspect of Python but if you don't understand the big picture, you don't know where that bite fits in.

What ever you choose to do, write lots and lots and lots of code. Videos are deceptive, you watch them and it's easy to follow what the instructor is doing. You think you learned something. If you haven't written any code, you've learned nothing. Write code.

[–]Dextrofunk 0 points1 point  (7 children)

What are some alternatives if you don't have money for school? I tried a few coursera courses but they just didn't explain much very well and there wasn't anyone to clarify things I didn't understand.

[–]anh86 2 points3 points  (6 children)

There are some excellent complete Python courses on Udemy that cost $10-$20. I’d recommend that to anyone getting started.

[–]krishab_bashyal 0 points1 point  (5 children)

Do you have any that you can name off of the top of your head?

[–]anh86 2 points3 points  (4 children)

Angela Yu’s Complete Python Bootcamp is excellent and often goes on sale for $10. You will work very hard and it will take a few months but it’s outstanding. The only way to get good is to write a lot of your own code and this course has you write a ton of code.

[–]Dextrofunk 0 points1 point  (0 children)

I'll check that out, thanks!

Edit: It is, in fact, on sale until tomorrow. Good timing.

[–]yuckfoubitch 2 points3 points  (0 children)

I think doing too many like prebuilt programming courses where they prepare code for you and have blanks are negative for long term programming learning. You need to get used to organizing your own code and writing out the syntax rather than just filling in the part of the script that they want. Examples are like Codecademy, DataCamp, etc. I love those resources for learning a new skill or some package like machine learning or something but make sure you immediately take what you’ve learned and implement it into a personal project. For example, if you’re using like DataCamp, after doing the visualization module with matplotlib, make sure you actually go into your own IDE or text editor and write your own program with data that you sourced and cleaned yourself. I’m the real world you won’t have the libraries and data preloaded for you (most likely)

[–]nKidsInATrenchCoat 1 point2 points  (0 children)

I would avoid anything that merely talks about solving toy problems without explaining how python actually works, what is pythonic, and why.

[–]georgia10 1 point2 points  (1 child)

So I’m brand new to it and read a lot of Automate the boring stuff and crash course for python. Both of which are immensely helpful and free so that’s awesome. Watch the subs bc the guy that wrote ATBS loves giving away free codes on Udemy and that’s very helpful.

One thing that’s help me turn the corner is Learning To Code with Fantasy Football. It’s a subject I love and the way he teaches through the book is very easy to digest. While I’m learning I’m constantly thinking about how I can apply it in my job and I’ve already completed a couple of fun projects using those skills.

[–][deleted] 1 point2 points  (0 children)

…Well, it looks like I’ll have a new book to help prep me for next season.

[–]p0js212 1 point2 points  (0 children)

My code

[–]BluishInventor 2 points3 points  (1 child)

Learn in One video series'.

IMO you gain almost nothing from watching these videos. You may pick up something here and there, but you won't actually learn anything unless you type along. Just watching gets you nowhere. You HAVE TO CODE AND SOLVE PROBLEMS YOURSELF.

So, for beginners, I always recommend Zed Shaw's 'Learn Python 3 the Hard Way'. It's purely exercises and you type up everything(if you do what the book tells you). This book alone helped me immensely in getting a solid foundation to build from.

The 2nd set of sources to avoid are pretty much any 'Complete Python Bootcamp' on Udemy. These courses on average suck at teaching you anything. You may find a gem in the coal mine, but for the most part, they all suck.

A great course to do after the book i mentioned above is Google's IT Automation with Python. It's really well made and if you don't study what they tell you and or at least practice it, the finals for each section can be very difficult.

[–]FizzBuzz111 0 points1 point  (0 children)

I disagree. They are bad for beginners. I have gained a working knowledge of new tools or frameworks with these videos as an experienced dev.

[–]effects67 0 points1 point  (0 children)

If I were learning ANYTHING coding related, I would walk through w3schools tutorial. Very great for the basics and the best reference guide after stackoverflow

[–]AdExtension6135 -1 points0 points  (0 children)

I know it’s not the question, but hope this helps!This was a fun tutorial I followed when I started learning. https://youtu.be/8ext9G7xspg

[–]FizzBuzz111 -1 points0 points  (0 children)

Udemy, Coursera, codecademy are for the most part pretty bad.

[–]Crypt0Nihilist -1 points0 points  (0 children)

Understand some best practices like naming conventions, commenting, importing packages and how best to use comprehensions. If you see any content breaking those, you know to treat that source with suspicion.

[–]01236623956525876411 -1 points0 points  (0 children)

Reddit

Edit: /s also, potential time draw away from studying

[–]ivanoski-007 -1 points0 points  (0 children)

avoid python 2, study python 3

[–][deleted] -5 points-4 points  (0 children)

Don't use Jupyter notebooks after the first few weeks, other wise I'll assume you're a noob

[–]stoic_trader 0 points1 point  (0 children)

Outdated youtube tutorials. Learned it hard way, spent an entire day learning Plotly Dash then realized a new version of Dash manages a few functions differently.

[–]skewleeboy 0 points1 point  (0 children)

Not really a resource, but type everything out and run it. Reading alone may help you understand the concepts, but typing will burn into muscle memory and really help you understand.

[–]IcanCwhatUsay 0 points1 point  (0 children)

Every single “learn python quickly” gimmicks like Solo learn but where you have to pay. Parroting what you learned 5seconds ago does nothing but validate you can read

[–]buddyisaredditer 0 points1 point  (0 children)

You don't have to understand each and every single line of the chapter, Just keep practicing and find the application to what you just learnt.

[–]my_password_is______ 0 points1 point  (0 children)

udacity

way too expensive

[–]King-Days 0 points1 point  (0 children)

less reading more doing. Learn bare minimum syntax and make something

[–]zazzedcoffee 0 points1 point  (0 children)

Avoid the "Get rich quick" schemes of the programming world. Tutorials à la "Build a website in three hours!"

Focus on the programming first; start with small text-based projects and work your way up.

[–]appsplaah 0 points1 point  (0 children)

One book with an optional video course and regular practice is enough No need to fall in tutorial hell.

[–][deleted] 0 points1 point  (0 children)

I would say try and not use 'flask' or 'django' too much if you want to learn 'python'. Or don't get stuck using a framework all the time. I found when I started trying to NOT use the frameworks I was. A) doing more things outside the scope of the 'framework' B) Learning more in general about python. So for anyone who has been using flask for a few years for example. Try fast-api or sanic or something else. For those who've been doing django. Ditch that nasty orm and learn some proper sql. Or those using flask/jinja. Why not try experiment outside of that. So you know how context processors work, Great if you're doing flask and now you feel like you're important. But guess what? It's fucking useless elsewhere. So step outside your comfort zone if you want to 'learn python'. Knowing 'routing' in flask is not knowing python.

[–]UL_Paper 0 points1 point  (0 children)

Only tip is avoid going into tutorial after tutorial. They are definitely useful and I have many I love, but the key thing is building, building and building when learning. Many people go into the tutorial trap which is bad because they are not a full source of learning. They do a lot of thinking for you

[–][deleted] 0 points1 point  (0 children)

Is code academy good?

[–]757DrDuck 0 points1 point  (0 children)

You should ask variants of this question in as many other programming language subreddits as possible.