Would be cool to see a version for a lower level language like C that would help people understand the stack and visualize pointer arithmetic.
I can't believe the original link (submitted 5 days ago) has gotten so few views/points.
I want his editor.
No response so far.
Actually there is someone in the Vimeo comment thread who has started a live canvas editor(1) inspired by one of the demos.
This is simply amazing.
I hope this guy makes millions off his work. For something this revolutionary, he deserves it.
On the other hand, in a more advanced course, say at university level, it might help to construct knowledge about how programming languages work internally and how this relates to their already existing understanding of basic programming constructs. So, as a teacher be sure to evaluate the effect of the educational tools you use. I know it is easy to use existing cool tools (and this one definitely belongs to that category), but what is its effect on your students' learning?
And even if it's too complicated to be useful for people on their own, being able to use something like this as a teaching aid would be very helpful. The number of people who have trouble grasping even what most of us consider very basic concepts like iteration over a list is astonishing. Trying to explain something you find trivially easy to someone who doesn't understand it at all is an exercise in frustration for both people. I usually resorted to doing a manual step-through on a whiteboard or piece of paper, but this is much nicer.
I would discourage people from using this constantly, just because I think having a step-through debugger handy constantly will prevent you from developing necessary debugging skills. (The concept of wrapping something in print statements is another thing I take for granted that's not obvious to some people.) But I still don't see how something like this could be anything but a net positive.
The student will construct their own knowledge of programming by some learning process. This tool has an effect on that process, as has every tool. It could, for example, let some students construct an understanding of a variable that makes it harder to start learning about, say, memoization in dynamic programming. (This is just an conjectured example, mind)
I don't say it will, and I do have to say that the visualization given is quite nice and sound. But because we, as experienced programmers, like a tool because it visualizes how we think about programming and program execution, that does not mean that this is transferable in a similar way to novice programmers. As a high school computer science teacher I have been growing more and more worried about so called anti-didactic inversion in programming education. Especially at lower levels of education.
In programming education, we often use professional programming tools with professional programming languages and professional measures of programming quality. When students are learning to become professional programmers, this is a good idea. But is it as good an idea for teaching programming to those who do not want to become professional programmers. Or for those who are learning programming as a basic skill (like math, language, etc)?
Teachers and students have been drawing pictures like this on the blackboard, or on paper, for a long time. Many experienced programmers visualize these pictures in their imagination (unless they're implementing a familiar pattern). That can be tedious and error-prone. Why not let the computer show you what it's doing?
Many debuggers already show some of what this tool does, but I've never seen one quite like this.
Can you give an example of a "more complex programming structure" where this would be detrimental to understanding?
It is difficult to imagine what kind of knowledge novice learners will construct while using this tool. I could imagine, for example, that their operational meaning of a variable becomes that of consecutive boxes with values in them. Given that knowledge, how would such a student start to understand a variable in a closure? Will it fit their existing understanding of variables as boxes? Maybe it does, maybe it will not. Maybe they have to deconstruct their understanding of variables first to connect it to their budding understanding of a closure, building a deeper and more widely understanding of variable. Maybe this will be not too much of a problem. Maybe this becomes a hurdle. We don't know unless we try it out, of course.
Learning isn't an exact science. I think that dynamic representations like this one are very useful in teaching and learning. However, I would also argue to use these tools with care and conscience. Although it seems to fit our operational view of a program, that does not mean it is a good fit of a novice learner's operational view of a program. Whatever tools we use will influence that operational view. What I want to ask teachers is to evaluate and reflect on the best way and place (in space/time) to use these tools to make learning as optimal as possible.
This tool is wonderful. It visualizes the inner workings of a computer very well and how it translates to code. I hope this teaching tool is used on students after they've learned some basic programming concepts and syntax.
return sum(sorted(data)[-2:]) # one "step"
In other words, he was pointing out the limitations of the tutor program's analysis.
Since the whole point of the exercise is "optimizing" maxPairSum so that it runs in 20 "steps" or less, I guess this slower solution is still more "optimized" - which was my whole point, after all. :)
(Please note 6 steps is the bare minimum - one for the function definition, one for preparing input, one for calling the function, one for calling the function, one for assigning function arguments, one for the actual function and one for returning from the function. You can't go shorter than this.)
if lst > lst:
top, top2 = lst[:2]
top2, top = lst[:2]
for i in range(2, len(lst)):
if lst[i] > top:
top, top2 = lst[i], top
elif lst[i] > top2:
top2 = lst[i]
On line #9 of the example program, the string "hello" is assigned to y. On line #12 another string "hello" is used. I don't know anything about the inner workings of Python, but I imagine that these strings would be stored on the heap and possibly 'interned' by the interpreter. Maybe this is being ignored for simplicity, or I am way off the mark.
if i = len(left):
if j = len(right):
Like it anyway. Great job
However, I think the lectures are complementary. :D