Nicholas C. Zakas's complete blog can be found at: http://www.nczonline.net/

Items:   16 to 18 of 18   « Previous

Thursday, April 12, 2007

I'm a software engineer, an author, a blogger, a tech junkie; I am many things to many people, some of whom I've met, many of whom I haven't. But most of all, I'm human. I'm not just a JavaScript machine constantly trying to find better ways of doing things. I do feel pressure to do things better, faster, more optimized, and to then describe how I did it so that others can learn; I'm an author, that's my job. I want to teach, I want to share, I want to discover. People depend on me for this and I gladly take that role. It's easy for them to forget that I'm also human...and sometimes it's easy for me to forget that too. As an author, I want to continue teaching you, but as a human being, right now, I'm hurting.

I don't typically blog about my personal life, but as this is my blog, I can change my mind anytime, and am choosing to do so now as part of my coping mechanism. Late last week, my girlfriend broke up with me. This wonderful guide, loving supporter, partner in crime, and kind soul unexpectedly stepped out of my life. The reasons why aren't important; I learned a long time ago that you can do nothing wrong and things may still not work out. This knowledge doesn't pacify me now, though, as I try to cope with one of the worst broken hearts I have experienced.

I've always found romance to be intriguing. I was always blown away thinking that somewhere out there in the wide world, there is someone who doesn't even know I exist, someone who's life has gone on without the knowledge of someone named Nicholas C. Zakas, who he is or what he does. And yet someday, that someone will become the most important person in my life and vice versa. Someday, we won't remember what life was like before we met. Someday, the thought of losing the other will be so crushing that we dare not think it.

I lived that experience first hand moving out to California. I came out by myself, without knowing a soul. And then there was this someone, this perfect someone, who came into my life. Two lives starting literally on opposite coasts, traveling along very different paths that somehow found a way to cross at one perfect moment. That someone, who became the most important person in my life for what seems like both forever and only a fraction of a second, is now gone. And I am hurting.

The irony of romance is that before it, you have no idea that anything is missing. I was okay out here before she entered my life. I was slowly finding my way around my new surroundings, making friends, getting to know people; I didn't need her in my life. But then there she was. And now she's not. It is just as it was before I met her: me, my apartment, my computer, my job. Yet, now there's something missing, now it feels like there's this big gaping hole in my life, now it feels like things will never be right again. But really, circumstances haven't changed since before I met her...not knowing that you're missing something in your life and then getting a rude awakening, that's romance.

I had a lot of plans for this past weekend, all of which got sidelined due to this major change in my life. And so I came to a decision: I need to take some time to take care of myself, as a human. For the time being, I'm putting book proposals, side projects, and blogging on the shelf. There's more to life than closures and browser differences and what exactly the difference between Ajax and DHTML is. There's people, human beings; the soul behind the words, the code, the application. And this soul needs time to recover and try to find peace again.

I'm not sure when I'll pick everything up again, but I'm sure I will at some point. In the meantime, if it takes me a while to return emails or phone calls, please don't take it personally. And tell someone that you love them today. Until next we meet...


Friday, April 6, 2007

Every once in a while, the YUI blog posts an article about someone who's using the YUI Library in production. But they missed one. It seems that Google is using it on the customized homepage. I guess that's a compliment? :)


Tuesday, April 3, 2007

I love design patterns, they make life so much easier. Particularly, I love the observer pattern. If you use JavaScript, you're already familiar with this pattern: events. Events are how we tie functionality to a page and create interactions for the user. You can even create your own observer objects using JavaScript libraries such as YUI or even my own zEvents. The problem is in how I've seen them implemented.

I'll say this as clearly as possible: observers shouldn't observe themselves. An event indicates that something of importance will occur or has occurred. There is some default behavior that is of interest to observers and the event is the way to broadcast that this important moment in processing has occurred. The default behavior should never be executed by an observer. Let me state this as a concrete example: if your object publishes a load event, you shouldn't assign an event handler that does the loading. The default behavior should be there regardless of the event. In fact, you should be able to remove all events and have the object still perform its duties appropriately.

Again, I love the observer pattern and I'm a big fan of creating objects with custom events (loosely coupled objects rule!). But let's have some sanity around events. Let the important moments be just those, and make sure your object works appropriately without any observers subscribing to its events.


Items:   16 to 18 of 18   « Previous