News for hackers. Stuff that matters.
Re:Sal Khan has started videos about Python by Locke1689 on Wednesday June 29, 2011 @07:37PM (#2711816)
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.

Re:Sal Khan has started videos about Python by rubergly on Wednesday June 29, 2011 @07:55PM (#2711872)
When 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.

Re:Sal Khan has started videos about Python by Locke1689 on Wednesday June 29, 2011 @08:02PM (#2711899)
He'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.

Re:Sal Khan has started videos about Python by statictype on Wednesday June 29, 2011 @09:23PM (#2712085)
Sorry, but this comes off as typical nerd-rage, nitpicking about things that don't matter.

This video isn't trying to make people into professional developers any more than his videos on algebra are trying to teach research-oriented mathematics.

Re:Sal Khan has started videos about Python by Tiomaidh on Wednesday June 29, 2011 @11:50PM (#2712470)
He's not upset about the filename-comment per se, he's worried that it's an early warning--it indicates that Khan isn't very experienced with software development (which, in my opinion, is a valid conclusion), and that that'll cause more serious problems in the future.
Re:Sal Khan has started videos about Python by wisty on Thursday June 30, 2011 @12:15AM (#2712532)
Remember when people started slamming him for oversimplifying history, or getting other minor facts wrong on non-programming subjects? Everyone on HN just said "it's free, it's interesting, and who cares as long as students get the basic idea?"

Now that he's making minor mistakes on programming, HNers are upset he's not a software engineering expert.

Re:Sal Khan has started videos about Python by Locke1689 on Thursday June 30, 2011 @10:49AM (#2714238)
I'm not being hypocritical: I think that he should start consulting experts for all his classes. I'd much rather have a site that crowdsources experts to teach topics than have one guy with a shallow depth of field on a lot of topics do it.
Re:Sal Khan has started videos about Python by mixmastamyk on Thursday June 30, 2011 @02:58AM (#2712975)
I'm willing to cut the guy a break. ;) However now that donations (I assume) are coming in, its probably about time to start consulting with experts before starting a class.
Re:Sal Khan has started videos about Python by Adam503 on Thursday June 30, 2011 @05:28AM (#2713244)
Willing to cut the guy a break, huh? How big of you.

Are you willing to actually do any work to improve it, or give a big cash grant so KhanAcademy.org can hire those professional programmers to help out?

Re:Sal Khan has started videos about Python by mixmastamyk on Thursday June 30, 2011 @02:17PM (#2715127)
Woosh.
Re:Sal Khan has started videos about Python by statictype on Thursday June 30, 2011 @12:10AM (#2712514)
Yes, its obvious that he hasn't written a lot of production code. Again, so what?. That's not in any way an early warning that he isn't capable of teaching basic programming skills to others.
Re:Sal Khan has started videos about Python by rimmjob on Thursday June 30, 2011 @01:58AM (#2712830)
exactly. if the viewers of these videos intend to become serious software developers then they can just correct whatever wrong shit they learn. if they don't care about best practices then it is still better that they know how to do the basics to automate mundane tasks then not know any at all.
Re:Sal Khan has started videos about Python by salemh on Thursday June 30, 2011 @12:07AM (#2712505)
Like what? (Seriously; more people getting interested in programming, candidates after Khan's video's somehow "slipping through" the interview process for a Jr position? Or, (where I can see your point), setting up bad practices?))
Re:Sal Khan has started videos about Python by ern on Thursday June 30, 2011 @06:21AM (#2713351)
I don't know how much code Sal has written, but, depending on the project/coding standards, I've seen a lot of code with filename comments at the top. It's not really an indicator of experience or skill.
Re:Sal Khan has started videos about Python by pbreit on Thursday June 30, 2011 @07:55AM (#2713615)
Yeah, that's an odd gripe. Check out code igniter for example. One ofthe popular php frameworks...filenames in comments.

I guess I can understand why people criticize Khan but it seems so wrong. Just pretend that khan is for the other 7 billion people!

Re:Sal Khan has started videos about Python by ern on Thursday June 30, 2011 @05:30AM (#2713247)
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.

I didn't think that the video (now dead) was particularly good, but I think that this is a bit of an overreaction. LPTHW doesn't seem to use PyDoc comments either. Would I be upset if he used C# and put a // comment at the top of a method, instead of a /// comment? Probably. Would I regard it as evidence that he wouldn't be able to teach programming? No.

He's not simplifying things by putting the filename at the top of the file: he's just wrong

Maybe this is a Python thing, but there's a semi-official, but fairly popular tool from Microsoft called StyleCop that forces C# code to have a comment with the filename at the top. Bottom line: putting a filename at the top is not regarded universally as a bad practice, even among professional programmers.

Re:Sal Khan has started videos about Python by Adam503 on Thursday June 30, 2011 @05:23AM (#2713234)
More proof that no good deed goes unpunished.

Will you be putting up your own website of free programming tutorial videos done the way you think they ought to be done? Will you offer to volunteer your time to Khan Academy.org to produce programming videos the way you think they should be done?

Yeah... that's what I though.

Re:Sal Khan has started videos about Python by Locke1689 on Thursday June 30, 2011 @10:56AM (#2714269)
First, your argument is a logical fallacy. There's no reason why I need to give a better solution in order to point out that an existing one is not good enough.

Second, I feel no need to replicate LPTHW.

Re:Sal Khan has started videos about Python by rubergly on Wednesday June 29, 2011 @08:28PM (#2711957)
When 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.
Re:Sal Khan has started videos about Python by ern on Thursday June 30, 2011 @04:05AM (#2713084)
When you teach basic math, do you start with introducing the student to proof theory

I know that it isn't your main point, but I when Sal inevitably moved to CS, I was hoping he would start with theoretical CS first. He seems strongest on mathy topics, and I think his style of teaching could be very useful in that area.

Re:Sal Khan has started videos about Python by Goladus on Thursday June 30, 2011 @08:49AM (#2713780)
When 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 wonder, has it ever been tried? (starting with proof theory)

Re:Sal Khan has started videos about Python by methodin on Wednesday June 29, 2011 @08:56PM (#2712021)
Talk 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]?
Re:Sal Khan has started videos about Python by tdfx on Wednesday June 29, 2011 @11:36PM (#2712422)
I 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.

Re:Sal Khan has started videos about Python by statictype on Thursday June 30, 2011 @12:26AM (#2712571)
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.

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.

Re:Sal Khan has started videos about Python by espeed on Wednesday June 29, 2011 @09:48PM (#2712154)
Khan 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.

Re:Sal Khan has started videos about Python by spicyj on Wednesday June 29, 2011 @07:52PM (#2711864)
I 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.))
Re:Sal Khan has started videos about Python by Locke1689 on Wednesday June 29, 2011 @07:55PM (#2711873)
I'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.
Re:Sal Khan has started videos about Python by spicyj on Wednesday June 29, 2011 @07:59PM (#2711887)
The video was trying to show a simple program; it's better for less syntax (often confusing for beginners) to have to be explained, at least at the start.
Re:Sal Khan has started videos about Python by Locke1689 on Wednesday June 29, 2011 @08:05PM (#2711908)
He could have just used the syntax for PyDoc and explained comments later.
Re:Sal Khan has started videos about Python by spicyj on Wednesday June 29, 2011 @08:23PM (#2711948)
Curious – Zed didn't use PyDoc, does that make his book bad too?
Re:Sal Khan has started videos about Python by Locke1689 on Thursday June 30, 2011 @10:42AM (#2714205)
Nope. I shouldn't have put those two things together because one is bad programming practice and the other is just a disagreement I have with his style.
Re:Sal Khan has started videos about Python by kashif on Thursday June 30, 2011 @01:48PM (#2715021)
He is not wrong about the filename. Filenames in comments are useful when you print a program - as is often the case for students.