We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello all - it would be very useful if there were a very short summary of the most common idioms needed by beginners, which I could give out to high-school kids I am helping learn Processing.
Does anyone know of any such?
Search engines are a bit hopeless in finding anything due to the generality of the term "Processing" :).
Answers
Rather than search on Processing try 'programming idioms' that will provide better results that are still valid for Processing.
One of my favourites is garbage in - garbage out :)
In the Common Questions category, I grouped a series of articles trying to tackle some base idioms, and some recurrent errors we see in the forum.
Note: if you search from the main site (the search box of the main page), you will get a Google search focused on the Processing site, so you will get more relevant results (but it excludes good sites external to this one, alas).
there is a full length, full text reference here
http://www.clairdunn.com/reference/complete-ref-alpha.pdf
it's ~ 220 pages
Thank you Chrisir - but your 220 pages is a far cry from the one-page summary that I was hoping to find.
And quark - I didn't find a "garbage in - garbage out" page - I hope you were not calling my message garbage?
I really just wanted something that can clarify the simple "Chapter 1" material - the arguments to background, fill, booleans, loops, etc.
just write your own
One-sheet cribsheet for beginners
This basic sketch shows Animation
Use of mousePressed()
Use of Mouse Position
A simple for-loop (iteration)
(use this inside the basic sketch above)
A simple if-clause
If-clause with else
Further reading:
look at the first 6 tutorials
https://www.processing.org/tutorials
and the reference
https://www.processing.org/reference
I was not calling your message garbage.
just write your own one-page sheet with my entries e.g.
background(202); is a gray value. 0 means black, 255 white.
background(255,0,0); delivers red. Three values mean red, green and blue. All three go from 0 to 255. You can compose all colors by using this (in the menu is a color selector).
fill and stroke work the same way. fill for the area, stroke for the outline.
Basic figures
point - x,y
line from x,y to x2,y2
rect from x,y with width and then height
ellipse from x,y and width and height
triangle with three times x,y
Basic variables
variables can have a name, a value and a type.
boolean vars are truth vars: can only be true or false
int vars can be negativ or positive integers
float can be floats
e.g. float a = 2.5;
Many thanks Chrisir - I will procede and try to build a one-page summary based on that.
Quark - I was just checking :).
When I taught programming to beginners the main problem they experienced was how to find and correct their program based on the error messages.
I was forever interpreting error messages for them. For instance mis matched braces, missing semi colons. You might find it useful to have a crib sheet providing stratagems for different types of error.
You can get the students to help by noting errors, noting the code mistake and then noting the correction. This will help the students develop as problem solvers.
when you give the one-page reference online you can just make links into the reference