Learn creative coding writing simple programs

103. Functions help keep code organized

When you start writing longer programs they can become difficult to follow. It's important to learn how to keep them easy to understand and easy to modify. There are different techniques for doing that. Some of them involve subdividing programs in smaller, easier to manage blocks.
In this episode we take a look at how we can use functions to subdivide programs into smaller parts. A function usually should not have much more than 15 or 20 lines. If it does, then maybe it's time to break it down.

Tags: functions

Code editor

You can make changes to the code below. Then
Below you can ask and answer questions related to this video. If your question is unrelated to the video, please post it at the Processing Forum as I'm unable to help with all of your programs and still have enough free time to eat and sleep :)
comments powered by Disqus