Review of "Object-Oriented JavaScript"

2008-10-25 3 min read Books Javascript Programming Eddie

Object Oriented JavaScript
Object Oriented JavaScript

I recently read Object-Oriented JavaScript, by Stoyan Stefanov. In reviewing it, I found it was one of the most interesting books I’ve read in a while, for some good reasons and a few more curious reasons.

Object-Oriented JavaScript was authored by Mr. Stefanov, who is a developer at Yahoo. It features an impressive number of reviewers (twelve), among them Douglas Crockford, the author of JavaScript: The Good Parts, and Ross Harmes, author of JavaScript Design Patterns, both of whom are Stefanov’s Yahoo co-workers. In a reasonable 330 pages, it features eight chapters on JavaScript’s History, Basic Syntax/Features, Functions, Objects, Prototypes, Inheritance, the DOM, and Patterns/Best Practices.

Readers with little to no JavaScript knowledge will be able to read this book, but I’m uncertain how much they’ll be able to glean from the meaty inner chapters (functions, objects, prototypes, and inheritance). Readers with moderate JavaScript understanding should be able to learn a great deal from this book. At the very least, advanced readers should be reminded of some of the language’s quirkier parts, as well as benefiting from an organized chapter on inheritance techniques.

It is tricky placing Object-Oriented JavaScript in context of the corpus of JavaScript literature. This book includes more than a little introductory material (chapters 1-2), while the core chapters (3-6) are way beyond an introduction. Only after those chapters (which I will discuss in a second) is the reader introduced briefly to the DOM and XHR before a chapter on design patterns and best practices. At a minimum, every chapter is useful and full of hints that are difficult to grep from run-of-the-mill JavaScript books. The book steers clear of the murky world of browser differences unless they’re pertinent to the topic of Object-Oriented JavaScript, which seems perfectly acceptable.

Back to those middle chapters, they are sheer gold. I am going force myself to make time to re-read this book, if not those chapters alone. They present, in a clear and organized fashion, many difficult aspects of the language, including closures, prototype, and 12 different methods for inheritance. In comparison, I believe Harmes’ book isn’t as well organized, and Crockford’s book isn’t as clear. Stefanov doesn’t break much new ground here, but the clarity describing these techniques is quite valuable regardless.

Object-Oriented JavaScript appears occasionally try to be something to everyone. This is kind of disappointing, since I would have loved to have seen any additional discussion or insight the author could have offered in the core chapters. There are tons of introductory JavaScript books, so I don’t know what a book titled Object-Oriented JavaScript gains by including more introduction. This shouldn’t detract from the book’s overall value. All of the chapters are well written and useful. However as a reader gains a better understanding of JavaScript, the introductory chapters will become far less useful, while the other chapters will remain an excellent reference.

Continue reading

October Horror Movies

2008-10-16 2 min read Movies Eddie

My roommates and I have decided to try to watch a horror/thriller every night of October. Unfortunately, the Red Sox and a few other distractions have prevented watching one every night, but here’s what we’ve got so far:

  • Nightwatch – Not a fan of this movie. I thought that the scary parts were kinda cheap, and that the plot of the movie was gross (really gross) for the sake of being gross. That gets under my skin faster than just about anything. Plus, what’s the point of a movie where the number of possible suspects is 2? As Rick points out, one of the biggest hit/miss parts of Scream was that there were 15 possible suspects. That’s much more interesting. This was Alissa’s pick.
  • Sisters – A psychological horror movie about two Siamese twins that were separated after a number of years and the emotional result of that operation. Very spooky, in a thought-required way. This movie was my pick.
  • Dressed to Kill – Continuing on the Brian De Palma theme… I’m a sucker for Michael Caine. So I really enjoyed his performance. The rest of the movie had a really constant quality to it that wasn’t quite eerie, but was close. Unfortunately, I fell asleep during part of the film (not long…) but I liked it anyway. This was Rick’s choice.

And upon consultation with them (I had to ask just to be certain) that was it. They watched Cape Fear without me (I’ve seen it before), but even still… 4 movies in 16 days isn’t good enough.

Other movies that I remember are on our combined list:

  • Alien
  • The Shining
  • Feast*
  • Carrie*
  • Hellraiser I & II
  • Repulsion* (one of the scariest I’ve ever seen, and one of my favs)

* I’ve seen (and loved)

Snapshot of right now

2008-10-08 1 min read Personal Eddie

Oct. 8, 2009 – 12:32am

Right now I’m…

Sitting on my bed reading the Fannie Farmer Cookbook (my favorite) on how to bake a 9.25lb ham. Page 201. Remembering how I tell everyone they can’t take it into the kitchen, because I don’t want it getting dirty.

Thinking about how I need a roasting pan, which I should have grabbed when I was in Laurel, picking up my new camera lens from UPS. Thinking about how I waited 45 minutes for it, when I probably should have had it re-delivered. Also thinking that the roasting pan may be too large for my oven here.

Listening to George Crumb’s Ancient Voices of Children. Wishing it drowned out more of “The Shield,” the program my roommates are watching/listening to. Thinking how much I like Ancient Voices of Children, despite how weird some of the sounds are.

Finished taking a few play photos with the new lens. Posted them to flickr. Wondering if every good lens makes it this easy, which should I purchase next? Thinking I made a good choice to start.

Wondering if I will have any clean sock pairs left for me to wear to work tomorrow.

Resisting falling asleep, so I can formally get ready for sleep instead.

Funny thing about bugs…

2008-09-18 3 min read Programming Xslt Eddie

They just keep popping up.

I just scrolled down my own blog, and saw a post titled “Down to three bugs.” Funny enough, three months later, we’re still trying to push the website out. (Wow, those were some really big bugs!!! Haha, jk…) In fact, I’ve been pressing for the last 2 days, trying to expedite a few last-minute bugs so that QA testing could begin (for about the 18th time, now in snapshot 21). Kinda odd, when QA finds bugs in round 20 that they didn’t find in round 10… despite no code changes in the meantime…

But I’m not going to complain. Programming is still a lot of fun when you’re actually doing it. It ends up being almost therapeutic when you’ve got other stuff going on that you’re trying to ignore. Not only that, but there’s always room to improve. A co-worker came to my desk yesterday and schooled me on how to write code. When you’re young, you’re stupid. He had lots of experience, and was… well, right… most of the time. I was boxed into a corner at some points, but also made a few bad decisions. The good thing is that I always learn from my mistakes, and next time will be much better.

I remember writing 3.5 websites before I really got common code working the way I wanted. It was similar to the way I learned how to write CSS. Excerpting common code so that I would only edit once, vs. editing 6 files just to make one update. It was easy when I was using CSS, SSI’s, or PHP includes to simply import exactly what I needed, but I find it is far more difficult when using XSLT’s. Why? Because in XSLT you need to know not only the structure, but the context. That’s what makes it difficult… writing context dependent generic code is difficult.

[Of course, dirty secret (I know you’re skimming at this point, not really reading) is that I’m almost on only my 2 year anniversary (Sept. 20) of doing programming/development work. So my progress is still quite good.]

Alright, I admit that this post was far more stream-of-conciousness than actual post, but it was good for me. It wasn’t intended to be a “I haven’t written in a month, here’s what I’ve been doing” post, but more a “I’m busy, I’ll be back soon, but I don’t know when” type post. So on that note…

Continue reading
Older posts Newer posts