Hacker News new | past | comments | ask | show | jobs | submit login
John Resig: Redefining the Introduction to Computer Science at Khan Academy (ejohn.org)
480 points by sophiebits on Aug 14, 2012 | hide | past | web | favorite | 119 comments



It's hard for me to imagine learning Javascript as your first programming language. It's always felt kind of crazy and bizarre to me (especially when you try to do anything requiring more than 20 lines of code), but I think a lot of that is just failure on my part to shake off the paradigms I'm used to. A generation of coders who are actually trained from the start to think in Javascript... almost scary honestly, but in a good way. We need more John Resigs pushing the web forward :-)


Javascript has its oddities for sure, but most of that lies in areas that you wouldn't need to touch while learning programming basics.

Compared to my high school experience of learning in a C/C++ mismash with a teacher who insisted on introducing pointers very early, before ever presenting me with anything interesting to do which would make me want to figure out the details like that (and which scared me off programming for four years), I think it sounds like a dream.


Although I like Javascript and its tools have improved dramatically in the last few years, a number of cases (like [] + {} vs. {} + []) are decisively non-ideal for teaching people who are not somewhat versed in programming languages. It's this kind of thing which gave Javascript a reputation as a kind of client side PHP.

I would be very happy if these kinds of irrationalities could be ironed out in a future version of the language, even if it meant backward incompatibility.

If the language is thoroughly rationalized and there is a simple, beautiful API for graphics then I think it becomes the beginner's language to end all (since client-side web is such a nice platform to target). But for now, it isn't there... I'd be happy to hear that it was a priority.

Perhaps something like Dart will pick up that quest.


I think for the purpose of teaching people the basics of programming it's perfectly acceptable to leave them with a basic understanding of "You can only add numbers and strings." Then allow them to revisit the oddities much later after they have a much better understanding of what objects are. Honestly, I think it might be acceptable to just ask the student to explain to you how "object addition" would work. There are various ambiguous problems you could run into (concatenating two objects with the same property name but different values). I think this basic understanding is enough that even a novice would accept.

I think things like dynamic "this" in javascript will be more confusing for newcomers. But, once you start talking about "this", you should probably already have the basics down.

Edit: With all that said, I'm not saying Javascript is a great language to learn programming with. But I don't honestly know of a single language that I would be perfectly comfortable telling people to learn with. Most languages have their own quirks.


Tangent: to be clear, there is no difference between []+{} and {}+[] in javascript.

var a = {} + [];

var b = [] + {};

var c = String({}) + String([])

All three are equal. The order does matter in general because its doing string concatenation which obviously matters ([1] + [2] == "12"), but the fact that js always does string coercion and concatenation anytime you have + without numbers on both side isn't really that crazy.


Type coercion is crazy, if for no reason other than making the behavior of certain code harder to predict. That said, I don't think it's a major stumbling block, and once you learn to avoid relying on it there's no problem.

There are plenty of parts of JavaScript like that, but these gotchas are just red herrings. The core language is great.


There is a slight difference between []+{} and {}+[], in fact, but you're unlikely to see it outside of a console. At a console, {}+[] gives you 0, which is different to the result you get above. That's because it's an empty block followed by +[].


perfect!


If you ask me this has more to do with JS becoming the lingua franca of web development and less to do with making programming as easy as possible.

Case in point, recently some chick from highschool asked me where she could learn to code, so I pointed her to some Scheme tuts, nothing too complex since she requested something as easy as possible.

....then she writes back asking if "this is what jquery uses". I say "no", she gets upset and ask me "what the hell is this for then?"

Long story short: for a lot of people out there is not about learning how to code but learn-X-to-do-Y no more no less...


That, and that Self (which javascript pretty much is a version of) -- is a step up from Smalltalk. Add to that the fact that it is actually available every where (unlike, python, lisp, smalltalk...) -- and I think it makes perfect sense.

If you're going to ask people to download something, I still think Smalltalk is a nice alternative -- and it has been for a while:

http://www.atariarchives.org/bcc1/showpage.php?page=61


Why did you send her Scheme tutorials if she asked for something as simple as possible? Lisp is generally thought of as a very unintuitive language. I think Python would have been a much better choice, considering what she asked for.


If you're not learning how to code to do something useful with it, why learn to code?


There's some of us out there who enjoy coding for its own sake. Coding is a pure form of problem-solving. It doesn't necessarily matter what the problem is you're solving, just that you get a certain intellectual satisfaction out of the process. I must be one of the few that coded linked-lists and string containers in high school instead of silly text games :)


Fuck you.


I can't emphasize how much I disagree with you. You can do an incredible amount with Javascript with very few symbols to learn up front. If your goal is to get people interested in programming, there is nothing more discouraging than having to trudge through learning the intricacies of a relatively "safe" language with rigid types, inheritance models, and dozens of enigmatic exceptions.

Notice that I'm not saying these things are bad, but they are certainly more than a beginner needs to learn basic syntax and become familiar with control flow.


> I can't emphasize how much I disagree with you.

I don't think you disagree with me at all... I said that javascript feels strange to me because I didn't start with it. I think it's a fine language to start people on, just an uncommon one that should yield interesting results.

I certainly wouldn't suggest teaching with more "rigid" languages. I was trained on Java, and looking back I can see what a terrible way of doing things that is.

FWIW though, it's been my experience that for all but the most trivial tasks in Javascript, you quickly find yourself getting into somewhat advanced territory with e.g. scoping, closures, and anonymous functions. Again, I think these concepts are mostly weird to me just because they're different than what I personally was trained on, but they're certainly not as easy to grok as e.g. variable assignment and conditionals.


You know, my mistake -- I somehow just skipped over the last line of your paragraph ("it's scary to me...").

In that way, I certainly see what you're saying. It'll be interesting to see what new problems emerge if this continues as a paradigm for teaching how to program.


Likewise the emphasis! Although you're right that a lot of languages are bureaucratic with enigmatic exceptions and so on, I think that a well-typed language is better to learn to begin with than one which basically accepts whatever nonsense you throw at it. I'm not sure the perfect beginner's language exists, but I personally believe that if it did it would be statically typed.


Strongly typed languages aren't good introductory languages, but that doesn't mean any language that isn't strongly types is a good introductory language.


I learned javascript as my first language, and when I first saw recursion my reaction was "There's a name for that?".

If you learn from good tutorials it can be as good as learning with scheme.


Agreed. I personally started in QBasic, so I guess where you start doesn't limit you for life, but these days I typically recommend Python as a first language.


Better Javascript on the browser with a simple, integrated, interactive canvas than Java, C#, or (god forbid) VB.Net on a complicated IDE!


I actually did my first programming project in VB.net using Visual Studio. Although it didn't 'spark my interest in programming', I could get the job done; and at that time I had no prior programming experience...


I think you are forgetting what it is like to first learn how to program. For me and many of my friends the programming class was something you did so you could make games! If you finished your assignment early you didn't make yet another linked list class or implement a shortest path algorithm, you made anything graphical even if at that skill level meant a "full screen" text based tic-tac-toe.

Granted the stuff you made was nothing like the 3D shooter you played in the evening, but it was something _you_ made that made it really cool. JavaScript works really really well in that regard in that you can easily make stuff appear on the screen with very little effort with html (and move onto canvas / webgl) and they don't look half bad. Unlike other programing languages graphics are "built in". Python is great, but compare drawing on the screen in C++/Python/Java v.s. JavaScript and you get my point. As a first language it is a perfect choice as it is something you can get excited about.


So many people learned (a dialect of) BASIC despite it's faults because it was the one language available on nearly every home computer on the market, and typically accessible directly from the main UI of the computer. Considering how the browser may as well be "the computer" for many people, JS is in the same position.


Cue classic Dijkstra quote: "The teaching of BASIC should be rated as a criminal offence: it mutilates the mind beyond recovery."


Luckily no one teaches BASIC, people just play with it because it is installed on their system.


especially when you try to do anything requiring more than 20 lines of code

It's simpler than most OO languages. Not sure why you think it doesn't scale as well.


> Not sure why you think it doesn't scale as well.

The reasons why JavaScript is thought not to scale well are very-well known. They include:

Minor syntax issues:

- Deeply indented callbacks, passing a function to a function to a function and the resulting complexity of flow control.

- Issues with "this" become more likely with larger codebases. I know that JavaScript's "this" WTF is very old news, but it's the gift that keeps on giving.

Major design issues:

- JavaScript is not an OO language, it is a language that provides an OO construction kit. The OO patterns are layered on top of the language, the best idioms (e.g. self-invoking anonymous function, revealing prototype pattern) are not obvious and took a while to become common, and since none of them are mandatory, they can be ignored, mixed and matched or just gotten wrong. This is not a prescription for trouble-free scaling of the code.

- Lack of a built-in packaging/module or linking system. Requirejs is filling this gap, but for a long time most JavaScript code just wasn't partitioned, it was put all in one file. It is unreasonably hard to build large systems this way.


I don't have any of these problems when I use js. I mostly use delegates and notifications instead of callbacks. I always use this to refer to the called object. The inheritance model is very simple and better than many other oo languages like Ruby. I agree that the method for cloning an object is a bit obtuse but it is easily corrected so you can just call clone on any object. The lack of forward is a small but significant problem but it doesn't significantly hamper design of complex software. It isn't ideal that you that you can't import modules but again it doesn't prevent you from building well designed complex software.


Not sure it matters really, since programming will "speak" to some people and not to others regardless of the language.

But in terms of JavaScript specifically, I think first timers could do without being exposed to lexical scoping and truthiness.

I like that Javascript gives you encapsulation without necessarily object orientation, which is probably a good place for beginning programmers to start.


I learned javascript as my first language (well, I half learned Pascal first). It's not that bad.


There are lots of unsung John Resigs pushing the web forward.


Learning tools like this would have saved my teachers a lot of headaches if they were available 10 years ago.

As opposed to the classroom model of: [lecture -> assign work -> grade & return with static feedback], students can actually play with the subject matter during the lesson, instead of turning pens into projectiles or doodling in their books because they're bored to death (not that I know anything about that). Then they get immediate feedback, whether right or wrong, by seeing how the instructor would have solved the problem. That kind of hands on learning, where the student learns through their own trials and errors is much more fun than sitting through a lecture that has to accomodate the varied learning paces of a classroom of 20+ students.

The video posted here unfortunately focuses on the live editing aspect of the app, but you can see the interactive lesson function more clearly in this early prototype video[1].

This kind of interactive learning is the same thing that Sebastian Thrun is working on at Udacity[2]. For all the promise of making university courses available for free online, I think this is the truly disruptive stuff going on in online education, because it's way beyond just filming lectures and throwing them online, it's a fundamental leap forward for education.

[1] http://www.youtube.com/watch?v=nvaaude_1hk [2] http://www.youtube.com/watch?v=75TP3hoPA8U


play with the subject matter during the lesson

Kind of removes the need for a "lesson" and teacher, in favor of a facilitator that can go around and help those learning to discover things they hadn't considered.


Sounds like what is happening in the lower year levels these days.


> Learning tools like this would have saved my teachers a lot of headaches if they were available 10 years ago.

This type of teaching has a formal name. It's sometimes called course delivery reversal or course flipping, with the idea being that, essentially, the "lecture" is done outside of the class, and the "homework" is done within class. In this way, you can have a subject matter expert present at the time when he or she is actually needed.

I've tried it in my own courses (recording in Camtasia and having students watch the lecture outside of class, where they can rewind, pause, etc.), then dedicating the entire class time to allow the students to actually work problems. More generally, active learning has been gaining popularity in the classroom.


There where VM that did basiclly what happens on there. Smalltalk VM could bassicly do this, its quite sad that they where not picked up by teachers very often.


Some similarities with Felleisen's work teaching programming to early high schoolers,

- http://www.programbydesign.org/

Those folks have tons of data on what works, what doesn't.

I get a bit of a NIH feeling from this effort, that I hope is unfounded.


Having everything run in the browser is a _huge_ win, because it allows students to share what they've made with their friends. Post to facebook "Look what I made", which includes the source and makes it easy for others to modify it and share that themselves. Viral loop!


It is possible to use Scheme in the browser too:

    http://www.wescheme.org/


Yes, but it's not possible to run Dr. Scheme in the browser. So there would still have to be a fair amount (ie almost all) of reinvention.


NIH = Not Invented Here, in case somebody else is wondering also.


Ah, so not National Institutes of Health. Makes more sense now


It is pretty confusing -- maybe we should invent a new acronym for use on HN.

>_>


I think a small, beautiful detail lost here is John Resig's career path. As the creator of jQuery, he probably had his choice of which sexy SV start-up to go work at. He chose a non-profit that's aiming to fundamentally improve his country's education. Pretty admirable if you ask me, and perhaps more importantly, a slice of hope, that if one desires to, he or she can use his or her time to change the world for the better.


Interesting. I have shown my son the Logo turtle, but hopefully this will make even more sense to him. I was looking for a way to expose him to Processing but unsure where to begin. It's obvious now.

We are home schooling and always looking for new and interesting stuff to do with him.

Thank you, John.


Thank you for being willing to teach your son programming. I was homeschooled with a programmer for a dad and I guess it just never occurred to him to teach me himself. I discovered programming on my own in late high school, but I would have loved it when I was younger.


We homeschool, and I've always tried to present my kids with programming concepts. Scratch, JavaScript, Python, Ruby, Squeak, and a few others. My oldest has shown intermittent interest, but he's had plenty of exposure. He will definitely be able to say "I started programming when I was 8" - and I assume that when/if he catches the bug, he will know where to look and what/who to ask.


I had a programmer dad, and was homeschooled. The first thing he did when I asked how I could cheat at the various qbasic games we had (a la game genie) was hand me a Learn Qbasic book. He said I'd know how to cheat once I finished working my way through the book. Eventually I did learn how to cheat, but got bored with it. So I made them harder ;)

Sorry yours wasn't the same!


I had a similar experience with a programmer Dad, so you're not alone.


same


Don't miss the link to Bret Victor's lecture on responsive programming: http://vimeo.com/36579366 . I found it to be very enjoyable and it further shows what is possible with this paradigm. [minutes 2-23 are most interesting and relevant]


While I enjoyed that video, it came to me as a bit of surprise that this style of programming is being "rediscovered."

Anyone remember Morphic, Squeak, Lisp, etc? Emacs?

Lively Kernel is pretty darn cool too.

I'm not saying it's bad, I think it's cool that this style of programming is making a come back (and about bloody time I suppose).

The only thing I'm not certain of with this course is actually calling it, "Computer Science." Perhaps that's because I tend to agree with those who question whether it is indeed a science at all. However after watching a few videos and trying some of the exercises it seems to me to be a great way to learn how to program.


Does JReisig's work support the Bret Victor idea of selecting the line of code and highlighting the pixels that it draws?? (shown at 8:00 in the Bret Victor video)


We are working on a similar project (programming education), but in a persistent and multiplayer environment. It’s more like a live game framework which allows to learn JavaScript, or just to have fun!

Everything is programmable: the display of a bot (Canvas 2D Context API), the buttons used to to control it, the interactions between the bots, etc.

https://github.com/bpierre/modul.io


This is massively badass. I think this may be the best tool out there for learning programming.

One issue I am having here in Chrome in Ubuntu on my computer is that some of the videos are giving me minor playback problems where some visual features are not visible. For example, in the intro to drawing tutorial the rectangle seems to turn into a line because three of the sides are not visible. This is probably just what I get for using Linux though.

Anyway, I was wondering: have Mr. Khan and the rest of them put any thought into how the new interactive programming environment might be applied to learning math or other concepts taught by Khan Academy besides Computer Science? Like specifically taking some of the math or other lessons and presenting applications to tweak that would demonstrate those concepts. Maybe lessons in those other areas could sometimes include a link to a programming experiment.

Also, other question: are there any plans to try to cover a broader range of computer science or maybe even software engineering topics, for example things like Objects/Classes, components, unit testing, QA, feedback loops in general or for example between the developers/analysts and the users or between the developer and his test suite?


This is very exciting. I was just looking around this past weekend for a way to introduce my 10 and 13 year-olds to programming concepts. I want them to understand more about the computer than how to play warcraft, watch youtube videos of pandas, or even make slide presentations.

My one daughter is going into 8th grade and has had a total of two half-semesters of "business and computer science" where the most they do is to play around with PowerPoint and Excel. Computers are so integral to every-day life now. It's positively disgraceful that every child shouldn't be educated on what they are, how they're built, how they work, how to program them, etc.


Probably like many others, I learned to program first by developing web applications. The mass of information and multiple moving pieces frustrated me almost to the point of quitting. There are probably many people who did quit when introduced to programming this way.

This CS learning platform brings programming education back to its simple roots, back when your first program was as simple as drawing a circle in BASIC. It also leaps it forward, borrowing ideas from Bret Victors responsiveness talk was brilliant and I hope sets a precedent for programming education moving forward.

I really admire what you've done, Mr. Resig and the Khan Academy team!


I wonder if they've added any help for transitioning out of their sandbox. I know when I first learned programming, one problem I had was taking what I learned in the classroom on Apple IIs and transitioning to using GW-Basic or QBasic at home. Transitioning from a browser-based sandbox to editing HTML and real files would probably be even worse. It might be nice if there was an easy framework they would let people download to help them create things in a more normal environment, so they don't get stuck and give up at that point.


I very much agree… In fact a large part of learning to code is not much grab abstract principles as it is getting accustomed to the eco system: how code relies on other code, how it is organised on files, and how it gets uploaded to the internet. It would be great if this site provided the opportunity to download a set of html and js files that re-implement the result of the students… a great starting point also for a teacher to talk about these issues… and a way for students to walk outside the garden when they feel like it…


These are good entrepreneurs and programmers, and they are using great tools, but I don't think they are qualified to say they are redefining teaching basic Computer Science.

Interactive platforms and approaches have been constantly introduced by CS educators to teach introductory programming. Educators are very aware of the value of interactivity and reactivity in teaching and learning. The only new thing here is the utility of cool new tools equipped with latest web-based technologies. Further, their approach is limited to programming, which is a large part but not the only approach to Introductory Computer Science. For example, they can't touch approaches such at MIT or Rice (I think), among others, which employ cool physical robots to teach coding, thinking, programming and robotics.

So this is not so much redefining, but rather a little enhancing CS education with cool tools.


Awesome stuff. John Resig, if you're in here, can you give any details on the challenges of instantly updating the Processing sketch? I can just wait for the blog post, but I'm really curious.

Also, what components exactly are you planning to release open source? The other work in this area that I've been able to find is very tightly coupled to the rendering library (d3 or PJS). Is the Khan Academy system open to alternate rendering libraries?


Yeah, real awesome stuff, John Resig! Your follow through on Bret Victor's 'Inventing on principle' is mind blowing. I'm getting my kids on it right away. Thank you.


This is cool and I think Javascript is a perfectly suitable first time language, but I don't think it's ideal. Too many ways of doing things, too many code organization and programming styles... it's going to be confusing for people moving beyond the courses.

Still it's better than c++ or java.


Hey - I'm one of the interns that worked on this.

I have my own reservations about JavaScript the language, but after seeing what John had built when I started, I believe that this is undoubtedly the right way to go.

If we wanted to use another language to accomplish similar goals, the options would be:

1. Run the code on the server. This dramatically increases latency, introduces more security concerns and would dramatically increase our costs as this would inflate our server load dramatically. Really, its the latency here that makes this a no-go. As you use the number scrubber, it's re-executing several times a second, and that's just not going to work out with client-server communication (even with websockets).

2. Run a different language that compiles to JS and runs in the browser. As it stands, the overhead of doing this is also too much. It would be shipping a compiler or parser down to every client. CoffeeScript may be the most reasonable option there, but it has many of the same warts as JavaScript anyway. Any parser/compiler needed introduces an extra step in the pipeline and would inevitably reduce responsiveness.

While JavaScript the language certainly has its problems, it's what it lets you do that counts here.


Run a different language that compiles to JS and runs in the browser. As it stands, the overhead of doing this is also too much.

Not at all--it takes some work, but especially if most programs are less than a few hundred lines long, the overhead is far less than you think!


Nothing matters more than ubiquity. Let me channel the old Steve Ballmer for a moment:

Ubiquity! Ubiquity! Ubiquity!

I learned to program with BASIC in the 80s. Somehow I survived, though old-school BASIC was like a clay tablet compared to JS. (Get this: No functions, all global scope. It was like assembly language but with less power.)

But BASIC was awesome because every microcomputer had it built in. Walk up to a machine and start typing BASIC. I must have typed in the same program 20 times.

I remember spending 45 minutes with this random Wang terminal thing at the local library, trying to find BASIC. I never did, of course, so I remember concluding that it was probably broken. I'm still not sure I was wrong, exactly. ;)


This could easily leverage CoffeeScript or even an education-oriented language that compiles to JS, but then the students wouldn't be able to immediately turn around and build real-world apps without additional cognitive overhead.


The first language decision is always a tough one. Having spent the past few months teaching programming to school children part time, I found that you're often weighing up a number of considerations.

1) You want a language/environment which encourages creativity and offers visual feedback as a reward. This is where Brett Victor's demonstration becomes remarkably powerful. Instant feedback is important not only for the creative process, but for maintaining interest. Some children will never enjoy programming, but for those who will, how can you excite them? Languages such as JavaScript can be a good tool for this. Children spend most of their time in an IT lesson playing web games when your back is turned. Teaching them how to make those games helps foster an interest, and JS is a good language for doing this.

2) Do you want a language which teaches the basic building blocks of CS, or do you want a language which is of practical engineering benefit? You could argue that functional languages such as Haskell encourage children to really think about what computation is, or conversely you could propose that teaching JAVA prepares them better for the real world. Both have benefits, striking a balance is difficult. Deciding what's important can often be subjective: functional or OO, strongly or weakly typed, concurrent or not? There are so many factors at play that no-one will ever agree on a perfect learning language.

3) Simplicity of syntax and semantics. Wrapping your head around abstract concepts can be a challenge when young. Maybe Haskell's functions are too unimaginable to grasp, or Smalltalk's object model too mired in strange syntax. Is a type system containing Integers and Floats meaningless to a child who still finds fractions puzzling?

4) Finally, compiling and debugging are pains which few children are going to endure without losing interest. The requirement for code to run within the browser, I believe, is paramount: no installation, no mangled libraries and dependencies. Instead it can be run on a school computer just as easily as it can at home. Codecademy has done this really nicely, and it looks like John and his team at Khan Academy have done the same.

JavaScript ticks a number of boxes in my opinion. The number of tools and libraries available means children can build interesting, visual programs. Functions as first-class citizens helps introduce students to concepts within CS, and execution within the browser is a huge benefit.

Nonetheless, I don't believe it has it all. Its object model makes the teaching of basic OO concepts a nightmare. Its untyped and furthermore its type coercion can cause strange behaviour (this IMO can be extremely damaging; things work then all of a sudden they don't). Operator overloading is odd. Its just too quirky! Personally I don't believe it is an appropriate first language. It does some things nicely, but I believe it leaves itself open to a lot of bad habits if left unchecked. Ultimately I believe a first language should enable the student to pick up any language they want thereafter, and feel comfortable within it. Primarily it should teach pure concepts, not syntax and style.

Shameless plug, but having reached my own personal conclusion I decided to write my own language for the browser as an MSc thesis (http://joeroot.com/wardrobe/try/ | https://github.com/joeroot/wardrobe). Its still far from complete, but I think it serves as a demonstration of what I feel is important in a language. I like many was inspired by Brett Victor's talk, and thats the eventual, unmet goal for the environment. But for now my focus is on the language and implementing it within the browser. It is strongly typed (but fewer types), has first-class functions alongside a pure OO model, and less syntactic pluralism to name a few of its traits.

As I said before however, programming languages are a hugely subjective topic, and I think John's project is a big step forward. Personal experience of teaching children would suggest that this looks like a far more involved experience than what is currently available.


You're right about some of the warts of javascript. John specifically discusses these in a different blog post. http://ejohn.org/blog/javascript-as-a-first-language/

Some of these warts are surprisingly easy to work around: for instance, they always use "===" and don't even tell the student about "==" until much later.

In other cases I just think you're wrong. For instance, I think that the prototype system is simpler and easier to understand than classical objects, while at the same time being more powerful.


Thanks for the blog post, I hadn't seen that before. As I said before, these things are subjective. In my opinion, the prototype model is too far removed from the classical object model to ever teach effectively with it. Primarily, my dislike of it within a classroom comes from the fact that it demolishes any chance of real typing. I think this is a serious issue when teaching children, both from a pure CS stand point and from an engineering principles stand point. It may make life easier for some programmers, its quick and light, but for teaching I think its inappropriate. I don't believe that in using it, the student gains no real insight into either CS or engineering. That being said, I'm no prototyping expert, so any counter argument would be informative!


A prototypal language can easily simulate classical OOP. The converse is not true. Take a look at how CoffeeScript implements classes. There are also a plethora of libraries that provide various class/inheritance models, with whatever taste of complexity you'd like.

You also want "real typing". Do you mean strong typing or static typing? In either case, the language will fight you all the way, being intrinsically weekly/dynamically typed, and so it is somewhat orthogonal to prototypes vs classical OOP.

IMO, if you want to teach type theory, you ought to be doing it in a language like Haskell anyways. Which might not the best thing to expose an absolute beginner to. ;)


He mentions the responsive design being really hard, and that was something I couldn't quite articulate to myself when I saw that talk a while ago... the ideas Bret Victor presented, only a handful of them are general purpose. I don't see how one could develop the timing examples he had, for instance, in a way that makes sense outside of his specific work on his 2D platform game.


Little nitpick: Why make the draw event handler a magic variable instead of a function which takes a function?

Ie:

    var draw = function() { point(random(0, 400), random(0, 400)); };
as opposed to

    onDraw(function() { point(random(0, 400), random(0, 400)); });
AFAICT there aren't any other variables that side-effect based on what you've assigned to them.


Granted this is certainly not JS best practices, but following best practices was not our goal here.

Explaining variable assignment is much simple than explaining callbacks and/or higher order functions.

On a more practical note, this is the convention that processing.js uses, and thats what we're using to render the canvas.


The former is much easier to understand.


Best part of the intro video:

"Welcome. I'm super excited about computer science. it's my favoriate thing in the world... except for pot".

QFT.


I believe she says "pie", and not "pot".


Definitely pie. On Tau Day the Khan Academy office was graced with a wonderful tau (two pie).


You sure about that? I heard pot. Maybe I just "wanted" to hear pot. I'll listen again.


I don't think it would be wise for a kids education site to reference pot.


Ok ok.. I still hear "pot".. but that's probably my "New Yorker ears" tuning.

You are right though; since it's aimed at high school, I doubt it's pot. ;(


If it sounds like "pot", doesn't matter if he really said "pie"; chances are many kids are going to hear "pot" too unfortunately.


This is not unlike Bret Victor's work - http://vimeo.com/36579366 . Do watch the video, if you have an hour to spare, it's a beautiful demonstration of "programming by tinkering."


This is great. I volunteered at Maker's Faire earlier this year at the Scratch booth and a lot of parents were wondering what some possible next steps could be for their kids who were interested in learning more about programming. It felt a little weird suggesting Khan Academy videos, but with this project I think the transition to deeper CS concepts is a lot more seamless for those who are curious


I sat my 5-year-old daughter down in front of the first drawing tutorial today (Introduction to Drawing). I let her watch the video, then asked her some questions to test her comprehension. Before I could too many questions out she blurted "I want to build a house," and off we went.

I learned a few things:

1. We seriously need to work on her typing skills. We practice typing once a week but I think I need to increase that.

2. I need to go out and buy a smaller mouse to fit her hand.

3. She immediately understood functions and parameters, which, honestly, was all I really wanted her to get out of this.

4. The sliders are critical. She has never seen a coordinate system, but the sliders allow her to play around with location without completely understanding what the numbers represent.

5. At this age, she was engaged because she could draw things (she had a house worked out in about 15 minutes, which was also the limit of her attention span). I'm not always a fan of gaming things up to make them more palatable, but it definitely worked here.


I am done with all of you so-called "hands-on people" who don't give people real tools to use.

The XO (One Laptop Per Child) and now this.

Please stop giving people tinker-toy environments with tinker-toy problems that have nothing to do with the real world.

If someone's not motivated to learn, yes, they may need this kind of hand-holding. But if someone genuinely wants to learn to program computers for a living, this is - in my opinion - not what they need at all.

Drivers Education is taught in a real car, not in Mario Kart on a Wii. I'm sick of the Mario Kart version of computers being spoon-fed to otherwise intelligent people as though it has anything to do with reality.

I learned to program using Turbo Pascal. I was not so far removed from reality that everything I learned was almost completely useless. I have not given this much attention yet, but so far, it feels completely useless.

PLEASE correct me if I'm wrong.


"Reducing the complexity of getting started down to zero will result in more people learning."

Yes, but you're removing NECESSARY complexity, in order for them to learn something barely worth learning.

"I feel that purely textual coding environments (or coding environments that favor textual output over visual output) serve as a highly uninteresting introduction to programming."

There are people who get to use non-textual coding environments, and there are people who get to work with very visual outputs. I feel that by giving them these tools, you've castrated their ability to understand anything meaningful.

"Obviously, right now we’re not teaching very much in the way of traditional Computer Science content,"

Yeah, approximately none of it.

"We decided that it was much more fruitful for us to tackle the most challenging problem that exists with Computer Science education first: Getting people excited about programming."

Of the people who are AT ALL interested in learning about programming, I have encountered exactly zero of them who aren't already excited about it. Why do you think that GETTING them excited is the "most challenging problem"?

I absolutely applaud the effort, and I sincerely wish you success.

I just personally think you're doing it all wrong.


> Of the people who are AT ALL interested in learning about programming, I have encountered exactly zero of them who aren't already excited about it.

How is this tautology at all helpful? Of course the people who are excited about programming are excited about it. For every one of those, how many view computers as entertaining magic boxes? Most non-programmers I know regard programming as a kind of impenetrable dark art. There is such a monumental disconnect between "Hello World" and "I can do whatever I want!" that most people just assume that they'll never be able to achieve any meaningful result. Being able to create something visually interesting that you can share with your friends is a big motivator, and I think you're too quick to deride it.

Also, I don't get why you view this as something "barely worth learning." The "real world" doesn't run on Turbo Pascal anymore, and Javascript, like it or not, is a big part of modern programming. Do you really think it will be so difficult to translate skills acquired generating interesting games into skills that can be used in a modern web shop?

Anyway, you're welcome to your opinion, I just personally don't understand it. Luckily for people that share your opinion, there are plenty of traditional CS resources all over the web and elsewhere to learn programming in the "real world." For those whose "real world" consists of playing games and wondering how they work, this might just be the thing that motivates them to look under the hood.


You call it a tautology, but my point is that Resig claims that "the most challenging problem that exists with Computer Science education" is "Getting people excited about programming." I do not think that is the most challenging problem that exists with Computer Science education.

He doesn't just claim that it's a problem with Computer Science education. I agree that it's a problem, and I value tools that try to help.

No, he's claiming it's "the most challenging problem." I strenuously disagree.

I think the most challenging problem with Computer Science education is retention. I know a bunch of people, personally, who for whatever reasons, got excited about programming - they wanted to learn. They had their own intrinsic excitement for programming, and wanted to move forward.

A few things hindered them, in my opinion: they had no idea how to get started, and even if they did get started, they soon lost interest because it wasn't obvious to them how the tools they had access to were ever going to get them anywhere they wanted to go. Given a goal - say, how do I make a game? - they did not believe there was a finish line they could cross.

I can accept the criticism that I'm too quick to deride it. I'm sure this is a valuable tool for some people. Given the people that I know, who already were motivated, I do not believe this tool will help them at all, and that disappoints me because I had hoped for more.

I think it's barely worth learning because I know hundreds of professional software developers, and I know approximately two of them who got to play with HTML5 Canvas at work - myself and a friend at another company. Both of us did it in our spare time, for fun, because our bosses would never have asked us to do it. If you know more people who are professional HTML5 Canvas developers, then your anecdote trumps mine.


Sounds like you'd love the Forth environment built into the OLPC firmware.


PSA: Don't feed the troll.


"I absolutely applaud the effort, and I sincerely wish you success."

I wish all trolls applauded effort and wished people success.

I may not be expressing it well, but I honestly think calling this "Computer Science" is absurd. Feel free to call people who disagree with you a troll any time it's more convenient than actually having a conversation with them.

I wish we could discuss the wild success of One Laptop Per Child, which tried a similar approach. But we can't. And I personally believe it's because of this "tinker-toy hand's on" approach that One Laptop Per Child has failed so spectacularly. I fear that this approach will shove Khan Academy's "Computer Science" section into a similar footnote of history.

I also think all of this is too important to do wrong, so it pisses me off to see a group so prominent make such a misstep.


I should point out that Harvard teaches programming in Scratch for the first 2 weeks of their introductory CS course.

http://scratched.media.mit.edu/resources/harvard-cs50-introd...

According to slide 27, most students prefer it that way:

http://cs.harvard.edu/malan/publications/Scratch@MIT.pdf


It is disappointing that KA launched their Computer Science program not long after making their website closed source[0]. Doubly disappointing because of open-education projects that were using the software platform to do free education projects in Brazil[1] and Portugal[2].

[0]: https://khanacademy.kilnhg.com/Auth/LogOn?ReturnUrl=/&nr... [1]: https://calenglishbr.appspot.com/ [2]: https://uc3m-ka.appspot.com/login?continue=http%3A%2F%2Fuc3m...


Umm, I think it's all still open-sourced. It's just hosted at Github, which probably integrates it better into the open source community:

https://github.com/khan

They even make their ec2 instances open source!


It's really sad. They were never really concerned with being truly free & open. They just were "open" in the wishy-washy way that when you do anything online for free, you can call it open and get lots of support.


So why are these remarks getting downvoted? BTW, could someone provide links with more details, i.e. what was closed, this still appears pretty open: https://github.com/khan/khan-exercises


I think they're getting downvoted for being incorrect.

I can't find any info about KA moving to closed source.


I "watched" the first lesson or two. I think they've missed an opportunity to tighten the watch-try-watch loop with the student. This tachnology seems like it would support a mode like "here is how you draw a box" then "you try drawing a box that overlaps with the box on the screen". Maybe they do that later. I hope so, otherwise I think they're missing a great opportunity for engagement. Even without that level of interaction, I still plan to try this out with my children. Really impressive.


This looks really great. One criticism is that this style of graphical programming is overwhelmingly of a mathematical bent. Granted it's quite basic arithmetic but still, you open a code sample and you're confronted with a bunch of numbers and mathematical expressions.

My worry with this is that there are many, many youngsters out there who are intimidated by math but who would absolutely love to write code. This is especially worrisome since such a huge amount of coding involves no math at all.


In our experience thus far we've found that students are far less intimidated by the numbers/math when they're able to directly manipulate the results. When they can tweak the numbers with minimal ramifications and instantaneous feedback they can easily intuit what the numbers are attempting to do. Working with young kids we definitely found that they were comfortable in this environment even after minimal introduction.


Seems clear they are teaching Programming and not Computer Science. There's nothing wrong with that, but they should be upfront about it.


Quite far down the long post they say:

"One question is obviously: How much “Computer Science” do we actually teach? Obviously, right now we’re not teaching very much in the way of traditional Computer Science content, we’ve placed far more focus onto the platform and feel that a lot can be gained from just what we’ve already built. We’re still very early on in the production of content and will be producing much more, of increasing complexity, over the upcoming weeks and months.

We decided that it was much more fruitful for us to tackle the most challenging problem that exists with Computer Science education first: Getting people excited about programming. If we can get people excited about programming, and build (or point them to) the resources they need to learn more then we will have been successful.

Eventually I think we’ll work to effectively replicate the materials one typically finds in a “Computer Science 101″ but in a way that is far more engaging and self-paced than what you would find at a traditional university."


I feel this approach is more confusing than clearer specially for beginners. Without giving a primer to the proposed languages (seems like they are using javascript and css), I feel a newbie would get more confused and leave the site after a few minutes.


Anyone have a cached copy? ejohn.org is returning a 500 error.



I understand why they only want the latest browsers, but it sucks that I can't look at it in my spare time at my locked down corporate (IE8) environment.


Love it, Who is the presenter in the videos? the voice sound really similar to Vi Hart or is it just me?


Vi Hart does work at Khan Academy: https://en.wikipedia.org/wiki/Vi_Hart#Khan_Academy


Sal Khan and John Resig are narrating the video.


I know, I talk about the actual videos, e.g. this one http://www.khanacademy.org/cs/intro-to-drawing/848372201


They are narrated by Jessica Liu (as mentioned in the blog post).


Thanks, she is doing an amazing job


Well, Vi Hart works for Khan now.


Programming is not computer science.


tried it. The greatest takeaway for me is being able to edit the code and see changes live.


Was there something wrong with the old definition?




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: