Introduction to Programming Languages

5 1 0
                                        

(Jan 16, 2021; It's been a reaaaally long time since I've worked on this, about 2-4 years?)

In this part, we'll discuss a few programming languages that I have been introduced to over these past few years.

--- Scratch (* scratch.mit.edu *)

In around late Winter/early Spring 2016, I found this website that is mostly for kids but can be pretty powerful if used correctly. It's called Scratch from the Massachusetts Institute of Technology (MIT). It's a drag-and-drop based block coding language, and originally worked using Adobe's Flash technology, but switched to using an HTML5-based interface in January 2019 to improve performance and compatibility with Flash's impending termination of services in January 2021.

The site allows you to create programs (called "projects") by dragging and dropping blocks in a space on each object in the project, called "Sprites." There's also a Backdrop element, and each element has a "costume" or bitmap/vector graphic, as well as a tab for audio elements.

It can be useful for coding small little games and animations by using block-based coding, and it's not that difficult to learn, either. It's intended as a programming learning catalyst for younger people, but with the right technological know-how, you can create things extremely powerful, like a full-on 3D engine. Best of all, it's all web-based. But there are some offline editors as well.

If you're more interested in a type-it-up interface like C or JavaScript, but would like to see a version of this for Scratch, take a look at the Tosh project (tosh.blob.codes). The site offers a text-based version of Scratch, but maintains most of the other interface elements. It makes Scratch much easier to compare to text-based languages.

--- Python (* www.python.org *)

In mid Summer 2017, I was introduced, through a daily coding class for a week, to a much more powerful language called Python. 

Python is an object-oriented text-based language, unlike Scratch, and is very widely used. If you find a lot of obscure programs for Windows that do different auxiliary and helpful functions, chances are that after digging around in the files you could find some "xxx.py" files, where ".py" is the file extension of many Python project files.

The Python programming language was first developed by Guido van Rossum, and was first publicly released on February 20, 1991. Since then, it has become a globally significant programming language and is used to make many, many programs.

As a programming language for education, it could be considered very high level, but it also has some basic functions like the "print" function that has existed since the arrival of programming languages.

My experience with Python was much more laid-back than the high level applications it can have, and mostly involved the turtle graphics module and some basic text-adventure projects. Other than that, I don't know much about Python.

I do know that the famous 3D modelling, rendering, and animation program, Blender 3D, is programmed in Python. So that's interesting.

--- Ruby (* www.ruby-lang.org *)

I first discovered the Ruby programming language in mid-late 2019, and it has been my favorite programming language so far. It is another object-oriented language

When taking a look at its expressions, it seems extremely similar to C or C++, and that's likely because C(++) is the universal language of computers, and almost all programming languages are like "expansions" of C(++).

For example, a variable "g" can be stored as, say, 3 ("g = 3"). Then, you can add 4 to it by typing "g += 4". Then, the value of g is 7. This "+=" function exists in both languages, I believe. Additionally, there is an alternative for conditional statements when writing "or." for example:

(

g = 3; h = 7; j = 2

return (g == h || g == j)

)

I'm not exactly certain, but I believe that this would work in both Ruby and C. The keyword "||" is interchangeable with the keyword "or", but it actually has a differing priority from "or". This is something more advanced, and I can't really go into details about that, so I'll just leave it.

I was first introduced to Ruby after messing around with a pretty old game-making engine from around 2012-2013 called RPG Maker VX Ace. There's a "script editor" function, which allows you to completely rewrite how the game should run, or add your own scripts to make the game work a bit differently.

There's a lot going on behind the scenes with the Ruby interpretation for the program, but it follows the language of Ruby rather closely. It's also really easy to understand once you get the hang of it, and it gets really interesting. So interesting, you just can't stop thinking about what other things you can do with it. (Just kidding.) 

The original Ruby language was first released on December 21, 1995, and was developed by a Japanese programmer looking to balance parts of his favorite languages (mostly Perl, Smalltalk, Eiffel, Ada, and Lisp) into one dynamic functional language. His name was Yukihiro "Matz" Matsumoto.

The current most well-known Ruby-based program is Ruby on Rails, although I'm not exactly sure what that is. (That's just the most of what I got a bunch of search results for Ruby came up with, so yeah...)

--- C and C++  

C and C++ are languages that I have never actually been able to code a single thing properly in. So...

The reason C is so complex is because of the fact that its instructions are directly converted to byte or object data for the computer to understand. In other words, it's simply machine code, but reformatted a bit, and made a little more human-readable.

C is like the universal language that is necessary for becoming a genius/master in computer programming. It's extremely complex, and its structure is directly read by the computer and run.

The difference between C and other languages is that it is run directly. Languages like Python, Java, LUA, and Ruby all have to be "interpreted." Remember earlier when I said C was kind of like the foundation for other programming languages? Yeah, "interpretation" just means "convert to C code, then read it."

The process of interpretation makes almost all other languages much slower than C. C is the fastest language, apparently. The slowest language would have to be Scratch. 

During the days of Flash, Scratch had to convert from block instructions written in its language to Flash code, then convert that to c, then use those instructions to change whatever's needed in the Flash program, which is kind of umbrella-ed under HTML. That's like, 3 or 4 different languages interacting at once.

The switch to HTML5 changes the need for Flash and runs everything in HTML and C instead after conversion of Scratch's system to HTML instructions.

C is very complex.


That about wraps it up!

Thanks for reading, hope you enjoyed this little nerd trip I suppose XD

Programming TutorialsWhere stories live. Discover now