Giter Club home page Giter Club logo

hedyorg / hedy Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 282.0 854.82 MB

Hedy is a gradual programming language to teach children programming. Gradual languages use different language levels, where each level adds new concepts and syntactic complexity. At the end of the Hedy level sequence, kids master a subset of syntactically valid Python.

Home Page: https://www.hedy.org

License: European Union Public License 1.2

HTML 2.04% Python 9.54% JavaScript 34.88% CSS 46.70% Shell 0.08% Dockerfile 0.01% TypeScript 3.40% Procfile 0.01% Dafny 0.30% C# 3.04%
education gradual hacktoberfest hedy programming

hedy's Issues

Unanswered question box remain visible

When I run a code that ask a question, I get the question box on the right, if I then run a print without answering the question, the question box stays open. If I answer the question later on, the rest of the previous code is still executed

Store & retrieve programs

Requires #95 to be done first.

  1. Place username as available in the client to submit within program

  2. When saving program, store it in the DB. If user is not logged in, use auto-generated session id.

  3. Implement GET /programs (for logged user) and GET /programs/USERNAME

  • increment counter in DB (if it's not an anonymous user)
  • store program in DB

Level 2 english - autofilled 'ask' code is grammatically incorrect

The top right task with text:

Ask something with ask. Beware! Ask needs a name now.
Example: color is ask What is your favorite color? 

autofills the wrong text:

ask color is What is your favorite color?
print color is your favorite!

[the text is correct, the code is not, and should be "color is ask What is your favorite color?"

Confusing: level-1 reported when compiling on level fails

See the new "run locally" functionality that was/is being added in #120.

Run the following program:

#level 5
print Hello world!

This is an incorrect program for level 5 (it's actually a level 1 program), so we are expecting to see a parse error. However, running it and printing the full error message is a little confusing:

$ python3 hedy.py test.hedy
An error occurred: Parse
level=4           <--- 🚨THIS IS CONFUSING
parse_error=No terminal defined for '!' at line 1 col 18

print hello world!
                 ^

Expecting: {'SPACE', '__ANON_8', '_EOL'}

What's happening is that on catching a parsing mistake, the parsing is retried on a level lower:

https://github.com/Felienne/hedy/blob/b4359bf202c952fd1d946e5a91a57abcbe2991b7/hedy.py#L633-L638

However, if parsing on level 4 also fails, THAT exception is not caught again but left to bubble up to the user, which is now very confusing because the final exception the user sees is about the failing parse at level 4, instead of the failing parse at level 5.

NL version Hedy, Level 7, automatic fill in is incorrect

In the dutch version of Hedy, at level 7 there is an error. Whenever you press one of the 2 buttons in the attached picture, the code that is automaticly filled in is incorrect.

error

It is missing de necessary tabs.

In the picture below it is shown how it should look.
correct

Small fixes to French translation

From an email (Dutch)

  • in niveau 5 (line 85 van de broncode) staat nievau terwijl niveau bedoeld wordt,
  • in niveau 7 is de tekst bij de tweede stap in het Engels: What is 5 plus 5? i.p.v. Combien font 5 plus 5?
  • in niveau 6 stel ik alleen een wijziging voor in het derde voorbeeld om beter aan te sluiten bij de eerste twee voorbeelden van dit niveau:
  •    Exemple: if reponse is 20 repeat 3 times print 'hurra! ' else repeat 2 times print 'désolé! '.
    

Missing license file

First of all: good job 👏 👏
I haven't found the license file so I don't know if this project is free (as in freedom) software or not.
I would like that you think about the possibility of releasing this project under one free and open license. You can find good information about the licenses here: https://www.gnu.org/licenses/ , and in addition, you can choose the EUPL (https://ec.europa.eu/info/european-union-public-licence_en) because it fits best with EU laws.
Thanks for all

Windows line endings \r\n cause errors

Example code:

naam is ask wat is de naam van de hoofdpersoon
print naam doet mee aan een race hij krijgt een willekeurige auto
auto is lamborghini, ferrari, porsche, honda
print auto at random

(not sure the line endings are preserved here but it will serve as a memory aid :))

is does not work for string equality? (level 4)

At level 4 using this program:

g is kop,munt
m is g at random
n is ask Kop of munt?
print 'Jij koos ' n
if n is m print 'Ja het is ' m else print 'nee ik had ' m

n is m never evaluates to true, whether I type the correct value or not.

Problem with á, é and ó in level 1 ask command (needed for Spanish).

Level 1, ask command:
In Spanish the official spelling is "ask Cuál es tu color favorito?". But that cannot be executed at this moment.

Two options:

  1. Allow á, é and ó as this is used in all Spanish questions (qué, cuál, quién, cómo, cuán, cuánto, cuándo, dónde & adónde = what, which, who, how, how, how much, when, where & where)
  2. Adjust the Spanish translation (for the time being) to not use the diacritical marks.

@mivalencia

port number suggestion

Currently app.py configures the application to be served on port 5000. I would like to suggest to use port 4339. This spells hedy on a phones number keys.

Inconsistent use of strings

n is ask 'Hoe vaak?'

Does not compile.
But

print Hoe vaak?

also does not compile.

I'd prefer for the first to work, but know little of programming didacticts ;-) so up to you!
Consistency would be nice.

Lesson 5: repeat

repeat does not take a variable as parameter?

n is ask Hoe vaak?
repeat n times print 'Zo vaak!'

UI/UX glitches

UI/UX issues that you may not be able to solve, but good to know of:

  1. Occassionally, after programs with errors were fixed, commands were executed twice. Do not know how to reproduce yet.
  2. In Explorer / Edge, backspace is "back"; I ended up switching the kid to Firefox (they should do that anyways) because pressing backspace when Hedy does not have the focus caused him to loose his work time and time again, unrecoverable with "Forward" because state is not kept.
  3. However, a child on a different (Linux) laptop and browser (FF) did seem to recover state.

Error message location in the web interface

This is more of a UX problem.
On my screen, the error message appears below the code box, and thus sometimes not visible if there are to many 'Try this' boxes above. So that I didn't figure something was wrong directly without visual feedback.
To reproduce, type garbage in lesson2 in english then hit 'run code'

Add user management

A user should be able to:

  • Log in (optionally with existing provider like Google or GitHub)
  • Log out
  • See a list of their projects at each level
  • Make projects public or private
  • Reset their password
  • Change their avatar

www.hedycode.com works, hedycode.com doesn't

Hi,

without the www. prefix there's some default page from the hosting provider. Maybe redirect?

I saw that url in the fsharpConf presentation just a few minutes ago.

Thank you, have a nice day! ❤️

random text level 1 NL

There is random text in a blockquote in NL level 1
I've looked around and I couldn't find the problem 1-2-3.

This is the first assignment for new users. The user journey can end prematurely.

Hedy Level 1 NL
Schermafbeelding 2020-05-06 om 17 07 10

Properly indent `index.html`

At the moment the index.html has almost no indentation. It would make me happy without bounds if we could properly indent the structure.

Error message for new line

Error messages should be hidden or at least simplified. (maybe this should be a broader issue, linked to #12 ?)
Empty lines are not valid syntax and throws :

The server couldn't translate this Hedy program to Python.
Unexpected end-of-input. Expected one of: * LETTER * __ANON_1 * __ANON_1 * __ANON_1 * DIGIT * __ANON_1 * __ANON_1 * __ANON_1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.