Thursday, September 28, 2023

Programming Languages


    I had a fun experience using Scratch to build a program, though I did get frustrated at points. tried creating a few programs before deciding on a scene where a baseball home run scene plays when the start button (green flag) is selected. I initially struggled with timing all the moving pieces as I wanted my animation to begin when a sprite was clicked. I couldn’t figure out how to time the other sprite movements, so I instead opted for everything to be based upon when the start button was clicked and added timers to every sprite for their movements and when they are shown/hidden. Another difficulty I overcame was the ball placement never being the same, which I remediated by adding a starting x/y position to the scenes the baseball was in.

     One insight I gained from the exercise was just how precise you had to be with everything. While I assumed the ball would start where I had dragged it into the scene, that was not the case—every detail needed to be added to the program to make the scene play out correctly.

    Scratch was fun to play around with, but most of my enjoyment came from creativity. Overall, for programming, I enjoyed the Python coding activity more. With programming, I find it easier to see what exactly I am scripting to complete, and I found more satisfaction in finding bugs than figuring out the necessary command block in Scratch. Some of that bias may have been because I was growing annoyed at having to scroll to find the commands and constantly switching screens instead of operating off one page.

    In our reading, we encountered three programming languages: Machine Language, Assembly language, and two high-level languages, Fortran and Python. The machine language was the base language of the computer using binary numbers and how the CPU sends instructions to other pieces of hardware in the computer. Machine language is rarely used by programmers and is mostly used at the machine level between components. (Techtarget, para. 4).

    Assembly language is a “human-understandable representation” (Vahid et al. ch. 2.9) programming language that uses an assembler to convert assembly to machine language. This language would be used when necessary to closely control a program, or write subroutines for functions (IBM)

    A step further, Fortran is a high-level programming language that uses a compiler to convert standard formulas into machine language. This would be best used in programs involving converting numbers or adhering to a specific formula, like Fahrenheit to Celsius. (Vahid et al. ch. 2.10)

    Finally, Python is overall the easiest high-level-language to grasp and pick up, making programming easily accessible to learn. It is a great tool that is useful for data processing operations and general programming. (Vahid et al. ch. 2.11)

    Overall, I found Python the easiest to understand as I quickly began confusing the binary numbers in Machine language and the input numbers in Assembly language with the actual number characters on a keyboard. I believe Python is the most popular for the same reason: it is the easiest to understand and a great steppingstone into the world of programming.

References

Vahid, F., Lysecky, S., Wheatland, N. (2019). TEC 101: Fundamentals of Information Technology & Literacy. Zyante Inc.

IBM Corporation. (n.d.). Assembler language. https://www.ibm.com/docs/en/zos/2.1.0?topic=introduction-assembler-language

TechTarget. (2018, February). Machine code (machine language). WhatIs.com. https://www.techtarget.com/whatis/definition/machine-code-machine-language#:~:text=Machine%20code%2C%20also%20known%20as,sequence%20of%20zeros%20and%20ones.