Programming, like many other activities, must be practiced. The Scratch language and
development environment provides an excellent place to practice programming logic without
having to touch any production or mission-critical servers. I found the language simple to
understand, and the ability to instantly click and see what effect your changes made was helpful.
Scratch is an excellent tool for understanding the underlying architecture of code.
When I started on the Scratch site, I was able to ease into the environment with little difficulty.
Rather than start with a blank palette, I decided to build from the basic cat template. Looking
through the code blocks, I saw how easy it was to instruct the cat to move to a specific spot, or
towards the mouse pointer. I saw how to make decisions and perform actions. It was clear to me
at that moment how to build some basic stuff, so I got to work.
I wanted to design something with startup parameters, variables, user input, and a
response based on the user input. Building DupreeTheCat was relatively simple because I
understood the pieces of code that were available. It was a bit challenging using the drag-anddrop system, but once I realized that grabbing a block also grabs the instructions below, it
became much clearer. My application, DupreeTheCat, can be found here.
Working on this exercise, I realized that many programming skills are transferrable from
one language to another. As soon as I scrolled through the code bits a few times, I began to think
of things I wanted to make the cat do. I started thinking with the specific code blocks and their
capabilities. As I was creating, I found myself looking for the correct tool by function. I
discovered that my brain was in creation mode like it usually is when I work, but it was using a
whole new set of tools.
By comparison, it was incredibly simpler to make the computer do some fairly complex
things with Scratch than with assembler or machine language. Assembler and machine language
have fewer instructions, and to accomplish something as complex as deciding whether or not the
mouse pointer is touching a sprite would take a large volume of assembler or machine language
code. Python was closer to the same level as Scratch because there are instructions to do many
more sophisticated operations than assembler or machine language.
These four languages can be classified in many ways, and I like to do it based on the
complexity of the commands that come with the language. At the bottom of the scale would be
machine language and assembler. The commands contained in these languages are low-level
operations that do tiny pieces of the work necessary to process information. They can be pieced
together to do anything that the higher-level languages can do, but it would take more code. One
benefit of using a low-level language is that you can create custom ways of doing those
constructed things. Above machine language and assembler would be Python. Python can do
things with a few commands that would take blocks of code for assembler or machine language,
such as running a loop until a variable reaches a specific value. Finally, at the top of the four
languages would be Scratch. It can do things with a single block that would take a much longer
block of code with Python, such as deciding whether the mouse was touching an individual
sprite.
Of the four languages, I found Scratch to be the easiest to use. I feel as though an
appropriately complicated task on each language would take the least effort to do in Scratch.
With that in mind, the task at hand should be considered, as well. Different programming
languages are suited to different types of tasks. It would be a lengthy undertaking to use
assembler or machine language to make a sprite move across the screen towards a dynamic point
in two dimensions, but it would probably take just as much Scratch code to do a bubble sort.
Based on that, higher-level languages such as Python and Scratch are more popular.
No comments:
Post a Comment