It’s considered bad form to induce fear of the topic before a discourse. But what the heck, let’s just relax, visualize a cool sunny morning with birds chirping and flowers dancing in the breeze and move on.

JavaScript (JS) is not an easy first programming language to learn. There are many reasons why this is so. Take for instance the name “JavaScript”. The impression is that it’s like Java but perhaps a bit lighter. In the course of our discussion we’ll see why nothing could be further than the truth. Even if you don’t know Java or programming for that matter, you’d be misled. If first impression are thus, what hope if any is left? Another reason could be attributed to the schizophrenic environments (Eg: the web-browser) where JavaScript is usually imprisoned. Couple that with some blunders made by the designers of the language and you get what appears to be a soul sucking supernatural parasite.

But all of the above are only significant problems (perhaps the only problems) if you’ve made the wrong start – if you’re building upon misunderstandings, wrong notions and blind unguided explorations, the vast coldness of internet and the fiery depths of hell awaits you. :p Again, terrifying imagery and panic inducing facts. But remember, it’s all in our head. The sun is still there, the birds are still chirping and we’re moving along quite fine.

JS works in.

The browser: All modern browsers.

The server: Many projects under the umbrella term Server Side JS (SSJS).

As scripting languages for many applications. Adobe Photoshop, AfterEffects, The Java Virtual Machine et al.

What is this about?

Its about the octopus. (Refer the main image).

Although setting up your snazzy new website may be your prime concern and the ultimate goal of our meeting, we will sadly not be concentrating on such pragmatic issues for the want of making you self sufficient. For that want of giving you the safety boots and goggles required to pioneer this hazardous landscape of the octopus.

Thus this is also not about the famous close friends of JS: CSS and HTML. It is also hence not really about web development per se.

What you wouldn’t hurt to know

A vague Idea of what programming is about would help. So would your general ability to find your way around these technological contraptions that are the bane of our times.

What you need.

If you’re on Windows, you will require the Mozilla Firefox Browser and the Firebug plugin. Remember that beyond the function as a host for JS, we aren’t concerned with the Browser.

On GNU/Linux, you could either go with Firefox and Firebug or install the standalone JS interpreter spidermonkey. On Ubuntu

sudo aptitude install spidermonkey-bin && js

will install and run the interpreter.

The setup.

Once Firebug is installed and Firefox restarted, click the bug icon on the lower right of the window. Click the console tab on the window that pops up, click the red up arrow icon above the firebug icon to get a larger console.

Enter console.log("Hello wonderful world!"); and click Run. Note that “console” is a firebug object. It is not native JavaScript. We hope to steer clear away from such non native stuff in the spirit of our discourse but we need the console object to print things under firebug. You could also use alert("Hello world!") and in the case of our friends -all good people- who decided to use the standalone spidermonkey interpreter print("Hello kind world!");

Summary.

That’s all the foreplay folks. We get into the thick of things in the next post. Until then, consider these.

To excel in JS, start learning it in isolation.

JS is ubiquitous. It’s everywhere and it’s set to take over your world.

Wrong starts are almost invariably fatal.

Above everything, JS is extremely pleasurable and rewarding if approached correctly.

Share this: Twitter

Facebook

Like this: Like Loading...

Tags: Beginner, firebug, Getting started, JavaScript, Programming, REPL, spidermonkey