News for hackers. Stuff that matters.
Re:Khan Academy: Computer Science by danso on Tuesday November 01, 2011 @03:07PM (#3183605)
I've never used a Khan Academy video but that's out of pure negligence on my part, not skepticism.

That said, I have always wondered how effective video is as a teaching tool for programming? I guess when I think about it, it's the same delivery tool as an in-person lecture, but in some ways, more effective since you can pause, rewind, etc.

See the comments on this article about how to do a Fibonacci recursive example (which seems to be well done; the teacher takes it as slow as humanly possible): http://www.khanacademy.org/video/recursive-fibonacci-example...

The top comments are from people not knowing the difference between the equality and assignment operators:

"Why do I get an error with a single equal, but not with a double? This is what hung me up for a while."

...I don't know the history of this particular user, it's possible he/she skipped a bunch of the basic lessons and decided to learn recursion...but I wonder if there's a better way to somehow make sure people get the basics down, in an online teaching environment.

Re:Khan Academy: Computer Science by capnrefsmmat on Tuesday November 01, 2011 @04:10PM (#3183926)
> That said, I have always wondered how effective video is as a teaching tool for programming? I guess when I think about it, it's the same delivery tool as an in-person lecture, but in some ways, more effective since you can pause, rewind, etc.

I've dug up a lot of papers on effectiveness of teaching strategies in physics in particular (since I'm a physics student), and it seems in physics that your time spent working practice problems and making predictions about experiments is more important than actual lectures.

An example:

http://www.sciencemag.org/content/332/6031/862.abstract

If anything, I think the Khan Academy is best suited for a mixed approach where students watch lecture videos, then attend a problem session or help session to work examples, get help on exercises, and so on. The Khan Academy's exercise framework is an important step in this direction, and I hope they continue to improve it.

Re:Khan Academy: Computer Science by non123 on Tuesday November 01, 2011 @03:19PM (#3183676)
I remember I first bought a Java book to learn to program when I was around 15-16. I tried for days but couldn't figure out why the first example program wouldn't work, it was because it wasn't System.out.print1n but System.out.println. In the font the code was written in, I couldn't tell. Because of that it wasn't until at least a year later that I didn't try again.
Re:Khan Academy: Computer Science by dexy on Tuesday November 01, 2011 @03:27PM (#3183708)
Exact same thing happened to me when trying to do my first cs problem set. It was some filename that I was sure had a 1 in it but it was an l. It's almost as if courier tries as hard as possible to make the two look the same.
Re:Khan Academy: Computer Science by jleader on Tuesday November 01, 2011 @04:18PM (#3183956)
Courier was intended to look like a traditional typewriter font. For many decades, most typewriters didn't have a key for 1 (one), you were supposed to use the lower-case l (ell) instead.

Teletypes did have a one key, probably because they were all-uppercase, so there wasn't a lowercase ell available.

Re:Khan Academy: Computer Science by manish_gill on Tuesday November 01, 2011 @03:57PM (#3183879)
Happened to me while learning C++. endl or end1...so confused.
Re:Khan Academy: Computer Science by hsshah on Tuesday November 01, 2011 @07:20PM (#3184612)
Good point. That's why I am big fan of teaching "Computational Thinking" before any specific programming language. Personally used Scratch (from MIT) to teach my nephews and niece. It worked well to cement their core concepts.

http://scratch.mit.edu/ http://info.scratch.mit.edu/sites/infoscratch.media.mit.edu/...

Re:Khan Academy: Computer Science by pbhjpbhj on Tuesday November 01, 2011 @07:44PM (#3184697)
Do you know of a basic introductory course using Scratch so I don't have to ad-hoc it so much? We're supposed to be building a game but I need something, like KhanAcademy, that I can give my primary-aged son space to explore by himself without me hovering over him.
Re:Khan Academy: Computer Science by hsshah on Wednesday November 02, 2011 @03:46PM (#3188621)
You may want to refer to the curriculum link I posted in the thread below. I don't think it is sufficient for what you are looking for. In fact, these days I am spending time on developing such a course (actually it is more than just programming; it includes intro to hardware and communications). Happy to share it with you when it is done. Also, would be open to receiving suggestions for it (based on your experience)
Re:Khan Academy: Computer Science by wiredfool on Wednesday November 02, 2011 @03:05PM (#3188414)
I'm pretty much winging it with the Middle Schoolers. Normally I throw a quick demo up on the big screen, talk about it for a couple of minutes pointing out what it does that they were struggling with in the last class.

Then they work on doing something interesting while I answer questions and ask "What happens if...".

Re:Khan Academy: Computer Science by hsshah on Wednesday November 02, 2011 @03:42PM (#3188600)
In case you are interested, there is a curriculum that ScratchEd team has developed. http://scratched.media.mit.edu/resources/scratch-curriculum-... Personally, I also "wing it". I encourage them to come up with ideas for games, animations that implicitly requires them to cover all aspects of "computational thinking". It's implicitly because I don't want them to think of this as too academic; let them have fun while learning (for a change!)
Re:Khan Academy: Computer Science by wiredfool on Thursday November 03, 2011 @12:49AM (#3190342)
Looks interesting -- they posted that a week or two after I was searching. We're heavily into animations and games right now, including one where the student is building up space invaders, one complication at a time.
Re:Khan Academy: Computer Science by sethg on Tuesday November 01, 2011 @08:10PM (#3184759)
My nine-year-old son learned Scratch last year. Oh, if only I had that when I was nine....
Re:Khan Academy: Computer Science by manish_gill on Tuesday November 01, 2011 @03:44PM (#3183831)
>I have always wondered how effective video is as a teaching tool for programming? I guess when I think about it, it's the same delivery tool as an in-person lecture, but in some ways, more effective since you can pause, rewind, etc.

It's a lot better than some of in-person lectures I've taken, but maybe that's just me. I've been encouraging my peers to use online videos as a source to learn stuff they have a hard time grasping in class for quite a while. They don't listen, but that's another matter...

Anyways, I'm glad Khan Academy is coming out with this. I was freaking out when I couldn't solve some project Eular questions, and pretty much lost all of confidence in my programming abilities for a while. Online tutorials helped me a lot, and I think I've become a better programmer because of that.

One small nitpick: I haven't seen the videos yet, but it looks like they'll be in python. I'd rather it be C or C++. From what little I know of the language, it's pretty easy to pick up, and doesn't put pressure on the programmer to take care of details like memory management etc. I know for a fact that many algorithms that I've implementer in C++ that take over 100 LOC, I've found solutions online that have the same algorithm in 20-30 LOC. Used to irritate me a lot. :P

Re:Khan Academy: Computer Science by loup-vaillant on Tuesday November 01, 2011 @03:57PM (#3183881)
C or C++ are definitely not a good idea. The beginners' brains will be too occupied with curly brackets and semi-colon. There's also the brain-dead notation for types (see function pointers). The poor souls already have a hard time differentiating assignment and comparison, just because of counter-intuitive notation (compared to high school).

As experts, syntax doesn't annoy us. We see past the curly brackets (or the parentheses), because we can quickly see the internal AST that derive from them. Beginners can't.

Now, it would be wonderful to teach them a systems language that forces them to manage their own memory. I think a good candidate would be to keep most of the semantics of C, but simplifying its syntax (and find a solution to simplify includes).

Re:Khan Academy: Computer Science by manish_gill on Tuesday November 01, 2011 @04:10PM (#3183929)
Yeah, but I still advocate the use of C++ over Python. Just because of the fact that I can now appreciate what goes on under the hood instead of groaning that why should I learn it when the "language takes care of it". Many classmates of mine really enjoy Java because of they had learned C++ first. It's a harder learning curve, but I think it's worth it.
Re:Khan Academy: Computer Science by loup-vaillant on Tuesday November 01, 2011 @04:25PM (#3183978)
If you have to, pick C. Never ever touch C++, especially its standard IO library. Classes are of very little interest anyway (C easily emulates modules), they can learn it later.

There is a crucial point that should not be ignored. The first two languages someone learns should be easy. Monstrosities like C++ give the poor beginner the impression that learning any language is hard to learn, and that would discourage such learning in the future.

Re:Khan Academy: Computer Science by 2arrs2ells on Tuesday November 01, 2011 @06:23PM (#3184419)
I agree with you 100%, if you're learning to program on your own.

I disagree 100%, if you're talking about a college curriculum. The intro class at my university [1] used C, and I'm incredibly grateful. If I hadn't been forced to grok pointers and malloc, I'm not sure I ever would have (I haven't done any C programming since then). But even though I'm not writing C directly, knowing how things work at a lower level has helped me understand all sorts of concepts in higher-level languages.

[1] http://cs50.tv

Re:Khan Academy: Computer Science by loup-vaillant on Wednesday November 02, 2011 @04:31AM (#3185849)
Err, I agree with much of your "I disagree" paragraph. Maybe you should re-read my previous comments.

I don't loathe C nearly as much as C++. I understand that learning about low level is useful. Pointers are indeed a very important concept (though not so difficult once you understand that variables themselves are already a form of indirection). So is Manual memory management.

But if you are tempted to put C++ in the same basket, don't. C++ is a very very different language from C. Sure, it looks like it just has some additional features here and there, but those features make C++ practices very different from C ones.

Re:Khan Academy: Computer Science by ceol on Tuesday November 01, 2011 @09:34PM (#3184979)
I disagree. I don't have any data to base this on, but I think it would be easier for a new programmer to learn logic first and then worry about what goes on under the hood. There are plenty of reasons to learn C aside from just to know what goes on at a lower level.
Re:Khan Academy: Computer Science by teach on Wednesday November 02, 2011 @03:49PM (#3188640)
> "I was freaking out when I couldn't solve some Project > Euler questions, and pretty much lost all of confidence in > my programming abilities for a while.

I've read way too many people online suggest Project Euler as a way to "teach yourself programming". This is almost a sadistic suggestion. Project Euler is way too hard to teach yourself programming.

Evidence: nearly 180,000 people have solved problem #1. Only 76,000 have solved problem #10. Losing 60% of your audience by problem #10 is pretty bad question design for learning.

Anecdote: I've been programming for over 25 years. I was near the top of my class in a top-10 computer science university program. And I've solved 30 Project Euler problems in the last 3-1/2 years. But I still can't solve problem # 18. I've worked on it off and on since December 2007. Only recently, quite by accident I learned that it is probably a "dynamic programming" question, which is something I've never done before.

Never lose confidence in your coding ability because Project Euler stumps you now and again.

Re:Khan Academy: Computer Science by jcampbell1 on Tuesday November 01, 2011 @04:11PM (#3183930)
Kahn makes a big mistake in pronouncing the assignment operator as "equals" in the first video. The assignment operator should be pronounced as "gets".
Re:Khan Academy: Computer Science by nosignal on Tuesday November 01, 2011 @07:24PM (#3184622)
I think I'm going to steal this for my Python classes. I usually say "is" or "is now", but "gets" I think is a more adroit phrasing. Cheers.
Re:Khan Academy: Computer Science by radq on Wednesday November 02, 2011 @02:00AM (#3185614)
Personally I prefer "becomes".

"David Gries recalled a time when he was lecturing with Dijkstra in the audience when he read "x=a" as "x equals a". This is of course a short hand for "assign a to x" and not a statement that x really is logically equal to a. From the back of the room Dijkstra shouted "becomes" and the room fell silent. Gries thought about it for a moment and said, "Thank you Edsger, for correcting me. If I make the same mistake again, stop me." Everything went fine until twenty minutes later he made the same mistake when the shout from the back of the room came again - "becomes". Gries once again thanked Dijkstra and claims to never have made the mistake again."

Re:Khan Academy: Computer Science by teach on Wednesday November 02, 2011 @01:38PM (#3187954)
I also say "becomes".
Re:Khan Academy: Computer Science by regularfry on Wednesday November 02, 2011 @07:49AM (#3186234)
gets is, unfortunately, a common function name for string input, so I avoid it.

The first language I was taught was Object Pascal, and the assignment operator ":=" was pronounced "becomes equal to".

Re:Khan Academy: Computer Science by llimllib on Tuesday November 01, 2011 @05:41PM (#3184269)
When I read it in my head, I read it as "let". As in "x = 5" -> "let x be 5".
Re:Khan Academy: Computer Science by pjscott on Tuesday November 01, 2011 @06:24PM (#3184428)
In my head, I reserve the word "let" for immutable bindings. Or at least local bindings that people probably aren't going to mutate. I read it as "x equals five".

So, between three of us, we saw that simple line of code in three different ways. I wonder what other people see in more complicated code.

Re:Khan Academy: Computer Science by jcampbell1 on Wednesday November 02, 2011 @01:29AM (#3185573)
The point is that if you pronounce if(x=5) and if(x==5) both as "if x equals 5", then you are making things confusing for students. You as the teacher are saying the exact same words, but mean two completely different things. Kahn made this mistake and there are student comments showing the confusion.

Not correctly understanding assignment is one of the biggest failure points for beginners learning programming. The '=' operator has little relation to '=' in any form the students have encountered before. It means something like "evaluate the shit on the right hand side, and store it in a variable with the name on the left hand side". That meaning is not really even close to the meaning of the english word "equals".

You can personally call it whatever you want, but if you want to be a good teacher to beginning programmers, then you don't call both = and == the same thing. "x gets 5", "set x to 5" or "x is now 5" are all acceptable, but "x equals 5" is not acceptable for teaching purposes.

Re:Khan Academy: Computer Science by loup-vaillant on Wednesday November 02, 2011 @04:54AM (#3185880)
I note that the biggest mistake probably comes from C itself. If only it had chosen for assignment a syntax such as :

  x <- 5;
It would be more clear that "the shit on the right" goes to that garbage on the left. But no, they had to use the `=` sign, as if saving one character where more important than not changing the meaning of one of the most used sign of all mathematics. And now nearly all popular language is making the same damn mistake.
Re:Khan Academy: Computer Science by llimllib on Wednesday November 02, 2011 @02:37PM (#3188269)
The only thing I liked about PL/SQL back in the day was its use of := for assignment and = for equivalence.
Re:Khan Academy: Computer Science by pjscott on Wednesday November 02, 2011 @03:48PM (#3188630)
I pronounce "==" as "equalsequals", sort of slurring the two words together for speed, so they sound like all one word. This is consistent with the way I treat the bitwise-versus-boolean operator confusion, e.g. "&" is "and" while "&&" is "andand".

I agree with your main point, though, that failure to understand assignment is one of the biggest failure points for beginners. What programmers need to be able to do is trace through the execution of a program in their head, thinking "once this statement executes, the state will change in so-and-such way."

If I had to teach introductory programming again, I would focus more on having people fiddle around with variables in a REPL, just to get a feel for that sort of thing.

Re:Khan Academy: Computer Science by thy on Tuesday November 01, 2011 @11:04PM (#3185196)
'x equals 5'. or something like 'the value inside x is now 5', an important view for me, when was learning c++'s pointers.
Re:Khan Academy: Computer Science by thy on Wednesday November 02, 2011 @07:35AM (#3186207)
(idk how to edit) im just fine with 'x = 5'. lets see 'x = 1+1'. then the 1+1 will be 2, and then that value will be in 'x'. so, after that, 'x equals 2', right? or 'x equals 1+1'.
Re:Khan Academy: Computer Science by mwidarto on Tuesday November 01, 2011 @04:11PM (#3183933)
I found video to be every effective teaching tool for programming. I don't know why, but I can read something 10 times and didn't get it but If I see video covering the same material it clicks.

The only thing I don't like about video is that I can't do search for it. Sometime they show you a piece of code and you don't remember exactly where, you can't easily go to that part of the video.

Re:Khan Academy: Computer Science by moreorless on Tuesday November 01, 2011 @04:54PM (#3184093)
Video search is coming along quite nicely. In one of my previous jobs, we employed Everyzing and the results were pretty good.
Re:Khan Academy: Computer Science by bialecki on Tuesday November 01, 2011 @03:31PM (#3183723)
I've wondered this too. I wonder whether "doing" with some hints like Code Academy or watching videos and then doing is more helpful for programming and then how that applies to other disciplines like writing, math, etc. Seems like eventually we'll find a way to converge where I can do both side by side.
Re:Khan Academy: Computer Science by sjwright on Tuesday November 01, 2011 @05:51PM (#3184307)
No matter how you slice the education process, you're always going to have instruction and practice.

It seems Khan Academy has a great model for instruction and Code Academy has a great model for practice; it seems reasonable to posit that a combination of the two would be superior to either one on their own.

I would further posit that the blend between the two models of instruction and practice would be something that might be tailored to the learning style of each individual student. Some people learn well by understanding before doing, others by doing first then understanding.

Re:Khan Academy: Computer Science by 2arrs2ells on Tuesday November 01, 2011 @06:31PM (#3184459)
Code School (i.e. Rails for Zombies) is a combination of the two! It's not quite what you're hoping for, though (it's always Instruction then Practice, rather than giving you the option to mix it up).
Re:Khan Academy: Computer Science by JupiterJazz on Tuesday November 01, 2011 @03:52PM (#3183863)
I've had a lot of success with the tutorials at thenewboston.com The instructor there explains everything in a very ELI5 (explain like im 5) manner and tone and it works very well for beginners like me.