JavaScript is Good for the Mind

17 Jan 2022

As someone who has taken ICS 111 and ICS 211, I was forced to get my feet wet in programming in Java. However, now that I have some experience with both Java and JavaScript, I can now say that there are some notable differences between the two languages. There are some aspects of JavaScript that make coding less tedious than Java. One example is how we can use an operation symbol with the equal sign whenever you want to do an operation on a value. It helps save time since I don’t have to write the value name over and over again. I also enjoy how easy object building is in JavaScript. When we declare the object, we can add as many characteristics as we want by listing it inside the brackets. We can also delete any properties we don’t want in the object. This is far more convenient than object programming in Java. I’m also quite grateful that we can use functions like “.push()”, “.pop()”, “.unshift()”, and “.shift()” when dealing with arrays. I found it frustrating to add new elements into a regular array in Java, and especially not being able to use these kinds of functions in ICS 211. In the end, since I’m more used to Java, utilizing all this in my code will take lots of practice and time, and hopefully I will come across more convenient tricks that I can implement into my own code.

After doing the practice WODs, I feel a little more confident going into the WODs that go towards our grade. I thought the time frames were going to be less forgiving, but I managed to complete the practice WODs either in Rx or Average time. I also managed to surprise myself with how fast I could come up with possible solutions. However, since I’m only getting my feet wet in JavaScript, it would take me a little bit of time to remember how to write what I want. I could think of the pseudocode quickly, but I began to slow down once I needed to type my thoughts into JavaScript. For the isUnique WOD, I could think of how to solve the task, but I took a lot of time figuring out how to write my solution in code. I accidentally wrote everything into Java, then I quickly realized that I needed to write everything in JavaScript. I also forgot to make my solutions into functions for both of the WODs, which took a lot of time to fix. But I am glad I’m making these kinds of small mistakes now rather than during the actual WODs. However, I am still concerned that the WODs will ask us to complete more difficult tasks than the practice ones we did.

In general, I take too much time thinking of solutions to homeworks, so the WODs are a good way to force me to think more efficiently so I have more time for myself and other classes. For example, I took ICS 211 last semester. This class handed out a lot of assignments dealing with building our own algorithms (Bubble Sort, Insertion Sort, Quick Sort) and data structures (ArrayLists, nodes, trees) from scratch. It would take me hours to figure out how to do one part of the assignment, and that would leave me with less time to work on my other assignments. On another note, I am kind of relieved that I don’t need to build any more LinkedNodes or Binary Trees from scratch anymore (hopefully we don’t have to do that in this class). Although it’s stressful, I think the WODs will help prepare me for the future, and I think it will help prepare me for technical interviews for future careers.