A C++ Engineer’s Journey into the World of Javascript

This post is admittedly full of opinion, observation and reflection.

Someone once said you truly can’t master your native tongue until you’ve studied another. It takes a lot of time and work to master any language – where on a scale from one to ten, you rate yourself a ten.  But standing back you’re more likely a nine, or even an eight.

First of all, nobody should call themselves a professional if they only knew one language.

-- > Bjarne Stroustrup

So I couldn’t be happier to have the chance few senior engineers have – getting paid to develop in a language other than the one you’ve “mastered.”   After fifteen years of professional experience developing mostly in C/C++, I now have a job developing cutting-edge software with dynamically typed languages like Python and JavaScript (plus a little Ruby on the side.)

Likewise where my past jobs revolved around AAA game development and time-critical server-side frameworks, I’m now working on a web-based desktop and mobile application.  Languages like C, C++ and Java, which excel on the application engine level (i.e. game engines, browser clients, virtual machines), seem like overkill in most web-based work today.

When choosing a language for web development, on the client-side you’ve got few practical language choices: ActionScript and JavaScript.  If you want your app to run on the widest set of current and future browsers, JavaScript seems to win out.   For server-side work JavaScript is also making serious inroads with the coming of Node.js.

Node.js is a way to run JS outside of a browser using Chrome’s V8 JavaScript engine.   JavaScript like other dynamic languages imports modules written either in the same language or possibly in C with some additional work.

With Node.js, JavaScript is now on the same playing field as Python and Ruby, becoming a general-purpose language instead of a tool meant for browser-based development.  The Node.js community, while smaller than Python and Ruby’s is growing fast and has a lot of energy behind it.   With a large client-side community behind JavaScript, I suspect we’ll see more engineers jumping back and forth between client and server work.

And yet this is the first time I will not be using C++ for full-time paid work.  This may be the worst time for me to take an extended break from the language with the rapid compiler adoption of the C++11 standard and the upcoming C++14 standard.   I’m counting on a side-project of mine to keep my C++ skills fresh.

Looking ahead, the plan for this blog is to cover my journeys as a relative beginner in JavaScript, while chronicling work on my C++ side-project, and with a sprinkle of gaming to remind me why I got into software development in the first place.