A Whole Different Script

19 Jan 2018

Simple Yet Powerful

After a week of getting familiar with JavaScript, “simple” is the word that comes to mind when I hear “JavaScript”. In the past I’ve worked with Java, C, and C++ so when I entered ICS 314, I thought we would use one of those programming languages or something similar. Going through the “FreeCodeCamp” exercises, it was easy for me to understand its unique syntax because there were similarities to Java, C, and C++. Compared to these programming languages, JavaScript is “simple” because programmers do not have to declare the datatypes of their variables. This is an interesting feature because programmers do not have to worry about making sure their variable is a float or double instead of an int or keep track of the datatypes of their variables. Another feature that I thought was interesting was the ability to store different datatypes and not having to declare the size of an array. For example, I could have strings of names and integers of ages all in one and constantly add as much data into the array.

	void programmingInC() {
		int var;
		int array[10] = {1, 2, 3, 4…};
	}

	function programmingInJavaScript() {
		let var;
		let array = ["One", 1, "Two", 2, "Three"…];
	}

A New Style of Learning

In addition to learning a new language, I was also exposed to a new way of teaching and learning. In a typical course you’re listening to the professor lecture and after class, you’re given homework to see if you understood what was taught in the past hour. In ICS 314: Introduction to Software Engineering, we were introduced to “athletic software engineering”. Here, the class is “flipped”. Before class, we are given lecture videos and articles to read. In class, we do activities that reinforce what we learned through the videos and articles. Having the class organized this way, were given the opportunity to come to class prepared with questions to ask the professor.

Workout of the Day (WOD)

One of the activities that we do in class are “workout of the day” or WODs. For this activity, we are given a problem to test the skills that we learned through the weekly modules. We are also given a time limit to complete the problem. These WODs are meant to prepare us for the interview process where we work out problems in front of recruiters. When it comes to working under pressure and in a time limit, I usually do not perform well, I start to overthink the problem or miss an important detail. My solution to our first WOD is shown below:

	function jabbyWabby() {
		for(i = 1; i < 100; i++) {
			if((i%4 == 0) && (i%6 == 0)) { 
				console.log("JabbyWabby"); 
			}
			else if(i%4 == 0) { 
				console.log("Jabby"); 
			}
			else if(i%6 == 0) { 
				console.log("Wabby"); 
			}
			else { 
				console.log(i); 
			}
		} return;
	}
	jabbyWabby();

After turning in this WOD, I realized that I forgot to consider “100” as one of the values for “i”. As I do more WODs, I hope to get better at working under pressure and get better at working out problems on the spot.

Source: JabbyWabby WOD