I, like many other students, tend to overthink. This is not simply limited to the realm of academics, I will spend minutes deciding what to eat for breakfast. How many calories should I eat, will this meal make me feel sluggish and drowsy? How long does this dish take to prepare? What if I suddenly discover a severe allergy to one of the incredibly common ingredients found in this recipe? As you can imagine this almost manic level of over scrutinizing meaningless decisions really cuts into my schedule, in fact I almost never eat breakfast before leaving to go about my day. So how does an issue like this translate into learning a new programming language? Let me set the stage for you by first spending some time talking about a little language from the 70s called C.
Unfortunately I was not blessed with the gift of naturally understanding programming languages like it were my first spoken language, though with enough dedication and youtube tutorials I manage to learn enough to get by. This worked out fine for me as I practiced programming using python and java, two relatively high level languages that are fairly accessible. The real issues arose with my introduction to C. As many of my peers know, ICS 212 is a brutal class for those who are uninitiated in the realm of low level languages. C took me much, much longer to learn than any other language and moreover I had to create such long, multi-line solutions to do simple tasks that could be achieved in one integrated function in a language like python. Having to spend a semester throwing myself at learning how to both use C and understand the fundamentals of how basic concepts like arrays really worked was not an easy task.
Moving forward into this semester I assumed my troubles were long gone and I would never have to look at C for at least six months. What I was faced with on the other hand was the complete opposite of what I had just spent a whole semester training my brain to do. Now we were tasked with learning a new high level language and to find the solutions to problems as quickly as we could in an exercise called athletic programming. This was a major shock to my system. For the first few exercises I felt fine, the prompts were easy enough and I had some experience under my belt from doing our assigned FreeCodeCamp lessons. When coming across a slightly more complicated exercise is when the cracks in my mentality began to show. For a practice athletic programming problem we were tasked to find if a string was composed of unique characters. I went into the problem thinking I knew what to do. “I’ll just split the string into an array of separate characters and iterate through the given string using each index as a key.” And as one might expect, I ran out of time. My stopwatch read 12 minutes, which was the ‘did not finish’ criteria. At the point of my alarm going off I had only coded the first half of my solution and I wasn’t even sure if it worked. Upon reviewing my lessons, the provided solution, and some discussion in the class forums I learned that the problem could be solved in less than 10 lines, some students even figured out how to do it in one. I spent so much time in my “C” mindset that I totally forgot how strings worked in Javascript and about the many tools I could use.
This experience was a bit of a wake up call for me and I am now approaching this language with a new mindset. I can now see the powerful ways in which Javascript can be utilized. Complex tasks can be completed in very few lines, hundreds of useful tools are available for you to tackle any task, and most importantly Javascript is very easy to understand, making the nightmare of debugging more like a mildly stressful daydream. I can’t say that my overthinking has gotten much better but I can feel a little bit of improvement with each practice problem.