Confessions of a Newbie JavaScript Developer

A few months ago I took on a brand new JavaScript and HTML/CSS based project here at Jive. My experiences up to that point with JavaScript had been extremely limited. The only work I had done was through my work on Jive Forums and a little bit of time while working on Wildfire. In fact, when I started at Jive all of my experience up to that point had been in using Java, both server and client side; I had nothing as far as web experience was concerned.

The first thing I did to get myself started down the path where I could work effectively on the project was to get the book, (also known as the “Rhino Book”). Everyone I talked to said that it was the book as far as learning JavaScript went and of course, it was featured in the Weird Al video, White & Nerdy. The book gave me the basics to get started, the syntax, and how to write basic things like functions.

Through my previous experience I had come across a Firefox extension called Firebug. Since my very first days learning Java I had learned how invaluable both a good IDE and a good debugger is to the development process. For developing JavaScript I wanted something comparable, to ease my development process and prevent me from pulling out my hair over silly bugs that an experienced JavaScript developer would find immediately. Firebug provided these debugging capabilities for me. As an aside, does anyone notice the pattern of awesomeness among products with fire-related names?

This is the Beginning of a Beautiful Friendship

The JavaScript library I am writing is somewhat complicated, the small scripts I wrote before were nothing in comparison. The value Firebug provides for me is allowing me to step directly through my program, see exactly what it is going on inside of the browser, and easily troubleshoot issues. It also provides a console, so, at any point during the running of the program you can print to the console using the following:

console.debug(“This is a message.”);

Any errors that occur, missing variables, missing functions, anything along those lines are logged to the console making troubleshooting extremely painless. What could’ve taken minutes or hours of dropping painful alerts in the code to see what was going on simply did not occur.

The newest beta of Firebug will also print out any and all HTTP requests happening inside of the browser. These print out in the console, listing all headers sent to the server, received from the server, the body content of the request and response and also the amount of round-trip time for the request.

I don’t know how I would’ve survived without the capabilities that Firebug have given. It’s proven itself to be an invaluable tool in my budding JavaScript arsenal – so much so that we (Jive) just donated $100 to the project.

What am I doing with all of this crazy JavaScript? More on that soon…

Hi Alex,

JavaScript has been high on my list of ‘things to get to know better’. I never really checked it out because I didn’t feel like weeding through the millions of (horrible) pages on ‘JavaScript tutorials’ from people I don’t know, and was affraid to get bad tips that led nowhere. It’s good to finally have some tips from people that I do trust to write good software.

I’m eagerly looking forward to hearing more about your library.

Hi

did you have a look to the prototype.js library ?

It is a really interesting and well thought library that makes Javascript more readable (personal opinion) and that contains lots of useful functions.

We are using prototype throughout all of our products, it is simple and invaluable for helping to develop Javascript.

I’m needing something just like Firebug! Granted my JavaScript is usually just small stuff. Thanks for the blog!