You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #50, I think the example scripts that come with the download bundle could be improved and made more consistent. From own experience I know that these example script are an important learning resource, as they show the methods in question in context.
I suggest the following improvements:
1) Add scripts for each and every method
At the moment there are scripts for some methods, for others not. I think there should be a script for every single method, even if it's trivially simple. Beginners still might need an example for what it does and how to use it.
2) Make the scripts easy, but show the methods in context
So, of course the scripts should generally as easy as possible, yet they should not be mere snippets (see issue #56 for snippets in the docs for that instead) but show a context how the snippets can be used. Example: The b.lerpColor() script does not simply create a single color from two values (which would be the easiest snippet), but uses a loop to create a step based interpolation of colors, so it suggests a context how the b.lerpColor() function can be used. I think this is exactly how it should be done.
3) Add a info block in the beginning of each scripts
There are some scripts that already have a short info (csv.jsx), others don't. I suggest a standardized info block that contains the following infos.
Intro sentence "This script demonstrates how to use the b.random() method of basil.js" (also helpful, if the script is moved somewhere else, people can see it stems from basil.js)
Explanation of what the script does "The script creates 23 circles of random sizes and places them at random positions on the canvas".
(optional) Further explanation how to use the script "Run the script several times to see different results." [or "To use the script you need to have a file example.txt next to your document file.", stuff like that.]
I think the scripts should be thoroughly commented, so beginners can understand what is going on. Of course we should not comment every minor detail, but the main logical steps of each script could each get a short, descriptive comment
5) Make the style consistent
Syntax and coding style. I vaguely remember that the style was sometimes inconsistent, but I don't have any specific examples right now. Will have a closer look.
Any comments or other ideas?
The text was updated successfully, but these errors were encountered:
As mentioned in #50, I think the example scripts that come with the download bundle could be improved and made more consistent. From own experience I know that these example script are an important learning resource, as they show the methods in question in context.
I suggest the following improvements:
1) Add scripts for each and every method
At the moment there are scripts for some methods, for others not. I think there should be a script for every single method, even if it's trivially simple. Beginners still might need an example for what it does and how to use it.
2) Make the scripts easy, but show the methods in context
So, of course the scripts should generally as easy as possible, yet they should not be mere snippets (see issue #56 for snippets in the docs for that instead) but show a context how the snippets can be used. Example: The
b.lerpColor()
script does not simply create a single color from two values (which would be the easiest snippet), but uses a loop to create a step based interpolation of colors, so it suggests a context how theb.lerpColor()
function can be used. I think this is exactly how it should be done.3) Add a info block in the beginning of each scripts
There are some scripts that already have a short info (
csv.jsx
), others don't. I suggest a standardized info block that contains the following infos.Anything else I am missing? License maybe?
4) Comments for beginners
I think the scripts should be thoroughly commented, so beginners can understand what is going on. Of course we should not comment every minor detail, but the main logical steps of each script could each get a short, descriptive comment
5) Make the style consistent
Syntax and coding style. I vaguely remember that the style was sometimes inconsistent, but I don't have any specific examples right now. Will have a closer look.
Any comments or other ideas?
The text was updated successfully, but these errors were encountered: