JavaScript and DOM: Beginning yet again

Filed under: Development, JavaScript, Techy stuff — kathyjay at 11:25 am on Saturday, June 10, 2006

It turns out that upgrading WordPress is much less painful than I’d assumed.

But to return to the topic, I’ve decided that it’s time for yet another stab at learning JavaScript. Why haven’t I managed this before? Well, it’s certainly not lack of programming ability!

My trawl through the first couple of chapters of “Dom Scripting” by Jermey Keith has reminded me of why I fall away each time. The language has a similar structure to most of the C-type languages such as Java, C++ and PHP. Now, I’m familiar with all of them so those initial chapters always teach me the structures that I already know. By the time the interesting stuff appears, I’ve moved onto learning something else that I can find a more immediate need for.

I’ve been a web denizen since 1999 and at that time JavaScript was essentially The Evil Language. Any website that implemented it had dozens of errors and it was usually put in as a “woo I’m clever” thing rather than for anything actually useful. Over the years, I’ve developed a fairly intense dislike of bad JavaScript and it’s only been over the last couple of years that JavaScript has been used well and unintrusively. The standardisation of the DOM has certainly helped here.

I genuinely enjoy learning new things, but unless it’s a college thing I usually focus on the things that I have an immediate use for. I’ve never had any need to use JavaScript in anything that I’ve worked on and the odd bits that I have used were picked up from magazines or tutorials and I’m good enough with languages to adapt things to what I need. PHP, on the other hand, I could see a use for which is why I sat down and learned it last year. I had a project in mind for it and it’s turned out very well.

JavaScript, though, is a necessity if I really want my web career to go anywhere so it’s time to hit the books again. This time I’m going to get past the “here is a variable, look at this for loop” section and actually find the stuff that I can use in the real world.

As an aside, am I the only geek out there who infinitely prefers using a for loop over a while? My colleagues at work seem to adore their while loops, but in all those cases a for loop would have been easier to read and maintain. Hmmm.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>