Comments (7)
I think the error explanations are going to be one of the most unique parts of this course. Thank you for this amazing resource!
Do you think it would help to add code examples to the "How to fix this" section? A before and after, error and fixed, similar to what you have under the "Show solution" in the first error lesson. Maybe code examples of some of the most common causes of the error?
from learn-gdscript.
I find it funny the first error tutorial logically shows how indentation works, but symantically is an entirely missing codeblock ( eg if I was writing up several functions headers at the same time and missing one 'pass').
Big question: How much feedback would you like on explainations?
You are our tutors ๐ I find the screenshot above backwards - its starts with using the same terminology as the error, only then explaining the term. Of course, could be helped appending the words followed by uncommented code, at a minimum 'pass' or 'return'
; and I could see how you could show this with an image and full whitespace markers. I could imagine an optional view so tutor types could get the error code to help feedback.
I personally love writing cheatsheets and explainations - but in the field scripting is quite different to tutoring or writing a Godot plugin
from learn-gdscript.
@tylerecouture It can be quite hard to give code samples. At least for now, errors are grouped logically, but their exact cause can be very different. We may re-classify them into different groups based on feedback, but it can be rather impractical to uniquely describe each error message (there are over 300 of them for the GDScript parser). So giving an error example can mislead a student when it's generic enough but their code and their error is very specific.
from learn-gdscript.
The case of the second exercise is interesting, because it's an immediate reminder that even explaining an error is not enough to provide guidance to a complete beginner.
The error is an indentation on, because comments are ignored. However for a human, the error is "forgetting to remove the # character" (related: #66).
There are two solutions to this, none of which are exactly simple to set up:
- Get the error's context (surrounding lines) and put that through a set of heuristics, human-made checks, Levenshtein, etc, and provide a "did you mean X?" functionality. Elm does this, and the user experience is fantastic as a result.
- Provide a (possibly external) thesaurus of Godot errors, with a list of what they might mean. This list would also support user comments, so it stays updated and live with as many use cases as possible. The PHP docs do this with mild success.
I think both options are good, but each individually probably exceeds the scope of that particular application (though the second may be externally developed, and simply linked to). They also probably exceed what the UI is able to fit.
I am not sure how to solve this.
For our purposes, we can craft specific messages. For example, for exercise 2 ("Your First Error") we could custom-craft an explanation that explains why the parser sees indentation. We can also, on @pycbouh's suggestion, add to the lesson some text explaining how parsers are stupid and are not always going to point at the right mistake.
from learn-gdscript.
Just for the record, when I said "parsers are stupid", I meant it in the most literal way possible. ๐ It's in their nature to work off of an idea of perfectly formatted input string and fail at a sight of an issue. Sometimes they bork in a seemingly random place and report an issue that is not helpful to the user.
I guess that's what the lesson may explain.
from learn-gdscript.
I think taking the angle of 'parsers are stupid' is a good one - specifically that it is pattern matching. There is an obvious pattern in (colon)(return)(tab)(codeblock) and pointing out the pattern is broken more than trying to generate possible solutions.
Again I like graphics - I could see an image in this style with the explicit spacing and highlighting being useful. (dim unhighlighted code) (yellowhighlighter around :: (colon)(return)(tab)(codeblock) )
from learn-gdscript.
@generrosity feedback is always welcome.
Regarding content, we especially need feedback from absolute beginners: which help message helped them solve their problem? Which didn't? With examples of the error code and what they tried.
Regarding content, that's the most valuable kind of feedback for us, even though we'll still take everyone's.
from learn-gdscript.
Related Issues (20)
- Bug lesson 18-practice HOT 1
- Dyslexia accessible font option
- Tooltip message cut off from top when content exceeding window view and a minor issue with tooltip placement
- Error in spanish translate
- Code snippets not scrollable
- Double space in one of the drop downs
- 15.2 resetting position to (0, 0) exercise
- Oh no! The script has an error, but the Script Verifier did not catch it
- Since godot is coming to mobile,put a pop up keyboard. HOT 1
- Lesson 4 Paragraph still in english while using spanish version
- Practice 7.2 Drawing Squares at 3 positions
- Lesson 25 - Displaying the Inventory Items
- Stress marks marked as unknown character
- Toggle for smooth scrolling feature?
- The keyboard doesn't show up in mobile (im using tablet (Xiaomi pad 6)) HOT 2
- Hey. I try to do the course on my ipad in my favorite cafe. But i can change the code, because i canโt find the keyboard option. When i click on the intended area where i want to delete something or type, the keyboard option doesnโt pop up. What am i missing? Or isnโt it available on ipad? HOT 4
- Error in code example logic in first lesson (1. What code is Like)
- Cannot open the .dmg
- 20.2 Variable not defined
- Wrong execution and visuals lead to success in L7P2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn-gdscript.