mrbrenlea

mrbrenlea

Tuesday, September 22, 2015

Procedures

This week in EDTECH597 we created programs using procedures utilizing the new feature in Scratch 2 which allows users to create their own blocks.  The basic idea behind a procedure is for a user to break down a long string of codes into smaller bits of code that can be called up when needed.  This is especially useful where programs require the same bit of code to be repeated.  For example, if I wanted to create a program to draw my name, there would be two spots where I would need an N.  If I didn't use procedures, I would have to write out the code for N twice.  This increases the chance of human error and makes it more difficult to pinpoint errors. However, with using procedures, I am able to write out the code for N once and test it and use it as often as I like without having to write out the code for it over and over again.

While the principle behind procedures is easy enough to understand, I'm still trying to wrap my head around how to create more complex programs.  One tip that was provided was to break a larger problem into smaller chunks.  I'm used to doing this in theatre when I stage manage a large show and have to figure out how best to implement the director's vision.  Procedures require this same skill and I hope with more practice, I will be able to master it.


No comments:

Post a Comment