liammclennan/JavaScript-Koans

Readme.md: Link to http://javascript.didacto.net is dead

rreimann opened this issue ยท 9 comments

Thanks for sharing the koans i really liked them and the readme made me curious about your new project Didacto JavaScript:

If you like JavaScript Koans you might enjoy my newer, more user friendly, project Didacto: JavaScript

But following the link gives me a 502 bad gateway. Is the site just temporarily down or is the project discontinued?

Temporarily down. It is fixed now. Enjoy. :)

Thanks a lot!

Two years after, down again ?

Context?

On 15 Sep. 2016 7:22 pm, "Jean-Baptiste Pasquier" notifications@github.com
wrote:

Two years after, down again ?

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#35 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAQkmibRJXaZCgJn8Ba_-0r6TK4FtjqCks5qqQ5pgaJpZM4Bgmdc
.

Sorry, did it a bit too fast. ;-)

I got a 502 Bad Gateway on the didacto, feels down from everywhere. Is it discontinued or just temporarily down ?

Thanks

OK. Thanks. I will fix.

On 15 Sep 2016 19:56, "Jean-Baptiste Pasquier" notifications@github.com
wrote:

Sorry, did it a bit too fast. ;-)

I got a 502 Bad Gateway on the didacto, feels down from everywhere. Is it
discontinued or just down ?

Thanks

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#35 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAQkmg1w2Omr_AUjMysNnJargsTFUDASks5qqRZGgaJpZM4Bgmdc
.

Fixed. What do you use it for, and how did you find it?

We use it for our students, it's a pretty nice interactive introduction. ๐Ÿ‘

Do you plan to make it open source ? :-)

Happy to make it open source if that would be useful. Would you contribute?

Its easy enough to add new tutorials. They are defined like this:

new entities.Tutorial({
    id: 'comments',
    name: 'Comments',
    questions: [
      new entities.Question({
        id:'singlelinecomment',
        evaluate: function (answer) {
          var results = [],
            isPass = /^\/\/.+$/m.test(answer);

          results.push(new entities.EvaluationResult({
            name:'contains single line comment', 
            state: isPass ? 'pass' : 'fail', 
            message: isPass ? '' : 'have you included a single line comment?'
          }));
          return results;
        }
      }),

      new entities.Question({
        id:'multilinecomment',
        evaluate: function (answer) {
          var results = [],
            isPass = /\/\*[\w\W]+\*\//g.test(answer);

          results.push(new entities.EvaluationResult({
            name:'contains multiline comment', 
            state: isPass ? 'pass' : 'fail', 
            message: isPass ? '' : 'have you included a multiline comment?'
          }));
          return results;
        }
      }),
    ]
  }),

and corresponding view

<h1>Comments</h1>

<p class="lead">Comments are an important tool that allow us to add extra context that the code does not convey. JavaScript's comment syntax is similar to the comment syntax of C# and Java.</p>

<%= partial('input', { id: 'commentexamples', text: '// this is a single line comment\n\n/*\nThis is \na multi-line\ncomment\n*/', readonly: true, mode: 'javascript' }) %>

<h2>Review</h2>

<p class="question lead">Write a single line comment:</p>

<%= partial('input', { id: 'singlelinecomment', text: '', readonly: false, mode: 'javascript' }) %>

<p class="question lead">Write a multi-line comment:</p>

<%= partial('input', { id: 'multilinecomment', text: '', readonly: false, mode: 'javascript' }) %>