Silent Teacher – A game to learn how to code
silentteacher.toxicode.fr
silentteacher.toxicode.fr
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.
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...
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.
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.
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.
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.
Drilling a bunch of similar questions helps keep the concept in my head. And it's not that many, anyway.
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...
Very well done, congrats guys!
PS. Consider translating http://www.toxicode.fr/ into English for visitors from the US. Your services are in much demand over here. And get the .com too!
Not very far, I completed it in a few minutes. I think the hardest was:
function hello(a) {
return a * a;
}
hello(4) + 3;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!
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.
I also hate being negative and I agree with your main point. That said I don't believe that someone with "no programming experience whatsoever" truly qualifies as "well educated" in this day and age.
It's like someone who doesn't know what an interest rate is or someone familiar with none of the major literary cannon of their first language. They might be very intelligent but their education has a gaping hole in it.
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.
For example
var a = '3'; var b = '4'; a + b;
Depending on the language may give you 7 or maybe give you 34.
Altough its adition only apply to numbers, so that would be a bad example, it does automaticaly interpret digit strings as numbers.
% expr "3" + "4"
7
% expr "3" + 4
7
% expr 3 + 4
7The cancerous piece of shit we know as Javascript.
"1"+"1" //=> "11"
I tried to give the answer "TypeError" which I thought deserved full credit, but alas, no. :-)
No updates? :(
Cause I was interested in real-world experiences, not just programmers testing the programming learning tool.
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.
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.