At the moment, I am taking a course on Software Engineering from UH Manoa’s Information and Computer Science Department. It is the first week of class and we have already began our 3rd module: Javascript Basics. Appropriately named, the Javascript Basics module is intended help us students become competent with elementary Javascript. The goals are to be able to use basic Javascript constructs such as variables, functions, conditionals, loops, arrays, objects, implement object orientation using the ES6 class construct and use the Underscore library to program in a functional manner.
This is the first time I am being formally introduced to Javascript. I am currently in my 8th semester as a Computer Engineering student, so I am aware of its ubiquity on the web and am eager to learn.
My experience is mostly with languages such as C, C++, and Java. As it was explained to me by my professor, Dr. Phillip Johnson, the languages Java, C, and C++ stem primarily from Assembler and interacting with the physical registers and memory in the computer while Javascript “comes from much more abstract notions about computation”. So I am expecting Javascript to be a higher level programming language than what I am used to.
For this software engineering course we are practing Athletic Software Engineering, a system involving a high intensity and time-constrained approach to using the new skills we are learning. This method I believe will be very effective.
As a part of this Athletic Software Engineering pedagogy, I have been assigned and have completed the FreeCodeCamp basic JavaScript exercises. This basic JavaScript module includes 106 exercises to introduce the syntax and basics of programming with JavaScript. I also have started reading sections of the ES6 for Humans book available here. I have read the section on let, const and block scoping, as well as for…of vs for…in.
At this point (I am a total novice with the language), my opinion, of JavaScript is positive. JavaScript seems to be easy to use and powerful.
Some reasons JavaScript is looking great are:
- The syntax is simple and effortless to adopt.
- Creating functions is less verbose than Java and more flexible than C
and declaring and initializing variables is intuitive.
- The function signature in JavaScript does not need to include the
return type or the parameter types, this information is determined
automatically by the function's implementation which is very
convenient.
- When declaring and initializing variables the variable type does
not need to be stated, it is inferred by the initialization and
usage.
- The content of an array can vary in type, this is contrary to many
other programming languages and is very effective.
- Functions are first class citizens, meaning we can, in a
straightforward way, do handy things like pass functions as parameters
to other functions, store functions in data structures, and more.
However, a small but relatively painless difference compared to my prior programming experience is the convention (not requirement) to primarily use the keywords let and const when declaring and initializing variables. This convention controls the scope and mutability of the variable in a way that is easy to understand and may prevent bugs.
I am sure as I build up experience with JavaScript my opinion on it will become more refined and I will find some niceties and some issues. Currently though JavaScript is all good in my eyes.