Re:30 years later, QBasic is still the best
by kowdermeister on Thursday May 05, 2016 @06:57PM
(#11640332)
Canvas is not a bad idea, but try Processing also. API is really simple, documentation is great filled with examples.
Consider using an HTML5 canvas (with a 2D rendering context) instead of DOM manipulation.
It makes programming very similar to QBasic's LINE, CIRCLE, PAINT.
I write a lot of stuff with the Canvas in general, but it's not great for teaching programming. The Postscript imaging model is again very abstract, complex, and easy to misuse early on. It can be made to work if by setting up a lot of scaffolding up front.
And then there's interfacing the other way around, which the Canvas doesn't help at all with or makes even more complicated. It's somewhat easy to explain an onClick handler for a HTML button; doing a useful onClick handler for a canvas, or body-level onKeyDown handler are again much more complicated affairs.
I've been thinking of switching over to some other environment the next time we do that. The immediacy and integration into an environment he already uses every day are compelling advantages, and it'll be a shame to lose them. But it does feel like the downsides easily outweigh the benefits.