Live data from Hacker News

Khan Academy: Computer Science

khanacademy.org

121–130 of 188 posts

Re: Khan Academy: Computer Science

#121

I'm not a programmer - my biggest issue with all the tutorials that I've seen for Python, Ruby and even js on codeademy.com is that none of them actually teach you how to do things within a web environment. I realize that this is meant to be an "intro to CS" class and not a web dev class, but a product can teach me how to create a simple web app that connects to a popular API, retrieves data and displays the data on…

For JavaScript that's a mostly valid point since 99.9% of all JavaScript is executed in the browser. When we teach basic JavaScript we include a week on accessing the DOM because we know that's where people are going to go with the language.

For Python and Ruby, it's best to have a handle on the languages first before throwing in Web stuff. That's the case for two reasons: first, particularly with Python, the web might not be the student's ultimate objective. But more importantly, you want to start in manageable chunks and throwing in web stuff can muddle things early on.

Re: Khan Academy: Computer Science

#122
post #83

Earlier quoted context omitted.

My students, on the other hand, complete literally 80 assignments before beginning for loops. 80 assignments? What are these assignments? Are you teaching them how to use recursion before looping in Java? I get that Java has some ceremony, but not 70 assignments worth. The first day I learned to program (with BASIC) I learned looping. I didn't know the details of it (like there was an index variable I could access),…

How to use a compiler. Basic shell of a Java program. That statements occur in a sequence. Practice with getting details right. Mathematical expressions. What variables are, and how assignments to expressions differ from formulas (in Excel, say). If statements and conditions. The concept of "incrementing" a variable or accumulators in general. Loops in general. See for yourself: http://cs.leanderisd.org/current/cs1/a…

Self-taught-programmer here.

I've done a lot of pondering about how to teach programming because I tried to learn several times myself, both on my own and in classes.

I bounced off each time, until finally sticking. I always wonder what made it different that last time, and if it applies to others.

===

Have you considered starting with something with less conceptual overhead than java-in-a-shell? There's so much you need to understand before you can even get to writing code that way. You need to learn how to start and navigate a shell on your computer (different on each type, and depends on your system configuration). You need to learn about paths, and java versions, and sdks, and what 'compiling' even means, and the concept of source code vs a binary.

This doesn't seem like much to people in the field, but I remember it being really intimidating.

In contrast, I really love codecademy.org:

http://www.codecademy.com/

You're writing code within seconds. You can access it on any computer and it always works the same way. Which is to say, it works like any other web site. You start seeing things happen right away, and you don't need to understand all the infrastructure initially.

===

I feel like getting people to that first high where they see their code generate output is really important. If you can get them quickly to feeling a little bit of that power that comes from software, that starts the fire, and they'll have more motivation to figure out terminals and paths and verisons and OSes and everything else.

Re: Khan Academy: Computer Science

#123
post #85

Earlier quoted context omitted.

My class is an honors elective, fulfills no state requirements, and there's a waiting list to get in. My kids are already pretty motivated. You really, really have no idea how difficult precise logical thinking is for an average person.

What other languages have you used? Im starting to teach an intro cs course n highschool next semester and would love to hear some real experiences on this. have you looked at: etoys scratch starlogo alice or scheme ?

I'm doing scratch with some middle school students (grade (6-8). Most of them got looping within a class or two. Hell, we had kids doing chase games in the first hour and a half of messing with it. Oe of the kids now is working on space invaders, and star ting to get where scratch falls down on maintainability and repeating onesself. and the royal pita it is when you can't type in things, and have to rely on shaky mouse movement.

At some point soon, I'm planning on moving to something where they can distribute what they're doing, either as JavaScript, or pygame, or something. I'm hoping to be able to literally translate a scratch program to the n+1 environment so that they can see the equivalence of the looping constructs and the event handlers and everything else.

Re: Khan Academy: Computer Science

#124

This is hardly computer science, it's only programming. Calling this computer science is similar to saying that a course in grammar and spelling is a course in literature. Programming, while vital to most forms of computer science, and the most marketable skill of a computer scientist nowadays, is just a tool.

It is a "marketing tool" so to speak; is much cooler to say "I am a self-taught computer scientist" than "I am a self-taught programmer". And like you may know, with kids, coolness matters.

Re: Khan Academy: Computer Science

#125

That's awesome, but I think it would be much more accessible for newbies if they included download links and installation steps. I have friends who might be interested in this for whom just the installation could be a daunting hurdle.

Javascript FTW, a text editor and a browser and you are already programming!

Re: Khan Academy: Computer Science

#126

I'm not a programmer - my biggest issue with all the tutorials that I've seen for Python, Ruby and even js on codeademy.com is that none of them actually teach you how to do things within a web environment. I realize that this is meant to be an "intro to CS" class and not a web dev class, but a product can teach me how to create a simple web app that connects to a popular API, retrieves data and displays the data on…

For JavaScript that's a mostly valid point since 99.9% of all JavaScript is executed in the browser. When we teach basic JavaScript we include a week on accessing the DOM because we know that's where people are going to go with the language. For Python and Ruby, it's best to have a handle on the languages first before throwing in Web stuff. That's the case for two reasons: first, particularly with Python, the web mig…

And this is why PHP is used for web-dev. The "Hello, World" webapp in PHP is trivial to anybody who has ever done any html markup, and is usually the first example. That makes it a gateway like this: 1) Do some HTML to make a webpage 2) I want to add 3) Oh, I just ad to my page, that was easy 4) I want to do , oh, cut and paste 5) Now I need to tweak this...

Which is part of why PHP is so popular, especially among people with more of a web background and less of a programming background. I agree that it's better to have a handle on the langage first, then throwing in web stuff, but if you take that tact, many people will instead use the language that starts with Web stuff, then adds in programming.

Re: Khan Academy: Computer Science

#127
post #78

Earlier quoted context omitted.

When I read it in my head, I read it as "let". As in "x = 5" -> "let x be 5".

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.

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

#128
post #83

Earlier quoted context omitted.

How to use a compiler. Basic shell of a Java program. That statements occur in a sequence. Practice with getting details right. Mathematical expressions. What variables are, and how assignments to expressions differ from formulas (in Excel, say). If statements and conditions. The concept of "incrementing" a variable or accumulators in general. Loops in general. See for yourself: http://cs.leanderisd.org/current/cs1/a…

Wow. Not quite 80, but still an order of magnitude more than I would have expected. Interesting they learn Swing before loops. For me, the first thing I learned was printing, then goto, then for-loop. Maybe just a function of language you learn with.

Yeah, it's 70, not 80. Not sure what I was thinking there, and now it's too late to edit my original comment.

Anyway, the "Swing" assignments are there in the sequence for four reasons:

1) To break up the monotony a little bit. 2) To give them more practice copying details accurately. 3) To make them say, "That was kind of cool." 4) To explain why we're not doing "real" programs (a.k.a. GUI) yet. "It takes that much code just to display a blank window on the screen? Guess I can live with the command prompt a while longer."

Re: Khan Academy: Computer Science

#129
post #83

Earlier quoted context omitted.

How to use a compiler. Basic shell of a Java program. That statements occur in a sequence. Practice with getting details right. Mathematical expressions. What variables are, and how assignments to expressions differ from formulas (in Excel, say). If statements and conditions. The concept of "incrementing" a variable or accumulators in general. Loops in general. See for yourself: http://cs.leanderisd.org/current/cs1/a…

Self-taught-programmer here. I've done a lot of pondering about how to teach programming because I tried to learn several times myself, both on my own and in classes. I bounced off each time, until finally sticking. I always wonder what made it different that last time, and if it applies to others. === Have you considered starting with something with less conceptual overhead than java-in-a-shell? There's so much you…

I agree. I don't get to choose whether or not I teach Java; that's determined by the state. However, in my class, we write our first working program on the first day of coding.

We install the JDK, do a basic DOS primer, type in our first program (in Notepad), and compile and run it on the command line in a single 90-minute period, like the 3rd day of class.

Getting to the "bang" as quickly as possible is HUGELY important.

Re: Khan Academy: Computer Science

#130

Earlier quoted context omitted.

Kahn makes a big mistake in pronouncing the assignment operator as "equals" in the first video. The assignment operator should be pronounced as "gets".

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.

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."

Post reply on HN