Why I like JavaScript

Posted on October 2, 2012 | 4 minute read

JavaScript logoI was discussing this with Kim on Twitter today - why I like JavaScript. There are many people out there who think it sucks as a language and I’ve read plenty of good reasons as to why exactly it is the root of all evil. At least some of my reasons for liking JS are admittedly biased:

  • It’s the first (and so far only) scripting language that I’ve really learned enough to feel moderately comfortable with. I’m still learning every day, but I can now imagine how something might work and how I’d code it without having to Google for two hours (this happened).

  • It is easy for me to experiment with. If I don’t know how something works, I can often just guess. And then even if it doesn’t do exactly what I was going for, I often discover some new thing I can use in the future.

  • JavaScript in combination with HTML5 is evolving at a fast pace. This is a combination of me learning something new every day and other JS developers making genuinely new and awesome stuff.  Things that we never would have imagined being doable in the browser before suddenly are. New demos and tools are being brought out almost daily that introduce something new you can play around with or explore. Awesome WebGL demos push what most people thought was possible in the browser to a new limit. When Dominic, the creator of ImpactJS, released Ejecta last week I was genuinely excited about what I and others can do with this and the doors it opens up. Imagine thinking you’re learning one thing, and then someone coming out with an awesome tool or framework to do something totally different with the things you’ve learned. With Ejecta, that is easy deployment on iOS devices. And the cool thing is, these kinds of things happen on a regular basis with JavaScript and HTML5. People are building new things quickly and sharing them with other JS developers.

  • Speaking of building things quickly - it’s so easy to build things fast in JavaScript. You can have a simple HTML5/JS project up and running within minutes. Like Flash, JavaScript is great for rapid prototyping and it’s a great option for those people (like me) who like to see the results of their work quickly.

  • The JavaScript community is awesome. I mentioned this briefly above, but when someone builds something new they’re often quick to share it with other developers. And so many people are working on JS/HTML5 projects that you’re always discovering some new blog or article with useful code snippets or cool demos.

  • JavaScript seems easily deployable. I’m not constrained to only releasing things for the browser. If I want, with a bit of modification I can make a game and release it on iOS, Android, platform X, etc. It’s awesome to know that you have those kinds of options should you need them.

  • It’s been a great introduction to programming in general. JavaScript was pretty easy to pick up (that’s not to say I didn’t have plenty of hair-ripping moments when I was starting out with it). A few weeks ago I started dabbling in C++. I haven’t gotten anywhere near things like memory management yet, but the very basic concepts like loops and conditionals were a piece of cake because I already know all this stuff from JS. Differences like having to declare variable types etc in C++ were easy to get used to. When I look at Python or some other scripting language, I can kind of already know the basics of what’s going on thanks to the things that JS has already taught me. Even though JavaScript may not be anywhere near as powerful as a “proper” programming language, it’s a great introduction to the core programming concepts in general.

  • It’s just fun. I enjoy getting up in the morning and working out in my head how to build a particular feature or make something work a certain way. Less than a year ago I’d have an idea for something I’d like to make with no clue as to how to actually make it. So I’d have this game in my mind and feel totally helpless, knowing that it will probably never see the light of day unless I find a programmer who happens to like my idea, too. Now if I have an idea of something I want to make, I can easily put together the basic structure in my head and be able to just start working on it without having to rely on anyone else. Before I started learning JS I looked for an engine where I wouldn’t have to do much coding. Now I look for the opposite because I like the coding part and think that it can provide more power and flexibility to let me make what I have in my head. And I know that this can apply to any language, but for me the speed of building things with JS and its flexibility just make this entire process enjoyable.




Categories:game dev dev games
comments powered by Disqus