Pages

Thursday, May 27, 2021

Computer Programming: Scratching the Surface

 


Starting from Scratch

            I had a wonderful experience using scratch to create my first program with this tool. Having experienced other programming languages and Integrated Development Environments (IDE’s), I found Scratch to be very intuitive and feature-rich.  While this was my first time using scratch, the concepts included in the code blocks were familiar to me, so my prior programming experience came in handy in understanding the logic and execution order of each code block.

            I chose to create a simple Penalty Kick project using Scratch as I assumed it would be relatively easy to build but would involve using enough code blocks to showcase my first Scratch project, which can be found here: https://scratch.mit.edu/projects/524287857

Scratching my Head

            Well, I now admit I underestimated how complex this project turned out to be.  While the IDE was intuitive, I struggled to find a way to communicate between sprites so I could change behaviors in one sprite based on events that occurred with another sprite.  The other real easy concept that wasn’t immediately obvious to me was how to initiate the game.  I spent some time using the online help and looking at other published projects to see how the authors accomplished certain tasks that later became more obvious.  I also searched on Youtube for help on how to hide sprites.

Compared to the interactive programming lessons in the textbook, programming using Scratch proved to be much better way to instruct the computer to execute commands.  It also proved to be easier to read, review and edit.  I find that using code blocks save time in programming and reduces input errors that were likely abundant when using assembly language or machine language.  While Python was much easier to read and understand that the two other lower level languages, I can see the advantage of having a tool that allows you to use a drag and drop interface to quickly get started on a project, but access to the underlying Python code to make more advanced programming edits as the user gets more comfortable with that side of the IDE.

From Low to High

            The programming languages reviewed in the text included Machine Language, Assembly Language and Python.  Machine Language is a low-level language that uses binary codes to provide instructions to a computer processor.  Assembly Language is an intermediate language that uses commands that are easier to understand but requires and assembler to convert the instructions into machine language for execution.  Python is a high-level language that uses commands and syntax that are the easiest of the three to understand but slower to execute.

            Depending on the application, one language may be better suited that others.  For example, embedded systems that do not have displays and have limited storage capacity may be a good application for assembly language.  Machine language has its applications that many of have used in recent years; that is in CD’s, DVD’s and most optical discs.  Python on the other hand is a language that is portable and system agnostic.  Python applications can be written for many devices, regardless of processor as it uses an interpreter to convert it to a language the specific machine understands.

            Python is by far the most popular language of the three explored.  According to L. Ting (2020), Python is the second most popular programming language behind C; moving ahead of Java which had the spot for many years.  I attribute the popularity of Python to its ease of use and its wide adoption in web applications.


 

References

Scratch Help, (2016, January 23). Scratch Tutorials | #5 - Showing and Hiding Sprites. YouTube. https://www.youtube.com/watch?v=WcEm0iUyfVA&feature=youtu.be

 

Tung, L. (2020, November 4). Programming language Python’s popularity: Ahead of Java for first time but still trailing C. ZDNet. https://www.zdnet.com/article/programming-language-pythons-popularity-ahead-of-java-for-first-time-but-still-trailing-c/#:%7E:text=Python%20is%20now%20the%20second,%2Dyear%2Dold%20Tiobe%20index.&text=For%20the%20first%20time%20in,second%2Dmost%20popular%20programming%20language.

No comments:

Post a Comment