About Nicholas C. Zakas

Recent Posts

Back Button/Onload Mess

Working on some code earlier this week, I discovered that Opera doesn’t fire the load event when navigating to a page using the back button. This means anything set to fire onload doesn’t get executed…so much for good coding practices. But this issue appears to intermittently happen on other browsers too, notably Firefox and Safari... […]

Use Null Comparisons Sparingly

Comparing values against null is a very popular thing to do in JavaScript, but I fear that typically it’s overused and used in situations when it’s completely inappropriate. Consider the following: if (sText != null) { var aParts = sText.split(","); } Suppose this is in a function that has sText as an argument. The intent... […]

Fun With Null And Undefined

I’ve been using the great JavaScriptLint tool recently to go over my code. One of the errors that it typically flags is comparison with null, 0, or an empty string, which it says should not be done with == or != because of type coercion. So I dutifully went along and changed all !=null to... […]

FireBug 0.4

The next generation of JavaScript debugging is upon us, and it’s name is FireBug. For the uninitiated, FireBug is an addon for Firefox that makes developing JavaScript easier. Besides a new JavaScript debugger with breakpoint support, it allows you to write debugging info to a console window, evaluate JavaScript in a command line (not unlike... […]

Global Variables Are Evil

I have been known to tell people in an enterprise environment to avoid global functions and variables in JavaScript at all costs. My reasons are purely from a maintenance point of view: it’s easier to document variables attached to classes or namespaces and it’s easier to debug (because you know where to find the variable/function... […]

Eureka Suite – The Next Generation

When last we left Eureka, it was a JavaScript console that interacted with Internet Explorer. As I thought more about it, it seemed that there could be ways to reuse the components of the original Eureka for other purposes. So, I proudly introduce the Eureka Suite, which will be an ever-growing group of JavaScript utilities.... […]

And Then There Were Three

Software development always seemed to be separated into two main categories: graphic designers who devised the user interface and software engineers who implemented it. There was a very distinct line between these two functions; the graphic designers did no programming and the software engineers did no user interface design. The web is an interesting animal... […]

Google Web Toolkit

Got an e-mail from Lonnie this afternoon pointing out Google’s latest creation: Google Web Toolkit. The is interesting: write all of your JavaScript code as Java first, to take advantage of all of the tools available for Java, then convert it to JavaScript as the final step for deployment. I think it’s an intriguing concept,... […]

Praise for Microsoft

I know, it’s really out of fashion to give Microsoft anything but grief, but I really feel like I need to at this point. After being stodgy and slow-moving for so long, Microsoft has really ramped up on all playing fields. They are working on Internet Explorer 7 well ahead of what they had said... […]

Design Patterns in JavaScript

Over the past year or so I’ve been learning about design patterns and finding them incredibly useful. For languages that have interfaces, it’s especially useful. Even though JavaScript doesn’t have such a concept, you can still apply traditional design patterns to the language. As evidence, I’ve begun writing a series over at WebReference covering Design... […]