Bilingual Programming

03 Sep 2020

Introduction

Though many computer programmers prefer to specialize in one programing language, it can be helpful for them to be flexible in other languages. Such is my case with JavaScript, a programming language that I have begun learning this semester.

Prior to learning JavaScript, I had some background knowledge of its popularity in the Computer Science community. First, it is considered one of the core languages for web-making as it allows developers to implement creative features and behaviors in their designs. This can be seen through its applications on multiple social media platforms, such as Facebook, Uber, and LinkedIn. Second, it was applied to creating powerful and efficient servers, especially using the runtime system node.js.

Learning JavaScript Basics

As mentioned earlier, I had only begun learning JavaScript for the first time this semester. I held no prior knowledge concerning the language’s unique features, such as its functions and syntax. Upon practicing JavaScript in the website freecodecamp.org, I saw that some of its features are like C, a programming language I am familiar for many years. This included the basic code and syntax for data manipulation, such as assignments, arithmetic operations, and loops, and data types, such as integers, characters, and arrays. The first new details I encountered that were exclusive JavaScript were the keywords var and let. From my understanding, the keyword var is used for basic variables to store data. The keyword let functions similarly to var, yet only allows reassignment of data in the scope it first originated.

After completing the basic lessons of JavaScript, I moved on to features of JavaScript ES6 that revolve around function creation, Object-Oriented Programming, and module making. In ES6, we can structure functions in various methods to improve flexibility in our code. One method is arrow functions, which allows us to write parameterized anonymous functions without labeling them with names. Another method is implementing default or rest parameters, which allows functions to initialize variables with data or take in multiple arguments. Finally, there is the promise function, which creates an asynchronous task that can be either be resolved or rejected. For Object-Oriented Programming, ES6 utilizes features that are like some languages, yet has unique methods of handling them. Like C++ and Python, JavaScript can create various types of objects using the class syntax. In classes, data can be manipulated through various functions such as constructors, getters, and setters. For ES6 specifically, object data can be directly assigned and extracted neatly through destructuring assignments. The last few lessons of ES6 involved the basics of creating a JavaScript module, which can be used to handle file transferring tasks.

Overall, I find JavaScript an easy language to learn. The logic and syntax of the language does not take a lot of effort to understand, almost like learning Python. However, in my opinion, the simplicity of the language can be a drawback for experienced programmers as it may be inefficient for more complex projects, such as software.

Need for Speed

Alongside efficiency, speed plays a major factor in measuring a programmer’s skill. Even for an entry-level position, an employer should expect their employees to write code at a considerable pace. In this class, students are trained through athletic software engineering where they are assigned Workout of the Days (WODs) and must complete them as fast as possible. So far, the WODs given to me were simple and easy to code given a somewhat solid foundation of basic JavaScript and proficiency in solving algorithms. However, under a strict time limit I do tend to forget efficient methods and would usually write spaghetti code to make a working program, such as a large block of if-else statements. Nonetheless, I believe these workouts would help me build speed in developing foundations of a program so that people can move on to the optimization process sooner, like how a person revises their first drafts of an essay. I hope overtime in the next WODs, I can break out of that habit and make code both fast and efficiently.