Category Archives: Web Development
#ThatConference: Summer Camp for Geeks
Apparently I’ve developed some serious JavaScript credibility in the Chicago-land area. I just found out that both of my sessions were accepted for ThatConference in August! The titles of my sessions are: Sencha Touch 101: Mobile Apps Built with HTML5 … Continue reading
Book Review: The Node Beginner Book
One of my New Year’s resolutions for 2012 was to learn more Node.js… so I did a bit of Googling for good beginner’s resources, and I stumbled across The Node Beginner Book by Manuel Kiessling.
Considering the book’s title, I think the content is spot-on. Developers who are looking for an introduction to Node.js will find this book to be easy to understand, full of useful examples that are expanded in each chapter, and generally enlightening. Continue reading
Building Apps with Sencha Touch 2
Last night at the
JavaScript Mergesort: Top-Down vs Bottom-Up
In my continuing series on JavaScript algorithms, I thought it might be fun to examine two methods for implementing “mergesort”.
Mergesort is essentially a “divide and conquer” technique, where the algorithm breaks an array into smaller pieces. Each of the small pieces is sorted and then recursively merged back together.
Mergesort is an attractive option for sorting large arrays because it is fast… and we’ll look at its efficiency in a moment. However, it also has a disadvantage: the algorithm requires more memory than Selection Sort and Insertion Sort, so for systems in which memory usage must be kept low mergesort may not be a good option. Continue reading
Book Review: Specification By Example
Disclosure: Manning Publications is a sponsor of the Chicago Sencha User Group, and they provide free copies of of their books as giveaways for our monthly meetings. I have not been paid for this review, although I did receive this … Continue reading
Thoughts on JS Unit Tests: Phantom.js vs Node.js
I have written before about using the Jasmine framework for unit testing your client-side JavaScript code. If you’re not writing tests, you need to start… today.
I recently started exploring the option of using Node.js to run my tests… but after spending several hours diving into the matter I wanted to share some immediate thoughts. Continue reading
Book Review: jQuery Tools UI Library
jQuery Tools is a tiny (4k) standalone JavaScript framework that allows website developers to create common UI widgets without requiring the overhead of its larger jQuery cousin or a cluster of plugins.
I’m glad I was introduced to the jQuery Tools UI library, and I will probably use it when I build some upcoming websites. Continue reading
Automating JavaScript Unit Tests with Git
How many of you JavaScript developers out there write unit tests?
The key to unit tests is that they’re run EVERY TIME you touch your code… otherwise your tests aren’t going to do anything (obviously). If your tests don’t do anything, there’s no point in having them.
I’d like to share an example app in which I create a bash script that runs my unit tests via PhantomJS. By utilizing a Git pre-commit hook, I ensure my unit tests are run EVERY TIME I touch my code, and (best of all) it won’t allow me to commit code that doesn’t pass my tests! Continue reading
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
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
