Program repair #772
Replies: 6 comments 9 replies
-
Let's dive into direction 1 a bit more here. Some Hedy exceptions are already really close to being repaired, these are "low hanging fruit". Invalid Space For invalid space, we even already have a (very simple!) repair function: https://github.com/Felienne/hedy/blob/731331ccfd0b810fa3934df8ad07637f0daf9b67/hedy.py#L1270-L1275 So the easiest first step is toch take this repaired program to the frond end and present it to the user. |
Beta Was this translation helpful? Give feedback.
-
Invalid For the Invalid Exception, we have a suggested keyword that we use in the error message, that could also be repaired: https://github.com/Felienne/hedy/blob/731331ccfd0b810fa3934df8ad07637f0daf9b67/hedy.py#L1280-L1285 |
Beta Was this translation helpful? Give feedback.
-
This idea, also low-hanging fruit, is a first implementation of direction 2. Unquoted Text For the unquoted text exception in levels 3 and up, we do not know if the text missed quotes or that it is a misspelled variable name (both are named in the error message). A bit harder than the two above, but we could do some string distance algorithm to see if we have a variable nam in the lookup list that is close and fix that. A simpler version of this idea could first improve the error message using that information. |
Beta Was this translation helpful? Give feedback.
-
Not about the programming, but about the lay-out: |
Beta Was this translation helpful? Give feedback.
-
#831 (comment) (by @Jasper1408):
|
Beta Was this translation helpful? Give feedback.
-
As a team, we have brainstormed and came up with some ideas for how the program repair could look like. We would like to present 5 ideas. 4 ideas came from our team members, and the 5th idea is a combination of the 4 ideas. We as a group think idea 5 might be the best. We have created videos so the explanation becomes more visual. Please note that this is just meant as a visual aid, and not 100% the final concept. Please pause or replay the video if it goes too quickly. If you are in a hurry, please scroll down and only watch/read UX idea 5 since it is our combined idea. We would like to propose this idea and would love get feedback.
I am not an educational expert at all(!), but I do think it would be good to let kids fix the mistakes themselves instead of just having a magic button like @MarleenGilsing said too. |
Beta Was this translation helpful? Give feedback.
-
In Hedy there are many opportunities to repair programs instead of giving error messages. In general, program repair is really hard and might not be feasible, but because Hedy programs are small it might be. Also, because kids use Hedy to learn, program repair can be extra useful not to fix the program but to show the kids how to fix it.
Some ideas for program repair are:
print
" or "remove that space" or "you forgot quotes") but we could envision actually fixing the program with the suggestion and running it.Any other ideas?
Beta Was this translation helpful? Give feedback.
All reactions