JavaScript: The Gateway Language
This is how JavaScript became my gateway language. If you’re unfamiliar with the term “gateway” it’s often referred to as the “gateway drug” something small you do that ends up hooking you on more serious drugs. Usually this is negative…
But in this context I’m referring to JavaScript as the gateway drug of programming languages (in a positive way). Or at least it was for me.
A little history
When I was younger I really wanted to learn programming and make things, especially games. But the languages that I researched and heard talked about over and over again were C and C++. This is how you make real apps and this is how you make games in particular. Not only was that advice completely wrong, it prevented me from being able to learn a simpler, more accessible language that could help me get my feet wet and build up my knowledge earlier in life.
Instead what happened is a got a big book on C++ (actually a few over the years) and spent hours and hours working through the book only to get discouraged midway through with little but a text-based/terminal app that didn’t really do anything cool and that certainly didn’t look like a game or a more useful application I could use or be excited about (now I find terminal applications fascinating).
Enter Node.js (aka JavaScript everywhere)
Fast-forward to JavaScript. Years later after I had basically given up trying to learn programming JavaScript had become somewhat of a superstar. This was just after Ruby’s glory was puttering out (though it’s still widely in use). JavaScript had a huge resurgence with the release of Node.js and frontend frameworks like Angular and React, (interesting documentaryjust released on Node.js on YouTube). Now you could learn JavaScript and make a backend AND a frontend, talk to a database, and make REAL apps (of course I didn’t know any of this at the time). And you could do all of this without worrying about pointers or memory allocation (even though you still need to worry about this eventually).
The bigger picture
Once I set out to learn JavaScript and Node and write servers and frontends and learned about authentication and API keys and calling databases I finally understood the lifecycle of how things worked at a high level. Building out this foundational picture was essential. I needed to know the purpose behind what I was building to see how it contributed to the whole.
One of the biggest things that helped me break through my initial barriers was the built in nature of JavaScript and its ability to control UI (user interface) elements on the web browser. I could visualize and see my code working immediately after saving my changes (thank you LiveServer and VSCode). I now had the puzzle pieces starting to form, or at least the outer edge to give me some frame of reference.
Once I opened up the can-of-computer-programming-worms with JavaScript and finally writing my own programs things changed. My mental model for what computers actually do and how applications actually do things changed forever. I now understood at a surface level what was going on. And it wasn’t just pointing and clicking a few UI elements together and copying commands from a tutorial or book (though that can be a good start). I realized that building things took time, thought, design, and hard work.
One thing at a time
Apparently apps are not easy to build. You have to design the user interface, the database model, the business logic. You have to call dependencies, and wait for things that might not be ready or that take longer than expected. You have to deal with how long things take and how that looks and feels to the user. You have to take into consideration the data you’re collecting, storing, and transmitting and encryption and keeping things safe. There’s so much more to making programs that I originally thought. But fortunately you can break these steps down into smaller blocks of work, and test each piece independently to make sure things work as you go.
Final thoughts
JavaScript was my gateway into computer programming. It was much easier to get started because of the simpler non-strict typing (which results in less syntax to remember and write), and the fact that I could write it on the backend and the frontend. But probably the biggest game changer for me was that I could hit save and I could see my changes instantly. I can’t stress the importance of a fast feedback loop enough! Also because I could see my code, see a button, see text popup, see a list populate with data from API, and it wasn’t just stuck in text-based land I started to see potential in how to actually build an app that seemed useful to me.
Fast-forward to today. I find myself writing some Java, Kotlin, and TypeScript for work and JavaScript and Swift for side projects. I’m by no means an expert but after 5+ years writing code I can finally say that I understand at least a little what is going on under the hood. And I can’t wait to learn more about how things work on an even deeper level.
-Jesse