
Silent Teacher – A game to learn how to code - komas2006
http://silentteacher.toxicode.fr/
======
plancien
Hi everyone, I'm the guy behind Silent Teacher. I just had the surprise to see
my work on HN, in fact a colleague of mine published it without me knowing, I
didn't have the chance to really explain the goal.

This is a side project, and the goal is not to teach how to code. I agree with
several comments here, it's sometime confusing, it's short and minimalistic.
The real goal is far less ambitious. I just wanted people to catch a glimpse
of what is coding. It's like stepping into un unknown world for a few minutes.
And it's not aimed at everybody. Some people are driven away by written
explanations, or can feel patronized very quick, and I wanted to address that.
Here, the first questions make you feel confident, then with tries and errors,
by yourself (or apparently so) you understand a bit how this works.

The story behind this is : I was never able to explain how code works to my
wife. She is math-o-phobic and she never gave me the chance to explain... just
the fact of explaining something like this scares her away. But one day,
sitting next to her on the train, I opened my JavaScript console and began
typing 3 + 4, then without a word I pointed the keyboard and screen to her...
20 minutes later we were doing functions and variables, without even a word.
This is how this project was born.

Sorry for those who where mislead by the title of this HN post. We have other
tools currently in development to address code teaching (one more focused on
code reading, one more focused on creativity, one more focus on JavaScript
...), and only when 3 or 4 of these will be published will we be able to teach
properly to a larger audience.

Thanks for all the feedback today, I really appreciate it.

~~~
Tad_Ghostly
Do you have any demos or profiles of your other educational projects? I'm
working on project that uses a pedagogy similar to the Silent Teacher, I'm
always curious to see what other people are doing in that area.

~~~
plancien
No, but there are works in progress and we hope to release some very soon. If
you want to take part in beta tests, you can leave your email there on the two
"coming soon" projects here :
[http://www.toxicode.fr/learn](http://www.toxicode.fr/learn)

------
k__
When I see such projects, I try to remember how I learned to code.

And I certainly didn't do such practices.

First thing I did, was mIRC-script most of it copied from other scripts and
retrofitted.

I think this was a good start, since I got something useful out of it and it
increased my interest in coding. I didn't understand much of it, not even
arrays.

But I wrote a web-crawler with this basic knowledge and a copy of a TCP socket
example, got some data from a website, used 10 vars (the start-page of the
news site just showed 10 articles at once lol) to save and modify it and spam
the titles in the channels, with links to it.

I was intrigued by this power I got, even if I didn't understood much of it,
fusing web and irc together, I felt like a hacker...

Later I went to a IT school, studied computer science etc.

Most of this basic stuff was boring and I just did it because I knew it would
increase my power over things that interested me, but if I didn't had this
"aha-moment" in my youth, I couldn't bring up the motivation...

------
primitivesuave
It's a great minimalistic interface, and clearly some thought went into the
"silent teacher" theme. However, this is a completely ineffective way to learn
coding. Coding is not rote memorization of how language constructs work, it's
about applying language constructs toward bigger problems.

It's like getting aspiring artists to draw a bunch of stick figures and random
shapes. They aren't learning anything that will help them paint a masterpiece,
they're just learning to paint for the sake of painting.

------
z131
My problems:

1\. This doesn't teach you how to code, this teaches you how to read code and
learn arithmetic logic that goes with programming. 2\. You use Javascript as a
base.

~~~
Kluny
It teaches how variables work though, which can be one of the toughest parts
about understanding code.

~~~
z131
But it doesn't, it only serves as practice for distinct edge cases that
teachers try to use to trip up new students. Which is fine except that it does
not teach you anything, it lets you figure it out through frustration and
trial-and-error. It never tells you "Hey, make sure you pay attention to this
part" or "Sometimes weird stuff like this might happen" and then offer a path
for the student to progress.

------
dangerlibrary
Really well executed.

This forces the reader to confront their misconceptions about what is going on
by exploring edge cases. (number + string == ??). Teaching models that force
you to guess when you are uncertain can create a deeper understanding by
preventing hindsight bias. Everything seems obvious once you know the answer
-- the hard part is convincing the student they would have gotten the question
wrong before you told them.

------
jpetersonmn
Even if I had never tried to program before, I feel like it starts/progresses
way to slowly. It gave me like a whole pages worth of questions about adding
single digit integers or combining small strings.

I like the look and feel of it, I just think the content should be tweaked a
little bit to pick up the pace. Maybe some hints they can look at if needed.

Also, multiple language support would be good.

~~~
gravity13
I've been doing something like this for regex as a side project.

One of the biggest things I'm thinking about is determining the adaptive
algorithm that places you on different portions of the learning experience.

My current strategy is to compose a concept map of all the basic concepts and
then devise a proficiency metric on each concept, which might be some
aggregate of [correct on first attempt + time to completion + learner history]
or whatever else I think of. Then you progress through the content by
traversing this graph (with a fair degree of stochastic nature so to keep
things moving). I'm hoping collected data can then be used to devise a new
concept graph - something of a dependency graph whose density might ultimately
reflect an element interactivity [1].

For example, function use might be considered a singular concept, while a
function which returns a function might be another concept. The latter is a
bit more exotic to newcomers and you can use the metrics determined by the
former to gauge a pace to give the learner, but it's a foundational concept
which most concepts in functional programming depend on and it might not be
fair to consider it a single concept in the learning process until the schema
is well-established.

 __Ideally, __within a few questions answered you get pushed up to a state
where you 're actually learning something, no matter what your proficiency.

[1]
[http://www.davidlewisphd.com/courses/EDD8121/readings/1998-S...](http://www.davidlewisphd.com/courses/EDD8121/readings/1998-Sweller_et_al.pdf)

------
espinchi
How far does it go at the moment? And how far are you planning to make it go?

Very well done, congrats guys!

PS. Consider translating [http://www.toxicode.fr/](http://www.toxicode.fr/)
into English for visitors from the US. Your services are in much demand over
here. And get the .com too!

~~~
lucb1e
> How far does it go at the moment?

Not very far, I completed it in a few minutes. I think the hardest was:

    
    
        function hello(a) {
            return a * a;
        }
        
        hello(4) + 3;

------
tsumnia
Since becoming an instructor, I love these tools to help reinforce what I'm
teaching. Its rapid fire enough and randomized enough that you can fire off
5-10 small 'exercises' without having to build elaborate (in the student's
mind) programs to practice the concept. The sequence of math to functions was
great in my opinion. Hammer home the math, then repeat with a twist.

I will say arrays need makes a quick jump since the concept of starting
counting at 0 is sometimes new to them.

If I were to use this, the features I'd love to see are the option to view it
in different languages (I teach Python and Java). Also, someway of setting up
practices and monitoring student activity would be nice; like, homework is 20
correct answers of math, variables, functions.

Very cool site!

------
josephschmoe
I would love it if this hooked up to another side where you could come up with
code-snippet based lessons (list variables at top with an array of example
combinations). Move up/down the tree/chain if the error rate is too low/high.

------
josephschmoe
This is honestly the best one of these I've seen. Decision paralysis is
probably the biggest fault when starting out in programming. This exists with
the specific purpose of unlearning that habit.

------
sebular
In case anybody is wondering why they're getting the string concatenation
questions wrong, it's because you let your browser translate the page from
French.

------
gabemart
I hate being negative, but I have to say that I really don't think this an
effective way to learn how to code for someone without some programming
knowledge to begin with.

I just watched someone with no programming experience whatsoever try the
problems. She's smart and well educated.

The basic arithmetic is (obviously) fine.

Basic variable assignment is fine, although the 'var' keyword doesn't really
serve a purpose. It's completely meaningless to the non-programmer, and seeing
as you can declare variables in the global scope in js without using it, I
don't really get what it's doing here.

The first difficult problem is why

    
    
        '4' + '2'
    

is '42' and not '6'. The person I watched voiced a bit of frustration, then
after a minute saw that 4 and '4' are different, and then breezed through the
round. But she didn't learn anything at all about strings vs. integers or even
variable types as a concept. She learned that, arbitrarily, when numbers are
in inverted commas they should be concatenated when a '+' sign is used instead
of added together. She didn't feel like she'd learned anything either. And
without already knowing about types, about integers and strings, it is
_impossible_ to teach this concept intuitively because it is _not intuitive_.
Someone taught that 4 + 2 = 6 and that '4' \+ '2' = '42' might very reasonably
think that '42' \- '2' = '4'.

Next was variable assignment order:

    
    
       var a = 0; a = 4; a + 3;
    

She got the "rule" of last-assignment-counts pretty quickly, but again, didn't
get what the variable was actually doing. She just learned to ignore the first
line and add the last two numbers together. The idea of 'a' being a variable
wasn't communicated to her.

Then there's a huge jump to functions, with

    
    
        function hello (a, b) {
            return a + b;
        }
         
        hello(2, 4);
    

After some trial and error, she worked out how to answer these kinds of
questions as well, but with no understanding at all of what the function was,
what the return statement was, the idea of functions having arguments, etc.
She just learned to add the two numbers at the bottom, and later to perform an
operation on the two numbers at the bottom using the operator from a few lines
higher. The process became "find the numbers, find the operator, ignore
everything else".

Up to this point I had been completely silent and just watched, but now she
began to give up, and we talked about how she'd found the experience. She
didn't feel that she'd learned anything and didn't like the lack of feedback
and explanation.

The next questions were about about length:

    
    
        var a = 'nudintm';
        a.length;
    

I really don't like this. So far, the user has only been exposed to functions,
and the syntax and structure will still be unfamiliar in the best-case-
scenario. From there, it's a huge leap to properties and the implied existence
of objects. This problem is just so arbitrary without an understanding of
what's going on. Why is there a period between 'a' and 'length'? Why does
length not have '()' after it like hello() did a few problems earlier? We know
the answers to these questions, the intended audience will not.

    
    
        var a = [9, 4, 'w'];
        a.length;
    

This is another huge leap, and it's a bit odd because it introduces arrays in
a problem that doesn't really indicate anything at all about what an array is
or what it's for. It's also a bad question because the user might add together
the length of '9', '4' and 'w' and come up with 3, the correct answer, and
then think to get the length of an array you just add the length of every
element in the array.

I'll stop there. I admire the execution and the ambition of the project, but
in its current form I really don't think it works well at all if the intended
audience is people who don't know anything about programming. Users learn
superficial patterns to get the correct answers without understanding the
problems in any real way or learning anything about the structure or function
of code.

~~~
notduncansmith
I just had my wife go through it, and she had similar sticking points. She
seemed to grok most of it, with some small explanations of syntax along the
way (=== as equality vs = as assignment, [a, b, c] is a list of things, etc).

I think that the value of this tool is to help non-programmers discover that
code isn't scary, and that it's made of simple things that regular humans can
understand. The key would be to have a developer beside them to (briefly)
explain things that look utterly foreign or step in with some guidance if
things get frustrating.

Overall, in my opinion it's a fantastic "gentle introduction to programming".
It was a real confidence-builder for my wife, and she's agreed to go through
tryruby.org with me tomorrow. Mission accomplished, IMO.

------
dubcanada
I don't mean to be mean but some of these answers depend on what language you
use.

For example

var a = '3'; var b = '4'; a + b;

Depending on the language may give you 7 or maybe give you 34.

~~~
matchu
What's an example of a language that, when adding two strings/chars, parses
them as integers first?

~~~
_pmf_
> What's an example of a language that, when adding two strings/chars, parses
> them as integers first?

The cancerous piece of shit we know as Javascript.

~~~
croddin
No, Javascript will concatenate two strings that contain integers if you add
them.

"1"+"1" //=> "11"

------
umsm
So I just gave this link to my non-technical wife for the ultimate test. She
is actually making pretty good progress. I'll update this as she progresses.

~~~
lucb1e
> 52 minutes ago

No updates? :(

Cause I was interested in real-world experiences, not just programmers testing
the programming learning tool.

~~~
umsm
She was having difficulties with functions and the order of operations. We
decided to retry it again later.

------
Kluny
This is just what I was looking for to help one of the designers at my job
learn about how variables and functions work. She's good with photoshop but
her usefulness is seriously limited by her inability to write code - I've been
trying to figure out how to get the basic concepts through to her gently.

------
chowells
This is fine as an introduction to javascript. It's terrible as an
introduction to _programming_. I really dislike teaching language
idiosyncrasies that get in the way of clear expression of logic. And the first
few levels are basically nothing but javascript idiosyncrasies.

------
vlunkr
I like this approach, where it does explain anything, but lets you figure it
out on your own by starting with the basics.

I think the functions should be renamed. function hello (a) would look like
nonsense to a beginner. Give them names like addNumbers so they can piece it
together.

------
Sniperfish
As a gentle introduction to viewing code snippets and reading variables this
is exquisite

------
Scaevolus
Learning through dialogue feels very natural for languages, including
programming languages.

The Little Schemer follows a similar approach-- a series of short questions
that the reader is encouraged to answer, along with the book's answer to them.

------
vilqqu
This seems fun. I'd be interested to hear how people who have never programmed
before react to, and cope with the 'puzzle'. I didn't find any information
beside the game itself.

------
banachtarski
What happened to learning to code by reading K&R or some other book that
explains how the machine works?

