Scratch
For many, coding sounds like a daunting task, that takes a lot of practice and skill. After all, according to the textbook “Computing technology for all”, this type of action takes a type of thinking known as computational thinking (Vahid & Lysecky, 2019). Computational thinking is thinking in a way that is in a sequence of steps to solve a problem. This type of thinking is not typically natural as we do not practice this skill in our day-to-day routines. To help grasp some basic fundamentals of coding, the Scratch Foundation developed a website that makes coding simple. Scratch is considered a visual programming language, that utilizes drag and drop statements to produce the code. During my first week in Tec: 101 I was tasked with using scratch to make a short program (linked to below).
Click Here to View my Scratch Project!
This is actually not my first time using scratch. When I was in a computer class in middle school, we were tasked with utilizing scratch to make a short program as well. I remember back then; I made a short point and click game where you choose a series of doors to escape a building. That was a long time ago, so I was out of practice and also had less time. With Halloween around the corner, I decided to make a small animation with a wizard and a witch in the woods. I quickly came up with a story of an evil witch confronting the wizard to steal his orb of power. It was a simple story, but I had some small difficulties that caused this project to slow down. My main difficulty was ensuring the characters were in their correct positions, and where shown, and hidden at the proper times. To resolve this, I had to mark down the characters positions and add code to start them at specific coordinates, once the program was run. Without adding that code, the characters would begin where they ended in the previous run. I also had to mess around a lot with the timing of all of the dialogue, so it would flow as a proper conversation. Aside from this, everything else was pretty smooth thanks to the visual language Scratch uses. I gained a better insight into computational thinking from this exercise. The program requires you to code step by step instructions that are specific to what you want to accomplish. You can’t just write, “turn the wizard into a frog”, you must write out each action the witch would take to accomplish that task. I would recommend Scratch to anyone who wants to try coding for themselves, so you can get quick and easy hands-on experience with basic programming and computational thinking.
Discussing Programing Languages
Compared to the programming tasks from the textbook, Scratch was the simplest. Again, Scratch’s visualization, and drag-and-drop selections made programming easy. With Scratch, you did not need to “print” anything to be shown on the screen, as you could easily show and hide characters. The programming languages discussed in the textbook are machine language, assembly language, and high-level language. Machine language was the hardest for me to program. Machine language uses only ones and zeroes to tell the computer what to input, output, and store. Learning the correct sequence of ones and zeroes was difficult for me and required a lot of guessing to complete the activities. I can imagine any mistakes in a line of machine language code would be difficult to find through the sea of ones and zeroes. Machine language does not appear to be used by itself in the current day, however assembly and high-end language eventually convert to machine language. With this in mind, I would imagine machine language may be used in the event that a new high-end language is being developed.
The next language I learned was assembly language. Assembly language is a step closer to regular human language. You no longer must write in ones and zeroes, instead in human text. An assembler converts the human text into the ones and zeroes of machine language for you. This makes understanding and writing the code much more natural. With assembly language, you will use text such as “Input”, “Output”, “Add”, and “Stop”, to write your program. Assembly language may seem dated, now that we can use high-end language, though it does have its own benefits. Assembly language is used to have better control over hardware such as the CPU. It is the only language that speaks to the computer directly and is used to code drivers, embedded systems, boot codes and more (Pal, 2022).
Assembly language to machine language Note. From What is Assembly Language? [Image 1]. (2023) EDUCBA. https://www.educba.com/what-is-assembly-language/ |
Lastly, I learned high-level language. In this case I learned a bit of Python, but there are many other high-level languages such as C++, Java, and JavaScript. High-level language was the easiest to understand out of all the languages discussed. The code was a bit more complex due to being able to convert to more complex instructions, but it is easier than trying to write the same in machine language or assembly language. High-level language uses a compiler to convert the human text into assembly /machine language. You can easily assign variables to a name, that makes writing algorithms easier. In Python you can also add comments to your code that will help you understand and remember the purpose of those lines. I found this language easiest to use in all aspects. There are many different high-end languages with varying strengths. Python is versatile, with use in artificial intelligence, web design, data analysis, and more (Costa, 2022). JavaScript is another popular language and sees its biggest benefit in range of devices. JavaScript can be used to run programs across phones, cloud, browsers, and more (Costa, 2022). One more language is Swift. Swift is used to program apps for virtually any apple device (Costa, 2022). Because of its versatility, I believe the high-end language of Python is the most popular. As a beginner you most likely want something easy to use and that can be used on different platforms. Because of this, Python is a great and popular option.
Python Code for a Flappy Bird Game
Final Thoughts
Learning programming languages can be easy to become lost, or confused, as it requires a form of thinking most people are not used to. Beginning by using scratch is a great way to learn simple computational thinking, in a fun and easy way. After understanding computational thinking, you are on the right path to move on to the different types of programming languages. Machine language is the most difficult but is the only language a computer truly understands. Assembly language allows for human text to be converted into machine language but can be difficult to work with on complex programs. High-end language is most likely the language most programmers will work in as it is human readable and has many options for different platforms. Python appears to be the easiest and most useful of all the languages discussed.
References
Blog.withcode.uk. (2019, May 24.) Create games with python: online PyGameZero simulator. https://blog.withcode.uk/2019/05/create-games-with-python-online-pygamezero-simulator/
Costa, C. (2022, January 19). Top Programming Languages and Their Uses. KDnuggets. https://www.kdnuggets.com/2021/05/top-programming-languages.html
Pal, K. (2022, December 6). Why is learning assembly language still important? Techopedia. https://www.techopedia.com/why-is-learning-assembly-language-still-important/7/32268
Pedamkar, P. (2023, August 18.) What is Assembly Language? EDUCBA. https://www.educba.com/what-is-assembly-language/
Vahid, F., & Lysecky, S. (2019). Computing technology for all. zyBooks.
Comments
Post a Comment