Programming Languages
For this
assignment, I built a simple program using Scratch and reflected on what the
experience taught me about programming. I also compared Scratch to machine,
assembly, and high-level languages like Python to better understand how
different programming approaches work behind the scenes.
View my
Scratch Project here: https://scratch.mit.edu/projects/1273232856/
Because I
had already worked with languages like Perl and Python, I knew about loops,
variables, and conditional statements. Using Scratch to show these ideas
visually helped me understand how programs flow in a different way. The
interface is simple and easy to use, with clear categories that make it easy to
experiment. I found it harder to decide what to make than to figure out the
logic. Once I had an idea, putting the program together was enjoyable, and
seeing the results right away showed me how the logic shaped what the program
did.
In my
Scratch project, I used the default cat, Scratch, to create a short interactive
game. When the green flag was clicked, Scratch asked the user to play Hide n’
Seek, set a variable to 10, and used a repeat loop to count down by changing
the variable by -1 each time. Watching the number decrease on the screen made
the relationship between the loop and the variable very clear. Later in the
script, I used conditional statements during a race sequence – if the mouse’s
x-position moved past a certain point, the program responded with “You win!”
Otherwise, Scratch declared, “I win!” Seeing those outcomes depend directly on
the condition helped reinforce how logic controls program behavior.
While
Scratch did not introduce new programming concepts for me, it offered a
different way of thinking about how those concepts are learned. Rather than
relying on written syntax, Scratch represents structure visually through block
shapes and colors. Blocks are designed to fit together only in ways that make
syntactic sense, with control structures shaped to contain other blocks and
value blocks shaped according to the type of data they return (Resnick et al.,
2009). This design prevents many common syntax errors while still reinforcing
logical structure.
This stands
in contrast to my experience with Codecademy, where much of the effort is spent
translating instructions into syntactically correct code. Scratch’s visual,
block-based approach instead encourages experimentation and makes it easier to
see how logic affects behavior. However, it provides limited feedback
when something doesn't work as expected. The environment highlights the script
as it runs but doesn't step through execution line by line, making it harder to
identify why a program behaves incorrectly. At the same time, building the full
logical structure in Scratch before worrying about syntax could make
transitioning to compiled languages easier, since it strengthens understanding
of program flow, sequencing, and condition-based outcomes before adding the
additional complexity of compilation.
Other than a
short Python syntax exercise, Section 10.1 does not include hands-on activities
comparable to the Scratch project. Instead, it explains four different types of
programming languages that can be conceptually compared to the Scratch
experience. Based on the textbook definitions, Scratch isn’t like a query
language, which is used to get and organize data from databases. It’s also not
like assembly language, which works closely with hardware. That leaves compiled
and interpreted languages as the most relevant points of comparison.
The primary
difference between compiled and interpreted languages, as described in the
textbook, is whether the language is translated into machine language before
execution or during runtime (TestOut Corp., 2024). GeeksforGeeks (2025)
explains that interpreted languages move directly from source code to
execution, while compiled languages require an extra step to translate the
program first. This means interpreted languages are easier to experiment with,
while compiled languages spend more time preparing the program so it runs more
efficiently later. When compared using the definitions in Section 10.1, Scratch
most closely aligns with interpreted languages because of its emphasis on
immediate execution.
My
assessment of which language is easiest to use is shaped by my prior experience
rather than direct comparison within this assignment. I’ve worked with
interpreted languages like Python and Perl, and with query languages like SQL,
but I’ve only read about compiled and assembly languages in the course. Because
of this, interpreted languages feel most natural to me. Their readable syntax,
immediate execution, and flexibility make them easier to work with when
developing and testing logic. Query languages are also familiar, but they serve
a more specialized purpose focused on data retrieval rather than general
program flow. Based on both my experience and the structure of this assignment,
interpreted languages are the easiest for me to use effectively.
According to TestOut Corp. (2024), Section 10.1 explains that each programming language is best suited for certain situations:
- Compiled languages are ideal for performance-intensive tasks such as high-end video games.
- Interpreted languages are commonly used for web browser applications and scripting tasks.
- Assembly language is used for specialized situations that require direct interaction with hardware.
- Query languages are essential for retrieving and organizing structured data stored in databases.
References
GeeksforGeeks.
(2025, July 12). Difference between compiled and interpreted language.
https://www.geeksforgeeks.org/compiler-design/difference-between-compiled-and-interpreted-language/
Resnick, M.,
Maloney, J., Monroy-Hernández, A., Rusk, N., Eastmond, E., Brennan, K.,
Millner, A., Rosenbaum, E., Silver, J., Silverman, B., & Kafai, Y. (2009).
Scratch: Programming for all. Communications of the ACM, 52(11), 60–67.
https://doi.org/10.1145/1592761.1592779
TestOut
Corporation. (2024). CertMaster Learn Tech+. https://www.testout.com
Comments
Post a Comment