Monday, June 26, 2023

MIT's Scratch as an Introduction to Programing

I used Scratch to turn one of my favorite memes into an interactive story. https://scratch.mit.edu/projects/866414151/.  Using Scratch to create an interactive program was enjoyable. Scratch presents the user with an interface of code blocks of different shapes and colors. The code blocks being human-readable makes Scratch a high-level language (Vahid & Lysecky, 2019). Scratch is similar to the programming exercises in Chapter 2 in that the user interacts with the language via a graphical interface with little typing.

One challenge I had was understanding how to use the “if-then” control box. I overcame this challenge by following the visual clues. The space where the “if condition” would go was a diamond shape. By looking for diamond-shaped elements, I was able to find the >, <, and = operation blocks. If that had not worked, my next plan was to watch more Scratch tutorials. After finding the diamond blocks, I had to experiment with variables to get the desired behavior. I had expected to be able to set variables to the Boolean values of true and false, but what I ended up doing instead was setting a variable to either 1 or 0 and letting that variable being “= 1” stand in for true.

Scratch is a good demonstration of object-oriented programing. In programming, objects are often represented as classes, and each class has specific methods or functions you can use to take an action on that class (Ravi, n.d.). This is simulated in Scratch in the way that the code block options for the characters populate or do not populate depending on what you have selected. By only allowing the user to modify the behaviors of an object while the object is selected, Scratch is teaching object-oriented programing in an intuitive way.

I found the Python activity to be the easiest of the textbook exercises though I may be biased because I have prior experience with Python. Part of what makes Python easier is that it is a high-level program designed with a focus on legibility (Web3Schools, n.d.). The exercises that imitated low-level and machine language were challenging. In the Python exercise, it was easy to remember that the variable was called “year” in the others, I had to reference the list repeatedly to remember if I needed to use 101 or 110 as memory locations. Ease of use would make high-level languages more popular and more widely used. Not every device is unable to run the compiler needed to process high-level language into machine language (Vahid & Lysecky, 2019). Low-level languages would still be useful for narrow applications that are specific to these kinds of machines.

References

Ravi, J. (n.d.). Python Classes & Inheritance: Introduction. Percipio. Retrieved June 22nd, 2023 from https://t-mobile.percipio.com/courses/a37e8f04-8097-4faf-8d04-7719d2f14ea7/videos/5a5519e7-0123-4e59-b6f8-b44b0b2b6603

Vahid, F., & Lysecky, S. (2019). Computing technology for all. ZyBooks.

Web3Schools. (n. d.). Python Introduction. Retrieved June 22nd, 2023 from  https://www.w3schools.com/python/python_intro.asp

 

No comments:

Post a Comment