Friday, April 8, 2022

Programming Languages

            Scratch is an excellent programming language that I wish I had when I was younger. I spent a few hours creating small programs to get familiar with Scratch block programming. I found several tutorials and followed along to see the best methods to develop functions. I looked at programs others had written and decided I would try building a game. I used a tutorial by Briggs (2014), https://www.youtube.com/watch?v=8RIJqEqZ_zU He showed how to build a game that had a spaceship that shot and avoided butterflies. I modified the blocks to make the program my own. I created a Scratch game called Magic Pencils Balloon Popper and the link is https://scratch.mit.edu/projects/661819867. This scratch game works best on a computer. Mobile options would need to be programmed similar to a tutorial by Xamuil2 on YouTube at: https://www.youtube.com/watch?v=uf4ZIlXQVas.

Figure 1 Click on the picture below to play the game.

 I wrote down what I wanted the program to do and then attempted to make it. The game has a magic wand with a star point that can spin and move around on the platform. It shoots pencils straight from the pointed end at balloons of three different colors with three different speeds. It keeps score when a pencil hits a balloon. It was challenging to do things that tutorials didn’t show me, and I experimented until it worked the way I wanted.




            I was lost at first trying to find the correct blocks to use and how they fit together. I made several mistakes and watched tutorials to understand why the program wouldn’t do what I wanted. I learned how to find things in the Scratch interface and the block language.

            The online Scratch program does not work on an android phone, and I used my laptop to design everything while watching tutorials on my phone. I have written programs in Python 3, and I used that knowledge to help understand the logic of the blocks to create different functions.

            As I created the game, I found that other ideas started coming to mind that I wanted to add to make the sprites do different things. Time was limited, and if I could work on it for days, I would learn more and add more functions to the game. I learned that there are different ways to write programs to do the same thing. I want to know the methods that will be best for updating software and running without problems.

            When comparing Scratch with the activities in the text by Vahid (2017), I found that Scratch is simple to understand, and machine language is more complicated for me to follow. Scratch is a programming user interface that converts the program to machine language. I have studied the basics of some high-level languages. Python 3 I used libraries like pygame to build games inside a program called Visual Studio (Sections 2.8, 2.9, 2.10, and 2.11). There are many languages written for different problems or projects.

            Some programming languages work well for smaller applications but not larger software like operating systems. There are many programming languages for different requirements. According to Levin, assembly language is a low-level using 0 and 1 binary code. C is compiled and used in operating systems. Python is a high-level, interpreted, sequential, general-purpose, non-enforced, non-meta programming language. Java is strongly typed and used widely in many areas. C++ is object-oriented. There are specialized languages like R used for statistical purposes. Metaprogramming changes itself to adapt to the situation needed. For example, self-driving vehicles use these languages (YouTube,2022). With time languages are developed that can do multiple functions but may not be the best for some situations.

            I enjoy Python 3 the most because I have spent many hours writing code for different requirements. It is easy to use and has multiple applications. However, I understand that other languages are required to complete a task more efficiently.

            Each language can be used better for different applications. HTML script is used for web pages. Some scripts are used to update or add to programs built with other languages. PowerShell can be used to write scripts to perform functions in the windows operating system. The main point is to utilize the programming language that will best perform the application needed. Sometimes more than one program language can be written and used together to improve compile time and run time.

            I think the most popular programming languages are Java, Python, and C. Java is used almost everywhere, C is used in operating systems, and Python is growing and adapting to complete the same tasks as other languages.

            The future of programming is changing as the needs of applications change. I learned some functions of the Scratch application and would enjoy learning how to do similar things in other languages. Each language has specific features that help provide a solution. Learning different programming languages will help me understand how to solve various problems.

 

References

Briggs, K. (2014) Scratch Tutorial 2: Make a Basic Game. [Video] Retrieved from https://www.youtube.com/watch?v=8RIJqEqZ_zU

Levin, M. (2022) Differences Between Programming Languages- YouTube Retrieved from https://www.google.com/search?q=Describe+the+differences+between+the+programming+languages&oq=Describe+the+differences+between+the+programming+languages&aqs=chrome.0.69i59j0i22i30j0i390.3584j0j7&sourceid=chrome&ie=UTF-8#kpvalbx=_5Dw2YuHaDdOx0PEPsaOI8Ak14

Merritt, B (2022) Magic Pencils Balloon Popper. Scratch Retrieved from https://scratch.mit.edu/projects/661819867

Vahid, F., & Lysecky, S. (2017). Computing technology for all. Retrieved from zybooks.zyante.com/

Xamuil2 (2020 March 27) Adding Mobile Controls to Your Game! || Scratch 3.0 Tutorial. [Youtube Video] Retrieved from https://www.youtube.com/watch?v=uf4ZIlXQVas

CPT 307 Week 5 Newbie to Newbie

Applying algorithmic design and data structure techniques creating structured programs   https://www.prepbytes.com/summer-programs/master-...