Category Archives: JavaScript

JavaScript: Selection vs. Insertion Sort

“Selection Sort” and “Insertion Sort” are two popular sorting algorithms. If they have the same Big-O notation, which is better?

The point here is that Big-O notation, although certainly helpful, doesn’t always tell us the full story. It’s great to know what the worst possible performance is for our code… but we need to know how often to expect that situation. Continue reading

Posted in Algorithms, JavaScript | Leave a comment

JavaScript: Binary Search vs Linear Search

The linear search algorithm is often “good enough” for most applications. Although optimization would improve performance, the benefit might only be minimal if our data set (stored in an array) is relatively small.

But what happens to our algorithm as the data set increases in size?

I put together a short example comparing the expected (worst-case) and actual performance of these two search algorithms. Continue reading

Posted in Algorithms, JavaScript, Web Development | 1 Comment

JavaScript Encapsulation

I recently had a discussion with a colleague about encapsulation. We lamented the fact that many developers cannot adequately define, describe or otherwise communicate the concept during the interview process – even at the “senior developer” level.

After our conversation, I went home and Googled “JavaScript encapsulation” just to see what came up. After seeing the search results I am not at all surprised that few JavaScript programmers really understand the concept. I didn’t feel satisfied by any of the examples or definitions I found, so here’s my crack at explaining things. Continue reading

Posted in JavaScript, Web Development | 2 Comments

Book Review: Test Driven JavaScript Development

Test Driven JavaScript Development is probably the best book about JavaScript that I’ve read yet.

I realize that’s a bold statement to make, but I challenge anyone to name another book that (1) explains fundamental JavaScript concepts as clearly, or (2) offers specific advice on how to tackle an enterprise solution in JavaScript. Continue reading

Posted in Book/Product Reviews, JavaScript, Web Development | 4 Comments

Code Reviews: Why Your Code Sucks

Over the past few years I’ve been asked to perform Code Reviews on many web applications, often projects utilizing ExtJS or Sencha Touch.

I always enjoy peeking into the thought process behind an application because you never know when you’re going to learn something useful. As someone who takes an immense amount of pride in my profession, I strongly believe that education should never stop because someone will always do something better than you. At the very least, reading someone else’s code will trigger ideas of your own.

That being said, code reviews are sometimes fun… but more often frustrating. Continue reading

Posted in ExtJs, JavaScript, Sencha Touch, Web Development | 6 Comments

A Rant in Defense of JavaScript

Yesterday, my Twitter feed exploded with people talking about Google’s new Dart language. I’ll be honest and say that it struck a nerve with me… and so I begin my rant in defense of JavaScript. Continue reading

Posted in Google, JavaScript, Web Development | 4 Comments

Book Review: jQuery In Action

At the August meeting of the Chicago Sencha User Group, Shawn Khameneh presented “Plugin Development and Animation using jQuery”. Despite being an employee of Sencha and a fanatic of ExtJS, I have been a longtime JavaScript enthusiast and dabbled in a variety of client-side technologies. Like most web developers, I’ve used jQuery to build websites – but my exposure to the more advanced constructs of the library has been limited.

After enjoying Shawn’s presentation I had the chance to read jQuery in Action (2nd Edition), which was the featured prize for our group at that meeting. Continue reading

Posted in Book/Product Reviews, JavaScript, Web Development | Leave a comment

Mobile App Hackathon Chicago #mobileappchi

I spent all day today at the AT&T Mobile App Hackathon in Chicago helping developers build some really cool applications using Sencha Touch (among other technologies). Here’s a recap of what you missed. The day started with introductions from the … Continue reading

Posted in Chicago Ajax Developers, JavaScript, Sencha Touch | Leave a comment

Chicago Metro App Contest

I was reading the RedEye, a free local daily newspaper, on my train ride to work this morning when I stumbled across an interesting story. The city of Chicago is holding an Apps for Metro Chicago contest to celebrate the … Continue reading

Posted in AJAX, Chicago Ajax Developers, JavaScript, Web Development | Leave a comment

The Curious Case of Trailing Commas in IE

I realize that I am in the minority of Web Developers who truly appreciate Internet Explorer. Most people rag on the browser for a variety of reasons… and honestly, most people have plenty to complain about. But this post isn’t … Continue reading

Posted in JavaScript | 4 Comments