Tips and Tricks Beech Hall Teaching Course
A Function A Function is where you can define your own code to do a particular thing – a function Pretty much everything is a function in Processing Functions keep code neater You can steal code and put it in a function
Curly Brackets The Curly Bracket is your friend It can be tricky and they always come in pairs They hate being alone Best to keep your code neat and tidy
Curly Brackets Use the tab to keep things indented if(something is true) { // Use a tab for indents fill(0,255,0); drawBox(1); } Use a Tab
Debugging If you get lost – then use a debug statement to see whats going on The println(“”); command can be used to print the value of any variable – very handy Prints out the value in the area under your code when its running – println(“This variable is: “ + variableName);