# My Journey in Programming Languages

Posted on

In this semester, I am taking a course called Principles of Programming Language. It introduced some interesting programming language concepts such as dynamic scoping, duck typing, functional programming, and logic programming. However, what I enjoyed most in the course is that I got a lot of chance to explore and compare drastically different languages. In a 13-week semester, we had to turn in assignments written in COBOL, C, Java, Python, Perl, Prolog, and ML. This was a very exciting experience and reminded me of my very own journey in programming languages. This article is kind of like a chronicle where I record all the programming languages I got exposed to during the first 15 years of my programming “career”.

## ActionScript 2 and ActionScript 3

It all began in the third year of my elementary study. At that time, Flash games such as Neopets, Mr. Snoozleberg and Club Penguin are all the rage. I remember that I always looked forward to every weekend, when I was allowed to play for an hour of Flash games with my little brother. I was so amazed by the Flash games that I wished I could make one of those someday. As a result, my mother sent me to a Flash game development summer camp held by a university in my city. My journey of programming thus began, like many of the fellow programmers out there, it was all because of the desire of making a game.

Actionscript 2 and Flash 8 was the newest technology then, and hence they were taught in the summer camp. As a third-to-fourth-year elementary school student, it was quite difficult for me to wrap my head around many concepts of programming languages (Note that at that time programming-for-kids software was super rare, and the web wasn’t filled with programming tutorial resources yet). However, after attending the summer camp and reading two Flash 8 tutorial books I purchased with my own allowance, I finally got a hint of how functions, variables, objects, as well as all the MovieClips and gotoAndStop()s work. The first project I completed is a diving game, where the player controls a diver using the arrow keys, if the diver successfully reaches the bottom of the ocean without hitting any of the sharks, the player wins. Though it was an extremely simple game, the experience was so satisfying that I couldn’t wait to dive deeper in the world of programming.

Micromedia was purchased by Adobe soon after I completed my first project, and they switched from Actionscript 2 to Actionscript 3. The upgrade from Actionscript 2 to 3 made the language more robust and more like a real programming language. By following the update, I got a stronger sense of what data types and object-oriented programming were all about. Therefore, thinking back, I always thought of Actionscript 3 as my enlightener of programming.

## Java, C and C++

Yahoo Knowledge+ was a popular forum like Quora back in my childhood years in Taiwan, people post questions and others answer it to gain virtual points. After the exploration of Flash and Actionscript, I wanted to go further in the world of programming and build a “real game like MapleStory”, so I posted my question titled “What programming language should I learn if I want to make a game like MapleStory?" on Yahoo Knowledge+ and waited for a response.

The great internet replied me with Java, C, and C++. Excited, I went to the book store, and found that books with “Java”, “C” or “C++” in their titles were all as thick as a dictionary. I started reading them anyway. I remember that I ground through most of the contents of Thinking in Java, C Primer Plus, and C++ Primer Plus even though I couldn’t grasp many of their contents. For a middle school student, this was really quite an accomplishment.

The concepts of pointer, reference, pass-by-value, pass-by-reference, and inheritance finally clicked in my mind after the long grind of flipping through the pages. Though I did not completed any big project aside from a calculator using Java Spring, these few years of reading truly enhanced my knowledge in programming, and later on made my university studies a lot more easier than my fellow classmates. (Few years later during my university years, whenever a classmate was scratching their head over the ideas of pointers/references/polymorphism and inquired about my “secret in how to write code so fast”, I always replied that I went through all these during middle school.)

## Visual Basic

Unlike all of the other middle schools in Taiwan, our school offered an elective “hobby” course for grade eight students. I chose “Introduction to Programming” of course. The teacher taught the course using the notorious Visual Basic, the most prevalent “for educational purposes” language at that time. With the knowledge of Java, C, and C++, learning Visual Basic was really dull and painful, but what’s more painful was to watch over half of the classmates struggling with Visual Basic and hating programming after the course. Really, thinking back, we might have lost many programming talents just because they were introduced to programming using Visual Basic (or C and C++), and was frightened off after their attempt on learning it. (We can clearly see a rise in beginner or hobbyist programmers these years, and I think this is partly because of the switch of beginner programming language from Visual Basic to Python, JavaScript, or even Scratch.)

I completed a small “tool-collection” project (including a toy MS Paint, a guessing game, a calculator, some other random stuff which I can’t remember) using Visual Basic after the course and swore that I would never touch that language ever again.

## C and Java again…

Without a doubt, I got into the computer science major. In my university, we were introduced to the C language first, and then for the purpose of teaching OOP, we were introduced to Java. I breezed through both of the courses without learning much new, but it was still pretty satisfying to complete the problems on our online judge system.

## Ruby and JavaScript

During my first year of university, I tried to get into web development on my spare time. At that time, the most popular web frameworks are Django and Ruby on Rails, and I chose Ruby on Rails. I went through some tutorials about HTML, CSS, JavaScript, and Ruby, but didn’t really complete a project. However, this exposure to web development actually made my life easier later on, when I got a web internship in China, and couple years later when I had to develop a web app in my level 3 computer science course as well as my final year project. So it kind of worked like the Steve Jobs’s “connecting the dots” quote for me.

## PHP

I got a summer internship in Chongqing, China after my first year of university. I was assigned to write some simple features of a sales website using PHP. I didn’t really enjoy the internship itself because it was not challenging at all, but it was still quite nice that I got the chance to explore a different city and interact with people of different lifestyles.

Back to our topic, I feel like PHP just isn’t an elegant language. It must be the fact that it was evolved from an HTML template language through many incremental steps. I heard that PHP has evolved further and become a more consistent and general-purposed language in these few years, but I didn’t and probably wouldn’t try out myself.

Anyway, after I finished my internship, I decided that I don’t enjoy web programming, so I started learning game programming next.

## C#

I got a severe illness during my first semester of my second year in the university, so I suspended my studies for three entire years. During that period, I picked up the essentials of gameplay programming using the famous Unity game engine.

When I first started to learn Unity, it offered three languages for gameplay scripting - C#, a dialect of JavaScript (often referred to as UnityScript), and Boo. Among the three, I liked the syntax of Boo most, nonetheless, I went with the mainstream C# due to its abundance of online resources.

It turned out that programming in C# was a rather enjoyable experience. It was like a more elegant and concise Java (of course this is because C# came later than Java, so it could extract the “good parts” of Java). Much of the language features such as operator overloading, built-in events & delegates made gameplay scripting much faster and maintainable.

I published two games programmed in C#/Unity before I got back into university. The projects made me more confident on building software systems of larger scale, and made me want to pursue game development once again. (Spoiler: I later decided not to.)

## Swift

During the second year of my study suspension, I got very lucky and was chosen to be a student participant in Google Summer of Code 2017. I worked with the Anita Borg’s Institute and developed a mobile game app with them. The game was separated into the Android port and iOS port, and since I was more interested in Swift than Java (most people still develop Android apps using Java instead of Kotlin back then), I chose to develop the iOS port.

The internship was quite rewarding (I mean, both the experience and the stipend). I participated in a real-world open source software development team and got many practical software engineering experiences like how to do version control, unit testing and continuous integration.

As for the Swift language, I really appreciate the efforts of Apple on designing a higher level and syntatically more modern language for the whole Apple ecosystem. Though Swift still includes some legacy bridges to Objective-C, many of the lower level Objective-C code could be fully expressed using Swift with more elegant code. For example, in my opinion, the replacement of pointers in Objective-C by optionals in Swift is a great decision made. This results in way more readable and reliable code.

As a side note, when I first got into Swift, I felt that the overall design of Swift resembles C# a lot. For example, struct-typed variables are passed-by-value and class-typed variables are passed-by-reference in both languages, and they both support getter and setters.

## GDScript

After I completed two games using Unity, I started to look into different game engines. Godot attracted my attention by being an open source, feature-rich, and actively maintained game engine.

After learning the basics, I planned to make a game with a larger scale than all of my previous games. The process of developing a multi-level multi-character platformer game thus began.

Although there are many language-bindings to the Godot Engine, I went with the default language - GDScript for my development. Honestly, I feel that GDScript is pretty much like a carbon copy of Python. It’s syntax is concise, elegant, and extremely easy to learn.

After approximately a year’s development, I finally published the game on Steam and completed one of my little dreams. However, after the big struggle of developing a medium-sized game all by myself, I kind of got burnt out in game development, and wanted to try doing something new.

## Dart

I finally got back into school and continued my second year studies in 2019. One of my classmate was pretty excited about Google’s new cross-platform mobile development framework - Flutter, and spread the gospel with me. It did sound pretty exciting and fun to use, so I bought a tutorial course on Udemy and after that, started a small project.

The project I developed was an apnea training app for free divers, since my siblings were getting into free diving and I found it interesting to create an app to help their training. But back to the topic of programming language, Flutter requires us to develop in Google’s Dart language. Though I saw many bad words about Dart on the internet, I actually pretty enjoy using it (at least it’s more enjoyable than JavaScript). The language is pretty solid and includes convenient features such as generics which many languages lack.

Though I didn’t continue my journey in Flutter development after the apnea training project, I felt like Flutter would soar and become one of the major frameworks for web/mobile client development in the coming years. The main reasons are that 1) it requires developers to learn only Dart but accomplishes HTML/CSS/JavaScript functionalities, 2) the hot reload feature makes development cycles very fast, 3) it combines declarative programming and the business logic pretty well. That’s just my two cents, but the main takeaway for me after completing a Flutter project is that I got to appreciate the beauty of declarative UI programming. This experience later on made my learning experiences in SwiftUI, React, and Vue much smoother.

## Python and Octave

The AI hype was on after I got back into the school. Over half of my fellow classmates wanted to get into the fields of machine learning. Curious about the hype, I wanted to figure out what machine learning and deep learning really is. So, I took the famous intro course taught by Andrew Ng on Coursera and did the assignments in Octave. Also, I purchased the popular Deep Learning with Python book and went through some examples using the Keras framework.

Overall, I think machine learning and deep learning are too math-heavy for me, and I really couldn’t see that there will be enough job vacancies for all those aspiring machine learning practitioners. Thus, I didn’t dive deeper in the vast field of machine learning and deep learning.

## Python and Prolog

I still took the Introduction to AI course offered by my department even though I dislike AI, and this was a big mistake. I had to work on a substance toxicity prediction project using the TensorFlow framework, and a traditional rule-based AI project using Prolog.

I really could not wrap my head around TensorFlow in such a short time, even though I binge watched tutorials after tutorials. At the end of the semester, I finally put together a neural network which worked kind of well for this task somehow, but I still didn’t know why and how it worked.

As for Prolog, it was super tough to get into since I was only exposed to the imperative programming paradigm in the past. I think the professor should teach more about logic programming in the course instead of leaving us struggling with Prolog on our own, but anyway, I still completed the project (with so much pain).

After this course, my determination of not getting into AI fields was even stronger.

## Tons of Java, C, and Python

During most of the level 3-4 courses, we had to write our homework in either Java, C, or Python, which was quite reasonable since they are the most popular general purposed languages in the current decade.

Below is a list of courses I took and their corresponding languages used:

• Data Structures: C
• Operating Systems: C
• Algorithms in Bioinformatics: C++/Python/Java
• Database: Java
• Computer Networks: C/C++
• AI: Python, Prolog
• Programming Languages: C, COBOL, Java, Python, Perl, Prolog, ML

## COBOL, Perl, and ML

Yeah, we had to program projects in C, COBOL, Java, Python, Perl, Prolog, and ML within a 13-week programming language course. It sounded quite daunting at first, but after introducing the core concepts of programming languages in course, that is, binding, scoping, static vs. dynamic, it became quite easy for us to pick up a new language within a short period of time.

COBOL is a really old, ugly and verbose language. When programming in COBOL, it makes us think like a programmer in the last century. We have to format the program within certain column numbers, divide the program into different divisions, specify the precision of a numeric type, and compose record (aka struct) types using very unreadable code. However, surprisingly, COBOL wasn’t that hard to pick up. It’s still an imperative language and works like the C-based languages. I probably wouldn’t have a chance to program in COBOL again in the future, but it was a very unforgettable and cool experience to be honest.

Perl is just like the other popular scripting languages, except it includes a lot of weird symbols like %, @, $. The OOP syntax for Perl is also quite weird, though I quite like the term bless for “blessing” a thing to become a class. Overall, learning Perl isn’t that difficult as long as you remember what those weird %, @,$ mean.

Prolog, as mentioned before is quite different from the imperative programming languages. Finally, after taking this programming languages course, I started to grasp the beauty of declarative logic programming languages. When programming by logic, you have to switch your mind to think about the “what” instead of the “how” of the program. That is, you don’t think about the algorithms when programming, what you do is to state the basic rules and predicates of a program.

ML is a pure functional language, also quite different from the ordinary imperative languages. When programming in ML, we think of functions as mathematical functions and variables are mathematical functions. Thus, ML isn’t that hard to pick up compared to Prolog, since most of the people are already well-trained in the mathematical mindset required in functional programming. In my opinion, ML is quite straightforward and concise, functions receive parameters and output results, no side-effects at all, each variable associates with one value, so variable assignment is non-existent. Writing a program in ML is like performing different mathematical transformations through various functions, which pretty much resembles the mathematical exercises we did throughout the math courses offered by school.

## Go and JavaScript

I started to think what I want to do after graduation these couple of months, and judging from the job vacancies in the city I wanted to work in, I figured that I would give web development a second try. I planned to pick up a frontend framework as well as a backend language. For frontend, I tried React in a Hackathon and didn’t like the mashed up JavaScript and HTML code, so I went with Vue. As for backend, since I always preferred statically-typed languages and I wanted to try out languages aside from C# and Java, I went with Go.

I quite enjoy programming in Go, and in my opinion, I think Go could be regarded as a modern C. Unlike most of the popular languages emerged in this century, Go preserves pointers and supports OOP in a very different way. Also, different from other mainstream languages, Go’s interface is quite unique and somehow resembles duck typing in dynamic-typed languages. The main drawback of Go is that many basic functions and container types aren’t included in the standard library, so you have to reinvent the wheels in many cases just like C. Also, the most common criticism on Go is that it doesn’t support generics.

Since I plan to pursue web development once again, I decided to build a small online web game as my final year project. Originally I planned to build it using TypeScript and Go, but after doing some research, I felt that the learning resources and communities of TypeScript still wasn’t there yet, so I went with JavaScript and Go. However, the growing interest in TypeScript made me quite excited since I like statically-typed language over dynamically-typed language, and being able to program client-side web app using a statically-typed language is really enticing.

## What I Enjoyed Most

I think programming language wars are quite childish and pointless, especially after taking the programming languages course. Each language has its own perks and fields of application, not to mention that the popularity of a language wanes and waxes. So, in this section, I’m trying to list my personal preferences about programming language instead of composing a “tier list” of programming languages.

As I mentioned, since I enjoy programming in statically-typed languages more, no dynamically-typed language is on the list.

The top three are Go, Swift, and C++. In my opinion, Go preserves the good parts of C while adding modern syntax on top. Swift is elegant in a way that it wraps the ugly Object-C syntax in a more readable form. C++ is messy yet powerful, I especially like the STL of C++, and I think it provides the most straightforward ways to manipulate container data structures.

I also pretty enjoy programming in C# and Java. The two along with Swift offer the best OOP experience for me.

Aside from the imperative programming languages, I consider that Prolog and ML each has their own beauty, and programming in them requires us to switch to a different mindset. However, I think they are only practical in niche areas.

## Conclusion

Just to show off, I’ve written projects in all the following languages:

• Actionscript
• Java
• C
• C++
• Visual Basic
• JavaScript
• PHP
• C#
• Swift
• GDScript
• Dart
• Python
• Prolog
• COBOL
• Perl
• ML
• Go

And the journey continues…