Early Javascript Thoughts

19 Jan 2017

Javascript

After over a week of being introduced to the basic syntax of Javascript and solving some small problems with it, the first word that comes to mind about it is ‘interesting’. Now, I realize that the word interesting can be very unspecific and uninteresting in and of itself, but as someone who comes from a class-based object oriented background (Java, C++) with some procedural thrown into the mix (C), I do believe that that word accurately depicts my feelings on it. First off, as someone who has programmed mostly in Java and is used to arrays and data structures that can only hold one type of object, realizing that arrays in Javascript can hold multiple types of objects (string, number, etc.) was quite surprising. While I haven’t worked on any large or complicated projects in Javascript yet, I could see this aspect of the language throwing me off in some way and resulting in poor/inefficient solutions. Something else that surprised me was variables, which can hold multiple data types and whose types don’t have to be in the declaration (int, string, etc.).

For this essay, one of the questions posed to me was whether I thought Javascript was a good or bad programming language from a software engineering perspective. This may seem like a cop-out, but I honestly feel that I’m not equipped to answer this question yet as I haven’t worked on any large projects. At the most miniscule of glances Javascript can seem quite similar to something like Java, but even with my small experience with it I can tell it is quite different. The previous paragraph shows some examples of this. What can’t be denied about Javascript though is how popular and widespread it is. The most common use of it is of course to run code on the web, but the language has been appropriated and used to do so much more. One example of this is Node.js, which can be used to build efficient, powerful, and highly scalable servers. Another example is a service named Discord, which is basically a voice/message application where users can create their own individual servers and invite people to it. It is mostly used by people who play games to voice chat, but it is so reliable, easy-to-use, and powerful that it has become the de-facto chatroom for my group of friends. There is both a web and native application and they are coded in Javascript with the Electron framework. Discord being such a fantastic program that I use everyday has made me even more hesitant to answer this question without more experience.

Athletic Programming

Now we move onto the subject of athletic software engineering, which takes advantage of the short duration, high intensity concept used in workouts. Here is how athletic software engineering works: you are given a problem and a certain amount of time to solve this problem. Within this time limit, there are certain ranges of time which serve to judge your proficiency with the material and how quickly you can solve the problem. While I have only participated in three of these exercises (two practice ones at home and one under the supervision of the instructor), I have to say that I am already a fan. There are a few major benefits that I can think of, with the first being that you are forced to work on whatever problem you are working on. It is often said that time is the greatest motivator, and when you are being timed there really isn’t room to procrastinate or fool around. You’re forced to focus intensely on the problem at hand, and focus is something that everybody struggles with to various degrees. Today there are so many things to distract you from whatever task you want to accomplish, and I believe that this athletic approach is a great way to stay focused. Another benefit is that since there is a natural stopping point, you won’t just be perpetually banging your head against the wall, which will result in burnout. If you don’t manage to solve a problem, you can take a break, clear your head, and attack it again later. This actually reminds me of something called the pomodoro technique, which is a time management method where you work in 25 minute intervals which are separated by short breaks. I’m sure that this approach will become more stressful as the problems asked increase in complexity, but I don’t believe that the stress will take away from its effectiveness and ability to bring focus.