I want the perfect IDE for kids (Or do I?)
Last update on .
A couple of things over the last couple of days have focused my mind on the question of IDEs.
The first is moving to Eric4 from Eric3. The change isn't really all that much, in fact, in the pieces I use there is no particular advantage to the new version (other than that it builds cleanly on Gentoo). All I use in Eric is the project-tree (to quickly find and open files in our multiple-hundred-files projects) and the source-code view (tabbed), and that was pretty much "done" in Eric3 (I have disabled most of the v4 enhancements for the source-code editing). For everything else I use command-line tools, partly because I work on remote servers often, partly because of the wonders of command-line history.
Unfortunately, Eric4 has turned out to be noticeably slower than Eric3. Not slow enough to be unusable, but slow enough to be just a bit frustrating, particularly in the project-view pane. The change there just seems to be the difference between Qt3 and Qt4 AFAICT, something that likely isn't going to go away. As with most such things, it's just enough to create an itch... and itches are where open source software starts.
The second thing was spelunking through the code of the "Turtle Graphics" activity for the laptop. It is one of those pad/sink wiring-diagram coding environments that lets you drag together primitives to create simple code constructs.
As I was playing with it I kept thinking "wheres the code", that is, where is the textual code that I'm building? Why can't the kids see the "real" operations that they are generating, so that they would have a bridge to start coding. So, I popped off the top and took a look at the code.
Turns out that this is not pyologo, it's a more constrained turtle-graphics-specific project. It runs nicely on my workstation, though the drag-versus-click handling is too sensitive to hand-movement to use with a tablet. It doesn't appear to be building Python (or Logo) code under the hood, it builds a "byte code" of sorts (list of strings/floats) that is interpreted to do the drawing.
Which made me want to sit down and hack (and still does). I really want to make the activity generate a Python file and then run that Python file, that is, as the user drew the diagram, we would write the equivalent Python code and let them see what they could have written to get the same effect as their drawing. They could explore the GUI, use it whenever they wanted, but the code underneath would be visible, calling out to them...
I would also love to be able to take any random Python file and render it for a child as a diagram like that, something they can pull apart and put back together. Then they could drill into the Python file they've generated, looking at the functions they've called (e.g. turtle.forward()) to understand the code and maybe change it.
I'd love to be able to let them drag-and-drop database schemas, properties, delegation, classes, methods, signals, RPC communication and the like and at any moment pop over to a code-based representation of what they've drawn. I'd love them to be able to draw a box around a group of code primitives and automatically factor it into a function with pads that forward to the internal pads.
My dreams for the last few days have been filled with ghostly text floating behind a drag-and-drop canvas and ghostly diagrams floating behind text editors. Sleepless mornings have been filled with diagrammatic syntax error handling, unpacking operations to drill down or up call stacks, integrated source-code-control operations, and all of it leading into a (sometimes 3D, sometimes SVG, sometimes a traditional UI) editor that lets you design and hook up graphics to make the world a better place.
The result of all that is exactly the kind of IDE I don't use myself, a truly "integrated" environment. And if I don't use such a thing myself (and I never have, or at least, I've never used those integrated/simplified features), how do I think that's what kids need. Which makes my mind start kicking over how to make the whole thing decoupled, but still useful as an educational environment and without imposing the "glue it together" overhead on the child.
None of that is conducive to getting a good night's sleep.
Comments are closed.
Pingbacks are closed.
Ian Bicking on 07/25/2007 4:10 p.m. #
I find fully graphical programming languages to be hopelessly verbose. I think adding just a little graphical layout to Python code would be more useful and feasible than completely graphical/draggable code. Like your idea of drawing a box around code to make it a function.<br />
One of the problems with Python in this respect is the difference between source code and in-memory objects. This is something that Smalltalk doesn't have, but most other programming languages do have. So, if you created an anonymous function by drawing a box around it, how would you use it? In a graphical environment you can imagine drawing a line, creating a reference in effect. But you can't just reference arbitrary objects in Python source code, you can only reference names in your source. It's not a problem with Python's lambda either -- any function that is present in an expression is a function that can't be reused or handled concretely.<br />
But you could allow code to be framed out and named. Especially if you are willing to make certain constraints on the Python code. E.g., you can't redefine anything, you can't make module-level modifications, you can't have module-level mutable objects. All of these mean that you can't freely modify and rerun bits of a module safely.<br />
If you restrict yourself to editing functions, some kind of scratch script perhaps, or generally just scripts in progress (from which functions could emerge), maybe simple classes that contain only functions and immutable objects (like numbers, but no class-level lists for instance), then I think it could be done.<br />
I played around with a browser interface to in-memory Python objects a while ago: http://svn.pythonpaste.org/Paste/apps/HTConsole/trunk -- but I didn't feel it was a good idea. But I think given these constraints something like this could be feasible.<br />
That said, I think it would be best to only approach the larger structure of Python programs graphically. I.e., anyplace where indentation is currently used. I think expressions are much better handled textually. The constraints of text make the program far easier to edit and read.
C. Scott Ananian on 07/25/2007 4:39 p.m. #
Please rewrite turtle art! I agree that generating Python would be more consistent with the overall vision of the XO, and *might* even make turtleart faster. Further, the existing stuff, although beautiful, needs to be sugarized and internationalized. The graphic elements need to have the labels drawn on, rather than having the labels baked in to the icons, so that we can easily translate the application.<br />
I'd also love a few more primitives: I'd like to be able to parenthesize expressions, have a stack of values for recursion, and rearrange my blocks a bit more flexibly.<br />
And we should really always see the turtle at the head of the line he's drawing, to reinforce the idea that the turtle is drawing the line. Currently when you click 'go' the turtle disappears until the image is finished, and then he reappears. Ideally, I'd like the animation to accelerate, so that I see the turtle incrementally draw the first line, and then speed up the animation bit by bit until its running full speed.
Peter Masiar on 07/25/2007 10:48 p.m. #
Game Maker : http://en.wikipedia.org/wiki/Game_maker is the best GUI to learn programming for kids I know of.<br />
10 years old is able to create objects, define events, and fill actions in them from a palette with action blocks. Like Lego. Actions have meaningful icon, so it is easy to remember (not too much reading needed). many demo games with source available to learn how to do stuff.<br />
Windows-only, in Delphi.<br />
I only hope someone would create a clone in Python. Could be great summer project!<br />
Another one is http://scratch.mit.edu/ (in squak = smalltalk), more structured, but IMHO too much oriented on mindless animation and text commands, instead of GM icons.<br />
Mel on 07/26/2007 11:20 a.m. #
"I would also love to be able to take any random Python file and render it for a child as a diagram like that..."<br />
Try Lumpy - UML diagram generator. <br />
Btw, I don't think there can be a "perfect IDE for kids" any more than there can be a "perfect IDE," but I've been thinking about playing with SPE or DrPython (as a starting point) and adapting it specifically for my 11 and 12 year old cousins (female) so they'll be more liable to start hacking... any recommendations for other editors to start looking at?
Mike Fletcher on 07/30/2007 10:06 p.m. #
Scott, I worked on the turtle graphics part of the equation today, mostly just refactoring the code. It should allow for arbitrary animations of the code, the turtle queues commands to be rendered and the renderer can render them at whatever speed it wishes, including rendering them many times to produce an animation.