tnSuperman tanktn oParticles uExtrusion j3d sandy flExtrusion fuelyoursenses meshCam bufferSnake dMap2 dMap pv2 cursorFire opticks faceGame FPSnake pv preOpticks painty youtuber fractalFIngers 2dbals

December 30, 2014

What’s so great about Javascript?

Filed under: doodles,html5,thoughts — Tags: , , , , , — Brandel Zachernuk @ 5:00 pm

I live and work in Silicon Valley now! I’m at Apple as a senior web developer, and that’s about as much as I can say except that it’s shaping up to be interesting!

Now that we’re here, my wife has been wondering what to do. Since we’re in the heart of the technology business, I’ve been eager (and a bit pushy, if I’m being totally honest) about her learning programming of some kind, and Javascript in particular. She asked me why she should learn Javascript and I realized I didn’t have a clear answer. After about five minutes, I came up with the following points.

What’s so great about Javascript?

Javascript runs everything

If you see anything interesting happen on a web page, it’s happening with Javascript. On top of that, though, It’s the internal scripting language of Adobe Photoshop and Adobe Illustrator, and quickly replacing the scripting languages of many other professional applications, too. Google and Mozilla are building operating systems where Javascript is the main app language, and Microsoft prefers Javascript for apps in new versions of Windows.

Javascript is free and easy to start using

The absolute worst part of beginning to program is the set-up. Installing a compiler and development environment before you even understand what those things are is a daunting task that many would-be coders never get past. If you can see this page, though, you’ve already got everything you need to start coding in Javascript. Every single modern browser is also a fully-featured runtime environment and debugger. And because it runs on the web, you don’t even need to download an editor – sites like Codepen and JSFiddle will host all your code experiments for free, and ensure that your experiments are online to share with friends or to get help with when things aren’t working properly. Perfect!

Javascript is plain text

Every program has two phases: it gets written by a person in human-readable source code, and then is translated and run by a computer in machine code. Programs written in languages like C or ActionScript are compiled (into computer-readable machine code) by the programmer before being given out to the machines they run on. The result is a program that runs efficiently but is nearly impossible to modify or even understand the inner workings of. By contrast, Javascript stays in the form it’s written in until the very moment it runs on your computer. That means that unless a programmer goes to great lengths to obscure what a piece of code does, it’s possible to view a script and glean some understanding of how it works.

The Javascript community is the biggest

Because of the multitude of places Javascript runs and the fact that it’s plain text, there’s a lot of discussion about the language. If you’ve got a question about how to code something in Javascript, chances are good that it has been asked and answered a dozen times over. The programming answer site Stack Overflow is an invaluable resource, and it has a huge Javascript section.

Javascript is forgiving

Learning programming involves a lot of frustrating ‘gotchas’ – the difference between an integer and a float and when to use them, how to allocate memory and when to clear it, how to know when a program’s going to finish versus cycling endlessly. Javascript manages all of these things for you until you need to know about them, making the necessary arrangements behind the scenes.

HTML is also pretty cool

The biggest part of most programs – between 60 and 80 percent – is the code devoted to the user interface. Because Javascript in the browser is directly attached to HTML, that proportion shrinks dramatically for most web apps. Javascript makes it easy to show text, load media from local files and internet, or respond to mouse input or touch on a mobile device.

Javascript: not perfect, but probably the best

Javascript is approachable for beginners. Although it has a number of flaws, they don’t come up until you’re doing much more complicated stuff. By that time you should be able to understand what’s actually happening and work around the flaws. The Javascript community and the plain-text examples that make up the internet mean there ample sources to learn from, and you don’t need any expensive tools or programs to begin.


So what are you waiting for? Press any key to start. Here comes a new challenger!

Older Posts »

Powered by WordPress