For the past couple weeks in my Visual BASIC .NET class (9th and 10th grade novice programmers), we have been dealing with subroutines. The rationale for using them is another entire post. I want to focus on parameters. The key point is to distinguish between ByVal and ByRef. Since ByVal parameters receive a copy of the argument when the Sub is called, they are the perfect tool for protecting your data. Now beginner programmers are not really familiar with the concept of or need to protect your data, so this is a bit of a stretch for them. But my students generally trust me when I say that this will be more evident later on. In the meantime the rule for them to live by is use ByVal unless there is a very good reason for not.
The alternative to using ByVal is ByRef. I like to think of reference as being the address. When introducing this concept, I draw a pretty big array of memory locations on the board with the address of each location. We then do a role play of a program calling a Sub with ByVal parameters, another with ByRef parameters and a third Sub with at least one of each. We go through the motions of giving students (acting as parameters) a copy of the argument being passed or the address being passed and write the values in the appropriate locations in the memory array on the board as each line of code is executed. This method seems pretty effective in making sure that all my students "get it."