5 ms·
He's just straight up wrong about putting the filename in a comment at the top of the file. It's true: files change names all the time, why make someone change
by Locke1689 15y ago
He's just straight up wrong about putting the filename in a comment at the top of the file. It's true: files change names all the time, why make someone change them in two places every time? Moreover, he should be describing the module using PyDoc, not comments.
I'm worried: Sal does not seem like a professional software developer or someone who's done significant software maintenance. Like Visual Basic, he could end up just teaching bad practices that people who watch his videos will just have to unlearn later.
Personally, I'm still going to recommend that people read Learn Python the Hard Way, not watch this video.
- spicyj 15y agoI agree with you about the filename, I think PyDoc is probably overkill for something so simple. There's no reason to confuse new people with PyDoc. (Does Zed use PyDoc in LPTHW? No. (Except for the pydoc command suggested for reference.))
- Locke1689 15y agoI'm not sure why PyDoc is so complicated: just explain it like a comment that you only put in certain places. You don't have to explain build tool integration or anything.
- rubergly 15y agoWhen you teach basic math, do you start with introducing the student to proof theory? In any field, the natural process is to relearn how to do things. I certainly have had to change how I program, how I document, etc., and I think I am a better programmer because of learning to adapt to those things when I've found a better solution. LPTHW looks like a great book and may be a much more thorough introduction to Python for someone who is committed to learning the language; these videos are not really focused on that demographic. LPTHW is great if you're already a programmer or go in knowing you really want to learn how to program; hopefully where these videos can succeed is bringing in new people who are mildly interested and getting them started while showing them how fascinating programming can be. One day, hopefully Khan Academy will have enough videos and interactive exercises that a programming education will be as thorough as LPTHW, but that doesn't happen overnight.
- Locke1689 15y agoHe's not simplifying things by putting the filename at the top of the file: he's just wrong. This is stuff which is clearly learned because people who don't know how to program correctly pass on little pieces of code like secret incantations without really thinking about them. I'm not saying that adding extraneous comments at the top of your file is the end of the world: I'm saying that Sal violated basic programming practice in one of the simplest 10 line programs that can be written. This is a canary. What makes good teachers so good is that they know their field so well that they can use all of their gathered knowledge to help clarify and guide people who don't know any better. It doesn't matter how good a teacher you are if you really don't know what you're teaching.
- rubergly 15y agoWhen I referred to simplification, it was more in reference to the comment about not using PyDoc than to the filename issue. Regarding the filename issue, I think you are blowing it completely out of proportion. I don't personally believe in it, but it's definitely a style thing, and it's definitely not something that only people who don't know how to program do.
- statictype 15y ago
- methodin 15y agoTalk about nitpicking. You are clearly missing the point here. These videos are not aimed to tell everyone everything there is to know about a topic. They are there to lay the basics or spark some interest after which the person should go off on their own with a basic understanding and learn more. Can you can honestly sit there and tell me that commenting would be a major focus on an intro to [insert language here]?
- tdfx 15y agoI don't think the OP is asking Sal to throw in multiple PEP explanations in each 10min video. But looking at it from an absolute beginner's point of view, you're going to assume that Sal is (at least at this point) the authoritative source of how to do things in Python. You're going to comment all your programs this way. It's going to be a habit you have to unlearn later, or worse spread to others. The real issue is that there is already a clearly defined way to do these things. If you've got any meaningful experience with Python, you should be following at least the spirit of the PEPs. I don't think that's unreasonable for Sal to do.
- statictype 15y agoIf you've got any meaningful experience with Python, you should be following at least the spirit of the PEPs. I don't think that's unreasonable for Sal to do. The dude's got so much knowledge on such a large breadth of topics. I wouldn't be surprised if he didn't know or care what a PEP was.
- deleted 15y ago[deleted]
- deleted 15y ago[deleted]
- espeed 15y agoKhan is doing several things at once -- teaching about comments, teaching that the program's file name can change without changing its functionality, and underscoring that this is a program that computes factorials. These type of efficiency tactics enable him fit a meaningful lecture in under 10 mins.
- kashif 15y agoHe is not wrong about the filename. Filenames in comments are useful when you print a program - as is often the case for students.