Hi,
In France, we have this thing that when kids are at their last year of
middle school (that we call "collège" but is unrelated to college),
they're supposed to do an "observational internship" at a company.
Long story short, I've had a kid during this entire week. My company
being just me currently contracting for Mozilla, writing doc on the
WebAPIs, not necessarily the sexiest part and working at a coworking
space. I chose to teach the kid a little bit of coding.
I'm sharing here every piece of feedback I find relevant for the
WebMaker movement.
I wanted to start with Thimble... which is only in English so far. If
Mozilla is serious about targeting youth, things will have to be
translated in kid's languages. English-only is sort-of acceptable for
adults, but clearly not for young kids already having issues expressing
ideas in their mother tongue.
Interestingly, although the language was a barrier, he managed to
understand things more or less by throwing text in Google translate or
whatever other translating service.
Anyway, I put him in the London zoo project. He's played a bit with the
basics of HTML and CSS. Over lunch, he told me he liked Minecraft. It
was fascinating to discover that he had learned to program and
algorithmic thinking through Minecraft circuits. Not your regular way of
learning algorithmic thinking. He said things like "sometimes I take
circuits created by other people and try to write the same circuit with
less blocks" aka "code review" and "refactoring" in "professional
developers" jargon.
I made him write a Minecraft tutorial HTML page from scratch to teach
about Minecraft. He did that on the second day.
He wanted to learn programming. I was sort of unprepared and he didn't
know what he wanted to do so I asked him to do clock. HTML is not good
for circles (I don't feel like teaching border-radius hacks ;-) ), so I
chose to go with SVG. HTML5 allows SVG to be inlined inside an HTML
document. Not cross-browser, but who gives a shit in the context of
teaching JS?
I think SVG is a fantastic technology to teach programming, because it's
very graphic-oriented.
We ran into a combination of very annoying bugs [1] which led the kid to
loose most of his work after publishing. A very frustrating and painful
experience, let me tell you. In a nutshell, the scripts became part of
the body (WTF) and SVG elements got removed (WTF²). Not the sort of UX
you wish people to have when first learning how to program.
A combinaison of local files and Thimble (without publishing) was enough
of a workaround.
After the clock, he did a Pong game.
About the JavaScript part. I was writing part of the code, explaining
what was going on, teaching a one and then giving small assignments
where the kid had to struggle against the code to make it work
Darwinism-style. Among the little things taught one by one:
- how to rotate an SVG element
- how to move an SVG element
- if statement and simple conditions
- && and || in conditions
I took on myself to write some boilerplate I was finding not important
to teach upfront. As a starter, I added a
"document.addEventListener('DOMContentLoaded', function(){ ... })" block
so that document.getElementById wouldn't return null when expected to
return something. I was doing variable declarations and calls to
document.getElementById (but explained the correspondance between
HTML/SVG elements and the returned value). The kid picked up quickly the
idea of adding an id and calling document.getElementById just by looking
at what I had written and explained.
I wrote setInterval(function(){ ... }, time) and explained what the
second argument was about (particularly important for the clock :-) ) so
that he would just have to change this value and the block of code
inside the function.
On a more "generational" note, there have been countless times where I
explained the kids what to do and even without trying he woul instantly
say "but I don't know how to do that" although he had proven to
understand each piece individually. I don't blame the kid, but I blame
the education system which makes kids consumers and as a consequence put
them in fear of creating of being let on their own to solve a problem,
to pick up pieces they know and try to assemble them.
I think that's all for now.
I hope it was helpful feedback.
David
[1]
https://github.com/mozilla/webpagemaker/issues/623