Project Orion

The Eclipse Foundation is working on a Project Orion. This is a version of their Eclipse IDE that runs in a web browser. The thing is being coded from scratch using JavaScript. That sounds cool. If they can complete such a massive undertaking, then I should be able to write simple apps using JavaScript.

I used Eclipse briefly while learning Java. However I found that I preferred a simple text editor. That forced me to learn the syntax myself and not rely on auto complete from an IDE. I never went back to Eclipse. I should though, for the sake of Java.

My latest vision is to code a small game using JavaScript. The game will implement a simple version of Angband, a text based dungeons and dragons game. I am going to give myself a week or two to finish the thing. Good luck to me.

Debugging JavaScript

I finished reading a whole chapter on JavaScript debugging techniques. Luckily I have been debugging my code all throughout the book. So this topic was close to my heart.

The thing I like about JavaScript is that it is interpreted. The interpreter knows exactly where it is in the code when it encounters a problem. This allows the browser to report the exact line number where there is a problem.

With compiled languages, you might be only able to approximate where you are in the code when a problem occurs. I have not yet tried either of the tools from Mozilla or Microsoft to step through the JavaScript code. However I bet those will come in handy as my JavaScript programs get larger and larger as I learn more.

Regular Expressions

So far I have not been too impressed with the JavaScript programming language. The loose typing is driving me crazy. And I discovered the Object Oriented Programming is not really that object oriented. Today however I was happily surprised to find out that JavaScript supports regular expressions.

I have mostly been staying away from learning regular expressions. And I know I should not be. JavaScript provided me a way to learn both the language and regular expressions a bit. It supports the Perl 5 version of regular expressions. The little bit I have been playing with are very powerful.

After JavaScript I plan to go back and beef up my Java skills. But I might be able to dig in deeper and gain some good experience with regular expressions as well. Today I only scratched the surface of what looks to be a powerful tool.

Debugging JavaScript

I am going through my JavaScript textbook for the first time. You just can't read the chapter. You need to work through the big example that is presented. That means a lot of typing in code. Get this. The code from my textbook is buggy.

Now I am learning a great deal just by debugging the code. However this is a painful process. JavaScript is case sensitive. So if you declare a variable with one spelling, you cannot expect the use of a different spelling somewhere else in the code to work. I keep relearning this fact the hard way.

My new technique is to cut and paste variable names in my code. It seems to be helping. I will say this. The examples in the book text are some nifty looking web pages. They are very clean and crisp. The exercises at the end of each chapter are decent but still somewhat lacking. Maybe I will have to sign up for a college course on JavaScript after all.

Event Handlers Not Firing

I am home spending a week to get ahead in my JavaScript learning. Was just finishing up some case projects at the end of the chapter. I ran into a problem that I glossed over before. Sometimes the event handlers just don't seem to be firing. This is very frustrating.

I could not get the onclick event handler to work for the image buttons on a form. This could not be right. I finally googled around and found that old Netscape 4 did not handler event handlers for this element.

But I am running Internet Explorer 6. I would hope it could handler these onClick events. Nevertheless, I followed the advice on what to do if you are running Netscape 4. I dropped the image button for a regular image element nested in an anchor tag. The anchor handles the onClick event.

Yeah this is a hack, but I am getting desperate. Props go out to Web Developer Notes that pointed out the Netscape 4 work around. Thank you very much,

Fragile JavaScript

I purchased a textbook on JavaScript and am trying to learn the language on my own. So far I have read up on variables, functions, and events. I do all the exercised at the end of each chapter. Here is the thing that irks me. If you have one character in your source code wrong, the resulting JavaScript just does not work.

At least in HTML when things go wrong, the browser seems to display something. With JavaScript you just get an empty page. I've got to discover or invent a way to make my JavaScript coding more robust. It feels like the whole house will come down if you make a change to your code or try something new.

Cascading Style Sheets 3

Lately HTML5 has been getting all the buzz. But Cascading Style Sheets 3 (CSS3) is also coming out. It allows you to easily do buttons with rounded corners. You specify this with the border-radius property.

You should also not count out JavaScript. The future is most likely going to be a combination of HTML5, CSS3, and JavaScript. I know I am learning JavaScript to be ready for the new web wave.