About Nicholas C. Zakas

Recent Posts

Moving the Web forward

Last week, I was invited to attend the Mozilla Platform Summit at Mozilla headquarters in Mountain View, California. Dion Almaer and Ben Galbraith, of Mozilla and Ajaxian fame, put together this event to let developers help guide the future direction of Firefox. There were around 20 attendees in total, with familiar names like John Resig... […]

Introducing Combiner, a JavaScript/CSS concatenation tool

One of the things I used to love when programming in more “traditional” languages such as C++ and Java was the build process. My source files just indicated what they needed in order to run successfully, and the build tool did the rest. This had the wonderful advantage of allowing you, as a programmer, to... […]

Iframes, onload, and document.domain

In this new Web 2.0, mashup world that the Internet has become, a lot of focus has been placed on the use of iframes for embedding third-party content onto a page. Iframes provide a level of security since JavaScript access it limited by domain name, so an iframe containing content from another site cannot access... […]

Computer science in JavaScript: Selection sort

Not too long ago, I wrote about the bubble sort algorithm, which is typically the starting point for sorting algorithm instruction. Bubble sort is a pretty inefficient algorithm with O(n2) complexity and its algorithm calls for comparing each array item to its neighbor in order to “bubble” the smallest value to the top (front) of... […]

Computer science in JavaScript: Binary search

Not too long ago, I posted about creating a binary search tree in JavaScript (part 1, part 2). A binary search tree is a great place to store data in an ordered way to allow for an easy search for specific information. However, a binary search tree isn’t the only place that a binary search... […]

Web workers: errors and debugging

I’ve been continuing to experiment with web workers this past weekend and found some more interesting information. It seems that the earlier implementers, Firefox 3.5 and Safari 4, have some quirky differences in their capabilities and behaviors. I discovered this as I was trying to figure out what would happen if an error was thrown... […]

What makes a great software engineer?

A couple weeks ago, a presentation made the rounds online about Netflix culture. The presentation featured the many benefits of working for Netflix and how the company goes about hiring (and firing) employees. While there was a lot of information about Netflix’s treatment of employees, which clearly makes Netflix an attractive place to work, the... […]

Experimenting with web workers

In the past couple of months, there’s been some good information floating around about web workers. I have no desire to add yet another introduction to the topic into the blogosphere, but I would like to share some information about my experiences with web workers. What follows are some notes based on my playing around... […]

Timed array processing in JavaScript

Not too long ago, I blogged about a way to asynchronously process JavaScript arrays to avoid locking up the browser (and further, to avoid displaying the long-running script dialog). The chunk() function referenced in that original blog post is as follows: function chunk(array, process, context){ var items = array.concat(); //clone the array setTimeout(function(){ var item... […]

Computer science in JavaScript: Credit card number validation

Credit cards on the web sites have become just about as ubiquitous as sign-in forms. One of my favorite moments in computer science was learning the algorithm for determining a valid credit card number. The process doesn’t involve making a call to a server or checking accompanying information, just a basic algorithm that uses a... […]