A New Frontier (not really but kind of)

30 Aug 2018

I breathe in the fresh, cool air as I step out of the hell-cavern known as ICS212: C/C++. I’ve been away from the real world for so long - the IDE is a familiar yet foreign tool, as I’ve grown accustomed to fighting my battles in the command line, with vim. Passersby and old friends shout to me, speaking of a legend I had heard before but never explored. “Javascript,” they cry out, “learn Javascript!” Directionless and weak, broken and cynical, I stumbled up the hill to that promised land. Now that I have arrived, I don’t know that I’ll ever leave.

Life in Paradise

Javascript is unique. Perhaps I say that for lack of knowledge of that great pantheon of programming languages, but still, it feels different to me. It’s a language that feels fun to code in, that feels natural and alive. Not that C and Java aren’t great, they have their ups and downs, but Javascript takes the form of a living, breathing, intelligent programming companion. I would say this is due in great part to the lack of strong-typing, a feature that allows the language to have much less friction than C and Java. For example, it makes a program like this possible:


function (input)
{
    let retVal = 0;

    if(input === "foo")
    {
        retVal = "bar";
    }
    else
    {
        retVal += 24;
    }
  
    return retVal;
}

It’s Like a Fifth Limb

The function is non-sensical obviously, but illustrates the flexibility of parameters and return types. One function, can return anything?!? This is something that would be very much more difficult to do in Java, let alone C (if that’s even possible). I’m not sure at this point what is going on behind the scenes of code like this, but I do know that on my end, writing it feels like talking. I have the idea for what I need to do, and just as quickly as I can say it, I can write it.

Pair the natural flow of writing Javascript with the athletic WOD program employed by the ICS 314 class, and you have a perfect method of software education. The WODs feel challenging sure, but they feel do-able; my Javascript muscles feel stretched at all times, ready to pounce on whatever code I need to get out. Contrast this with a language like C, where my figurative running shoes weigh 10,000 pounds thanks to necessary syntax and pointers, or Java, where I feel trapped inside a mirrorhouse of classes, objects, and a maze-like API, and all of a sudden it’s clear to see that Javascript is the perfect language for the WOD method of teaching.

Get a Little Perspective

As I sit atop the mountain, gazing upon the lowlands I formerly inhabited: the Java swamps, C tundras, and C++ jungles, I feel calm. This paradise in Javascript, a beautiful and convenient language, is nice, but I know that I would not appreciate nor understand it without first having made the journey. Tempting as it may be, Javascript doesn’t feel like a final resting place, merely another stop on the path. One thing is for certain though, it’s definitely one of the more pleasant stops I’ve made along the way.